qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 06/32] qtest: Add hard disk geometry test


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 06/32] qtest: Add hard disk geometry test
Date: Sat, 30 Jun 2012 07:42:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Blue Swirl <address@hidden> writes:

> On Fri, Jun 29, 2012 at 3:34 PM, Markus Armbruster <address@hidden> wrote:
>> So far covers only IDE and tests only CMOS contents.
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>>  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 <address@hidden>,
>> + *
>> + * 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!

[...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]