[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-devel
Subject:    Re: [Qemu-devel] [PATCH 06/32] qtest: Add hard disk geometry test
From:       Markus Armbruster <armbru () redhat ! com>
Date:       2012-06-30 5:42:44
Message-ID: m3obo1mk2z.fsf () blackfin ! pond ! sub ! org
[Download RAW message or body]

Blue Swirl <blauwirbel@gmail.com> writes:

> On Fri, Jun 29, 2012 at 3:34 PM, Markus Armbruster <armbru@redhat.com> wrote:
>> So far covers only IDE and tests only CMOS contents.
>>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>>   tests/Makefile         |      2 +
>>   tests/hd-geo-test.c |   402 +++++++++++++++++++++++++++++++++++++++++++++++++++
>>   2 files changed, 404 insertions(+), 0 deletions(-)
>>   create mode 100644 tests/hd-geo-test.c
>>
>> diff --git a/tests/Makefile b/tests/Makefile
>> index d66ab19..5d362bd 100644
>> --- a/tests/Makefile
>> +++ b/tests/Makefile
>> @@ -20,6 +20,7 @@ check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
>>   # All QTests for now are POSIX-only, but the dependencies are
>>   # really in libqtest, not in the testcases themselves.
>>   check-qtest-i386-y = tests/fdc-test$(EXESUF)
>> +check-qtest-i386-y += tests/hd-geo-test$(EXESUF)
>>   check-qtest-i386-y += tests/rtc-test$(EXESUF)
>>   check-qtest-x86_64-y = $(check-qtest-i386-y)
>>   check-qtest-sparc-y = tests/m48t59-test$(EXESUF)
>> @@ -70,6 +71,7 @@ tests/test-visitor-serialization$(EXESUF): tests/test-visitor-serialization.o $(
>>   tests/rtc-test$(EXESUF): tests/rtc-test.o $(trace-obj-y)
>>   tests/m48t59-test$(EXESUF): tests/m48t59-test.o $(trace-obj-y)
>>   tests/fdc-test$(EXESUF): tests/fdc-test.o tests/libqtest.o $(trace-obj-y)
>> +tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o tests/libqtest.o $(trace-obj-y)
>>
>>   # QTest rules
>>
>> diff --git a/tests/hd-geo-test.c b/tests/hd-geo-test.c
>> new file mode 100644
>> index 0000000..0ab573c
>> --- /dev/null
>> +++ b/tests/hd-geo-test.c
>> @@ -0,0 +1,402 @@
>> +/*
>> + * Hard disk geometry test cases.
>> + *
>> + * Copyright (c) 2012 Red Hat Inc.
>> + *
>> + * Authors:
>> + *   Markus Armbruster <armbru@redhat.com>,
>> + *
>> + * This work is licensed under the terms of the GNU GPL, version 2 or later.
>> + * See the COPYING file in the top-level directory.
>> + */
>> +
>> +/*
>> + * Covers only IDE and tests only CMOS contents.   Better than nothing.
>
> The test is slightly unorthodox since IDE, disks and CMOS RAM are
> actually separate devices. Moreover, QEMU shouldn't touch CMOS RAM but
> let the BIOS (instructed by fw_cfg) manage it.

Design of the interface between QEMU and the BIOS, beyond the scope of
this series.

>                                                But this can be seen as
> a nice test for the integration between all those components. If ever
> CMOS handling is pushed to BIOS level, this will break.

Yes.

>> + * Improvements welcome.
>> + */
>> +
>> +#include <glib.h>
>> +#include <stdlib.h>
>> +#include <string.h>
>> +#include <unistd.h>
>> +#include "qemu-common.h"
>> +#include "libqtest.h"
>> +
>> +const char test_image[] = "/tmp/qtest.XXXXXX";
>
> 'static'

Yup.

A couple of more comments follow, all duly noted.  Thanks!

[...]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic