Statistics
| Branch: | Revision:

root / tests @ 8addacdd

# Date Author Comment
e92cfa0d 05/23/2013 04:44 pm Michael Roth

qapi: add QMP input test for large integers

Large integers previously got capped to LLONG_MAX/LLONG_MIN so we could
store them as int64_t. This could lead to silent errors occuring.

Now, we use a double to handle these cases.

Add a test to confirm that QMPInputVisitor handles this as expected if...

089f26bb 05/23/2013 04:44 pm Michael Roth

qapi: fix visitor serialization tests for numbers/doubles

We never actually stored the stringified double values into the strings
before we did the comparisons. This left number/double values completely
uncovered in test-visitor-serialization tests.

Fixing this exposed a bug in our handling of large whole number values...

8addacdd 05/23/2013 04:44 pm Michael Roth

qapi: add native list coverage for visitor serialization tests

Signed-off-by: Michael Roth <>
Reviewed-by: Laszlo Ersek <>
Reviewed-by: Amos Kong <>
Signed-off-by: Luiz Capitulino <>

95de21a4 05/22/2013 04:22 pm Anthony Liguori

Merge remote-tracking branch 'mjt/trivial-patches' into staging

  1. By Christophe Lyon (1) and others
  2. Via Michael Tokarev
    • mjt/trivial-patches:
      target-moxie: replace target_phys_addr_t with hwaddr
      Rename hexdump to avoid FreeBSD libutil conflict
      remove some double-includes...
0ba365f4 05/19/2013 04:10 pm Petar Jovanovic

target-mips: fix EXTPDP and setting up pos field in the DSPControl reg

This change makes sure that modifications of pos field in the DSPControl
register do not trash other bits in the register. This bug can be triggered
with the additional test case in mips32-dsp/extpdp.c in this commit....

997aba8e 05/18/2013 03:35 pm Michael Tokarev

remove some double-includes

Some source files #include the same header more than
once for no good reason. Remove second #includes in
such cases.

Signed-off-by: Michael Tokarev <>

489ed4bb 05/17/2013 08:29 pm Petar Jovanovic

target-mips: fix incorrect behaviour for EXTP

The mask for EXTP instruction when size=31 has not been correctly
calculated.

The test (mips32-dsp/extp.c) has been extended to include the case that
triggers the issue.

Signed-off-by: Petar Jovanovic <>...

6b41659f 05/15/2013 10:57 pm Anthony Liguori

Merge remote-tracking branch 'luiz/queue/qmp' into staging

  1. By Michael Roth (1) and Zhangleiqiang (1)
  2. Via Luiz Capitulino
    • luiz/queue/qmp:
      qapi: fix leak in unit tests
      qmp: fix handling of cmd with Equals in qmp-shell

Message-id: ...

262f27b9 05/15/2013 06:31 pm Kevin Wolf

ide-test: Fix endianness problems

The test case passes on big endian hosts now (tested on ppc64)

Signed-off-by: Kevin Wolf <>
Message-id:
Signed-off-by: Anthony Liguori <>

ad7f375d 05/15/2013 03:58 pm Michael Roth

qapi: fix leak in unit tests

qmp_output_get_qobject() increments the qobject's reference count. Since
we currently pass this straight into qobject_to_json() so we can feed
the data into a QMP input visitor, we never actually free the underlying
qobject when qmp_output_visitor_cleanup() is called. This causes leaks...

cad2b59c 05/08/2013 11:54 pm Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

  1. By Kevin Wolf (7) and Fam Zheng (3)
  2. Via Kevin Wolf
    • kwolf/for-anthony:
      qemu-iotests: fix 017 018 for vmdk
      qemu-iotests: exclude vmdk and qcow from 043
      qemu-iotests: exclude vmdk for test 042...
c0f5f9ce 05/08/2013 07:46 pm Petar Jovanovic

target-mips: fix incorrect behaviour for INSV

Corner case for INSV instruction when size=32 has not been correctly
implemented. The mask for size should be one bit wider, and preparing the
filter variable should be aware of this case too.

The test for INSV has been extended to include the case that triggers the...

794d00f7 05/08/2013 04:28 pm Fam Zheng

qemu-iotests: fix 017 018 for vmdk

017 and 018 use /bin/mv to move base img from t.IMGFMG to t.IMGFMT.base
after filling data, this is not enough for vmdk, when t.IMGFMT is only a
description text file who points to t-{flat,s001,f001,...}.IMGFMT as
data extent, so testing such subformats alway fails on them....

9f0332b8 05/08/2013 04:28 pm Kevin Wolf

libqos/pci: Enable bus mastering

Signed-off-by: Kevin Wolf <>

acbe4801 05/08/2013 04:28 pm Kevin Wolf

qtest: Add IDE test case

This adds a simple IDE test case and starts by verifying that IDENTIFY
can be successfully used and return the correct serial number, version
and the WCE flag is set for cache=writeback.

Signed-off-by: Kevin Wolf <>

b95739dc 05/08/2013 04:28 pm Kevin Wolf

qtest/ide-test: Add simple DMA read/write test case

This tests that single sectors can be successfully written and correctly
read back.

Signed-off-by: Kevin Wolf <>

948eaed1 05/08/2013 04:28 pm Kevin Wolf

qtest/ide-test: Test short and long PRDTs

This tests the behaviour of the DMA engine when the given PRDT contains
physical region descriptors for either more or less bytes than the
IDE request is for.

Signed-off-by: Kevin Wolf <>

1afe2726 05/08/2013 04:28 pm Fam Zheng

qemu-iotests: exclude vmdk for test 042

Zero sized disk is not supported by qemu vmdk driver, exclude vmdk from
the test script.

As tested on vmware-vdiskmanager and vmware workstation, zero sized disk
is not supported by vmware, either.

Signed-off-by: Fam Zheng <>...

dbcdd7cb 05/08/2013 04:28 pm Fam Zheng

qemu-iotests: exclude vmdk and qcow from 043

043 tests recursive backing file by changing backing file. VMDK has not
implemented this yet, and qcow1 probably never will.

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

cc9936a3 05/03/2013 08:03 pm Andreas Färber

libqos: Relocate I2C files

Commit c4efe1cada311b9dc0df5beb71c4227ff3414aa1 (qtest: add libqos
including PCI support) created a libqos/ subdirectory but left the
existing I2C libqos files libi2c*.[hc] in tests/. Clean this up.

Signed-off-by: Andreas Färber <>...

25565e85 05/03/2013 07:20 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/block' into staging

  1. By Fam Zheng (8) and others
  2. Via Stefan Hajnoczi
    • stefanha/block:
      qemu-iotests: Filter out 'adapter_type'
      nbd: support large NBD requests
      nbd: use g_slice_new() instead of a freelist
      qemu-iotests: Filter out vmdk creation options...
86abefd6 05/03/2013 02:06 pm Fam Zheng

qemu-iotests: Filter out 'adapter_type'

Filter out vmdk creation option 'adapter_type' for vmdk. So that tests
with an explicit './check -o adapter_type=XXX' will not fail.

Signed-off-by: Stefan Hajnoczi <>

29851ee7 05/03/2013 12:50 pm Petar Jovanovic

target-mips: fix calculation of overflow for SHLL.PH and SHLL.QB

This change corrects and simplifies how discard is calculated for shift
left logical vector instructions. It is used to detect overflow and set bit
22 in the DSPControl register.

The existing tests (shll_ph.c, shll_qb.c) are extended with the corner cases...

50522d96 05/03/2013 11:34 am Fam Zheng

qemu-iotests: Filter out vmdk creation options

Cover new image creation options for vmdk, so we can use '-o
zeroed_grain=XXX' and '-o subformat=XXX' to run the tests successfully.

Signed-off-by: Fam Zheng <>
Reviewed-by: Kevin Wolf <>...

beb54a87 05/01/2013 12:04 am Jesse Larrew

libqtest: only call fclose() on open files

libqtest.c can segfault when calling fclose() if the pidfile wasn't
opened successfully. This patch fixes the issue.

Signed-off-by: Jesse Larrew <>
Reviewed-by: Anthony Liguori <>...

1a63e059 04/29/2013 04:28 pm Andreas Färber

libqos: Convert fw_cfg values to host endianness

The fw_cfg ABI is Little Endian, so byte-swap the generically read
byte array to host endianness.

This unbreaks the fw_cfg tests on ppc.

Signed-off-by: Andreas Färber <>
Signed-off-by: Andreas Färber <>...

8ec7d390 04/26/2013 02:26 pm Kevin Wolf

block: Disable driver-specific options for 1.5

We don't want to commit to the API yet before everything is worked out.
Disable it for the 1.5 release. This commit is meant to be reverted
after the 1.5 release.

The disabling of the driver-specific options is achieved by applying the...

7da94ca7 04/22/2013 12:37 pm Stefan Hajnoczi

qemu-iotests: add 053 unaligned compressed image size test

Test that qemu-img convert -c works when input image length is not a
multiple of the cluster size.

Previously an error message would be produced:

qemu-img: error while compressing sector 0: Input/output error...
2af5ef70 04/22/2013 11:27 am Kevin Wolf

block: Fail gracefully when using a format driver on protocol level

Specifying the wrong driver could fail an assertion:

$ qemu-system-x86_64 -drive file.driver=qcow2,file=x
qemu-system-x86_64: block.c:721: bdrv_open_common: Assertion `file !=
((void *)0)' failed....

bdda9232 04/22/2013 11:27 am Kevin Wolf

qemu-iotests: Fix _filter_qemu

$QEMU_PROG happens to be 'qemu' in my setup, so this sed command
replaces a bit too much. Restrict it to the start of the line and to
when it's followed by a colon, i.e. the form used by error messages.

Signed-off-by: Kevin Wolf <>...

a875711a 04/17/2013 06:27 pm Anthony Liguori

i440fx-test: add test for PAM functionality

This tests PAM settings for the i440fx. This test does a lot of
byte MMIO which is fairly slow with qtest today. But the test
does complete in under 2 seconds.

We don't fully emulate PAM largely because of limitations with...

bf2a38d4 04/17/2013 06:27 pm Anthony Liguori

fw_cfg: add qtest test case

This validates some basic characteristics of fw_cfg.

Signed-off-by: Anthony Liguori <>
Message-id:

9bda413c 04/17/2013 06:27 pm Anthony Liguori

i440fx-test: add test to compare default register values

This test compares all of the default register values against the
spec. It turns out we deviate in quite a few places. These
places are really only visible to the BIOS though which is why
this hasn't created any problems....

c4efe1ca 04/17/2013 06:26 pm Anthony Liguori

qtest: add libqos including PCI support

This includes basic PCI support for the PC platform. Enough
abstraction should be present to support non-PC platforms too.

Signed-off-by: Anthony Liguori <>
Message-id:

234c69c5 04/17/2013 06:26 pm Anthony Liguori

libqos: add fw_cfg support

fw_cfg is needed to get the top of memory which is necessary for
doing PCI allocation and allocating RAM for DMA.

Add a PC version of fw_cfg and enough abstraction to support other
platforms.

Signed-off-by: Anthony Liguori <>...

8a0743cf 04/17/2013 06:26 pm Anthony Liguori

libqos: add malloc support

This is a very simple allocator for the PC platform. It should
be possible to add backends for other platforms.

Signed-off-by: Anthony Liguori <>
Message-id:

8a8fd637 04/17/2013 06:26 pm Anthony Liguori

qtest: don't use system command to avoid double fork

Currently we waitpid on the child process we spawn off that does
nothing more than system() another process. While this does not
appear to be incorrect, it's wasteful and confusing so get rid of
it.

Signed-off-by: Anthony Liguori <>...

b1ca31d7 04/15/2013 05:07 pm Petar Jovanovic

target-mips: fix mipsdsp_mul_q15_q15 and tests for MAQ_SA_W_PHL/PHR

The operands for MAQ_SA_W.PHL/MAQ_SA_W.PHR must in specified format.
Otherwise, the results are unpredictable. Once the operands were corrected
in the tests (part of this change), a bug in mipsdsp_mul_q15_q15 became...

c09b437b 04/15/2013 11:18 am Stefan Hajnoczi

qemu-iotests: filter QEMU_PROG in 051.out

Filter the name of the QEMU executable so the output can be diffed no
matter what QEMU_PROG is (e.g. qemu-system-x86_64).

Signed-off-by: Stefan Hajnoczi <>

342809e8 04/15/2013 11:18 am Richard W.M. Jones

iotests: Add 'check -ssh' option to test Secure Shell block device.

Note in order to run these tests on ssh, you must be running a local
ssh daemon, and that daemon must accept loopback connections, and
ssh-agent has to be set up to allow logins on the local daemon. In...

cf07aecf 04/15/2013 09:26 am Kevin Wolf

qemu-iotests: A few more bdrv_pread/pwrite tests

Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

47e5df21 04/15/2013 09:26 am Kevin Wolf

qemu-iotests: Add test for -drive options

Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

e2ec3f97 04/13/2013 10:40 pm Markus Armbruster

qjson: to_json() case QTYPE_QSTRING is buggy, rewrite

Known bugs in to_json():

  • A start byte for a three-byte sequence followed by less than two
    continuation bytes is split into one-byte sequences.
  • Start bytes for sequences longer than three bytes get misinterpreted...
1d50c8e9 04/13/2013 10:40 pm Markus Armbruster

check-qjson: Test noncharacters other than U+FFFE, U+FFFF in strings

Test cases cover the two noncharacters in the BMP. Add tests for the
other 64 noncharacters.

Three existing test cases involve noncharacters U+FFFF and U+10FFFF.
Instead of deleting them as now duplicates, adjust them to use U+FFFC...

d6244e2c 04/13/2013 10:40 pm Markus Armbruster

check-qjson: Improve a few comments, delete bogus ones

Signed-off-by: Markus Armbruster <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Blue Swirl <>

47b5264e 04/08/2013 09:12 pm Anthony Liguori

Merge remote-tracking branch 'bonzini/hw-dirs' into staging

  1. By Paolo Bonzini
  2. Via Paolo Bonzini
    • bonzini/hw-dirs: (35 commits)
      hw: move private headers to hw/ subdirectories.
      MAINTAINERS: update for source code movement
      hw: move last file to hw/arm/...
0d09e41a 04/08/2013 07:13 pm Paolo Bonzini

hw: move headers to include/

Many of these should be cleaned up with proper qdev-/QOM-ification.
Right now there are many catch-all headers in include/hw/ARCH depending
on cpu.h, and this makes it necessary to compile these files per-target.
However, fixing this does not belong in these patches....

7c2acc70 04/08/2013 06:38 pm Peter Maydell

configure: Don't fall back to gthread coroutine backend

The gthread coroutine backend is broken and does not produce a working
QEMU; it is only useful for some very limited debugging situations.
Clean up the backend selection logic in configure so that it now runs...

2bd01ac1 04/05/2013 03:38 pm Stefan Berger

test-visitor-serialization: Fix some memory leaks

This patch fixes some of the memory leaks in test-visitor-serialization but not all of them.

Signed-off-by: Stefan Berger <>
Signed-off-by: Stefan Hajnoczi <>

ecdd5333 03/28/2013 12:52 pm Kevin Wolf

qcow2: Gather clusters in a looping loop

Instead of just checking once in exactly this order if there are
dependendies, non-COW clusters and new allocation, this starts looping
around these. This way we can, for example, gather non-COW clusters after
new allocations as long as the host cluster offsets stay contiguous....

d9d74f41 03/28/2013 12:52 pm Kevin Wolf

qcow2: Improve check for overlapping allocations

The old code detected an overlapping allocation even when the
allocations didn't actually overlap, but were only adjacent.

Signed-off-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>...

6f749281 03/28/2013 12:52 pm Kevin Wolf

qemu-iotests: More concurrent allocation scenarios

Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

c349ca4b 03/28/2013 12:52 pm Kevin Wolf

qcow2: Fix "total clusters" number in bdrv_check

This should be based on the virtual disk size, not on the size of the
image.

Interesting observation: With some VM state stored in the image file,
percentages higher than 100% are possible, even though snapshots...

f7c61bf8 03/23/2013 04:23 pm Blue Swirl

Merge branch 'for-upstream' of git://github.com/mwalle/qemu

  • 'for-upstream' of git://github.com/mwalle/qemu:
    configure: rename OpenGL feature to GLX
    configure: proper OpenGL/GLX probe
    target-lm32: use HELPER macro
    target-lm32: flush tlb after clearing env...
f95e26dd 03/19/2013 12:48 pm Stefan Hajnoczi

qemu-iotests: add 052 BDRV_O_SNAPSHOT test

Check that writes to an image opened with BDRV_O_SNAPSHOT do not modify
the underlying image file.

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Kevin Wolf <>

6036e9d8 03/18/2013 08:40 pm Michael Walle

tests: tcg: lm32: add more test cases

Esp. for testing zero/sign extend in compare operations.

Signed-off-by: Michael Walle <>

8b758d05 03/17/2013 02:06 am Petar Jovanovic

target-mips: fix rndrashift_short_acc and code for EXTR_ instructions

Fix for rndrashift_short_acc to set correct value to higher 64 bits.
This change also corrects conditions when bit 23 of the DSPControl register
is set.

The existing test files have been extended with several examples that...

c4d9d196 03/15/2013 05:07 pm Stefan Hajnoczi

threadpool: drop global thread pool

Now that each AioContext has a ThreadPool and the main loop AioContext
can be fetched with bdrv_get_aio_context(), we can eliminate the concept
of a global thread pool from thread-pool.c.

The submit functions must take a ThreadPool* argument....

acbf30ec 03/15/2013 05:07 pm Paolo Bonzini

qemu-iotests: add tests for rebasing zero clusters

If zero clusters are erroneously treated as unallocated, "qemu-img rebase"
will copy the backing file's contents onto the cluster.

The bug existed also in image streaming, but since the root cause was in...

804dd417 03/15/2013 05:07 pm Stefan Hajnoczi

qemu-iotests: use -nographic in test case 007

A comment explains that -nographic hangs test case 007. This is no
longer the case so add -nographic. This makes the test suite faster and
more pleasant to run since no windows pop up.

I am not sure exactly when -nographic starting working for this case but...

eeb29fb9 03/08/2013 11:16 am Cole Robinson

rtc-test: Fix test failures with recent glib

As of glib 2.35.4, glib changed its logic for ordering test cases:

https://bugzilla.gnome.org/show_bug.cgi?id=694487

This was causing failures in rtc-test. Group the reordered test
cases into their own suite, which maintains the original ordering....

20c334a7 03/04/2013 07:15 pm Petar Jovanovic

target-mips: fix DSP overflow macro and affected routines

The previous implementation incorrectly used same macro to detect overflow
for addition and subtraction. This patch makes distinction between these
two, and creates separate macros. The affected routines are changed...

864a556e 02/26/2013 03:44 pm Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

  1. By Paolo Bonzini (7) and others
  2. Via Kevin Wolf
    • kwolf/for-anthony: (22 commits)
      pc: add compatibility machine types for 1.4
      blockdev: enable discard by default
      qemu-nbd: add --discard option...
b1c07f06 02/26/2013 03:44 pm Anthony Liguori

Merge remote-tracking branch 'luiz/queue/qmp' into staging

  1. By Markus Armbruster
  2. Via Luiz Capitulino
    • luiz/queue/qmp:
      check-qjson: More thorough testing of UTF-8 in strings
a345481b 02/23/2013 11:20 pm Petar Jovanovic

target-mips: fix for sign-issue in MULQ_W helper

Correct sign-propagation before multiplication in MULQ_W helper.
The change also fixes previously incorrect expected values in the
tests for MULQ_RS.W and MULQ_S.W.

Signed-off-by: Petar Jovanovic <>...

9c19eb1e 02/23/2013 11:20 pm Petar Jovanovic

target-mips: fix for incorrect multiplication with MULQ_S.PH

The change corrects sign-related issue with MULQ_S.PH. It also includes
extension to the already existing test which will trigger the issue.

Signed-off-by: Petar Jovanovic <>
Signed-off-by: Aurelien Jarno <>

f708e736 02/23/2013 07:21 pm Blue Swirl

Merge branch 'eflags3' of git://github.com/rth7680/qemu

  • 'eflags3' of git://github.com/rth7680/qemu: (61 commits)
    target-i386: Use movcond to implement shiftd.
    target-i386: Discard CC_OP computation in set_cc_op also
    target-i386: Use movcond to implement rotate flags....
e930d201 02/22/2013 10:21 pm Miroslav Rezanina

qemu-iotests: Add qemu-img compare test

Simple test for qemu-img compare to check it's working correctly.

Signed-off-by: Miroslav Rezanina <>
Reviewed-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

4dc9f9d6 02/22/2013 10:21 pm Kevin Wolf

qemu-iotests: Test qcow2 image creation options

Just create lots of images and try out each of the creation options that
qcow2 provides (except backing_file/fmt for now)

I'm not totally happy with the behaviour of qemu-img in each of the
cases, but let's be explicit and update the test when we do change...

02700315 02/22/2013 10:21 pm Paolo Bonzini

coroutine: trim down nesting level in perf_nesting test

20000 nested coroutines require 20 GB of virtual address space.
Only nest 1000 of them so that the test (only enabled with
"-m perf" on the command line) runs on 32-bit machines too.

Cc: ...

e6439d78 02/22/2013 10:21 pm Stefan Hajnoczi

qemu-img: add compressed clusters to BlockFragInfo

Show how many clusters are compressed. This can be used to monitor how
many compressed clusters remain and whether to recompress the image.

Suggested-by: Cole Robinson <>
Signed-off-by: Stefan Hajnoczi <>

c6bb9ad1 02/22/2013 10:21 pm Federico Simoncelli

qemu-img: find the image end offset during check

This patch adds the support for reporting the image end offset (in
bytes). This is particularly useful after a conversion (or a rebase)
where the destination is a block device in order to find the first
unused byte at the end of the image....

3960c41f 02/21/2013 08:17 pm Markus Armbruster

check-qjson: More thorough testing of UTF-8 in strings

Test cases are scraped from Markus Kuhn's UTF-8 decoder capability and
stress test at
http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt

Unfortunately, both JSON parser and formatter misbehave right now....

259dc0c1 02/21/2013 05:38 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

  1. By Alin Tomescu (1) and others
  2. Via Stefan Hajnoczi
    • stefanha/trivial-patches:
      .gitignore: Ignore optionrom/*.asm
      ppc: fix bamboo >256MB RAM initialization in hw/ppc4xx_devs.c
      Add some missing qtest binaries to .gitignore...
499a6165 02/21/2013 11:33 am David Gibson

Add some missing qtest binaries to .gitignore

These binaries are generated during make check on at least some
configurations, so att them to .gitignore.

Signed-off-by: David Gibson <>
Signed-off-by: Stefan Hajnoczi <>

1b99f83e 02/19/2013 01:03 am Paolo Bonzini

test-i386: make it compile with a recent gcc

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Richard Henderson <>

40475087 02/19/2013 01:03 am Paolo Bonzini

test-i386: QEMU_PACKED is not defined here

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Richard Henderson <>

f9b3ed40 02/18/2013 06:20 pm Paolo Bonzini

rtc-test: always set register B in its entirety

Eliminate dependencies between one test and the others.

Signed-off-by: Paolo Bonzini <>
Message-id:
Signed-off-by: Anthony Liguori <>

cc2832a5 02/18/2013 06:20 pm Paolo Bonzini

rtc-test: add testcases for alarms in 12hour mode

Trying (unsuccessfully) to break the device model as mentioned in
https://bugs.launchpad.net/qemu/+bug/1090558.

At least if someone tries to fix that, it won't break what works...

Signed-off-by: Paolo Bonzini <>...

872536bf 02/18/2013 04:39 pm Andreas Färber

qtest: Add MMIO support

Introduce [qtest_]{read,write}[bwlq]() libqtest functions and
corresponding QTest protocol commands to replace local versions in
libi2c-omap.c.

Also convert m48t59-test's cmos_{read,write}_mmio() to {read,write}b().

Signed-off-by: Andreas Färber <>...

6acf801d 02/18/2013 04:39 pm Andreas Färber

libqtest: Convert macros to functions and clean up documentation

libqtest.h provides a number of shortcut macros to avoid tests feeding
it the QTestState they operate on. Most of these can easily be turned
into static inline functions, so let's do that for clarity....

b73cf9e9 02/18/2013 04:39 pm Andreas Färber

libqtest: Introduce qtest_qmpv() and convert remaining macro

In order to convert qmp() macro to an inline function, expose a
qtest_qmpv() function, reused by qtest_qmp().

We can't apply GCC_FMT_ATTR() since fdc-test is using zero-length format
strings, which would result in warnings treated as errors....

f4c0f986 02/17/2013 04:28 pm Richard Henderson

tests: Add unit tests for mulu64 and muls64

Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

d0bce760 02/11/2013 09:22 pm Andreas Färber

libi2c-omap: Fix endianness dependency

The libqos driver for omap_i2c currently does not work on Big Endian.
Introduce helpers for reading from and writing to 16-bit armel registers.

This fixes tmp105-test failures on ppc.

To prepare for a QTest-level endianness solution, poison mem{read,write}...

84eac317 02/11/2013 09:22 pm Andreas Färber

libqtest: Fix documentation copy&paste errors

The [qtest_]in[bwl]() functions/macros don't have a value argument.

Signed-off-by: Andreas Färber <>
Message-id:
Signed-off-by: Anthony Liguori <>

01845438 02/07/2013 05:22 pm Peter Maydell

tests/test-string-input-visitor: Handle errors provoked by fuzz test

It's OK and expected for visitors to return errors when presented with
the fuzz test's random data. Since the fuzzer doesn't care about
errors, we pass in NULL rather than an Error**. This fixes a bug in...

e3f9fe2d 02/04/2013 10:38 pm Eduardo Habkost

cutils: unsigned int parsing functions

There are lots of duplicate parsing code using strto*() in QEMU, and
most of that code is broken in one way or another. Even the visitors
code have duplicate integer parsing code1. This introduces functions
to help parsing unsigned int values: parse_uint() and parse_uint_full()....

baeddded 02/01/2013 10:45 pm Anthony Liguori

sparc: disable qtest in make check

We've seen this repeatedly in buildbot but I can now reliably
reproduce it myself too. With a few hundred runs of 'make check',
qemu-system-sparc will hang consuming 100% CPU. I've attached GDB
to the hung process and unfortunately, I can't get anything useful...

77a5f4f2 02/01/2013 10:40 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/block' into staging

  1. By Kevin Wolf (7) and others
  2. Via Stefan Hajnoczi
    • stefanha/block:
      block/raw-posix: Build fix for O_ASYNC
      vmdk: Allow space in file name
      parallels: Fix bdrv_open() error handling
      dmg: Use g_free instead of free...
6bf00766 02/01/2013 06:43 pm Eduardo Habkost

libqtest: Wait for the right child PID after killing QEMU

When running "make check" with gcov enabled, we get the following
message:

hw/tmp105.gcda:cannot open data file, assuming not executed

The problem happens because:

  • tmp105-test exits before QEMU exits, because waitpid() at...
b93d6d24 02/01/2013 03:58 pm Kevin Wolf

qemu-iotests: Add regression test for b7ab0fea

It turned out that the change in b7ab0fea was actually a real qcow2
corruption fix. This is a reproducer for the bug.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

a04eca10 02/01/2013 03:58 pm Vishvananda Ishaya

block: Adds mirroring tests for resized images

This test verifies two mirroring issues are fixed with resized images:

  • sync='top' creates an image that is the proper size
  • sync='full' doesn't cause an assertion failure and crash qemu
    Reviewed-by: Paolo Bonzini <>...
21e3cd29 02/01/2013 09:32 am Orit Wasserman

Add XBZRLE testing

Signed-off-by: Orit Wasserman <>
Reviewed-by: Paolo Bonzini <>

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>

e62a214c 02/01/2013 12:42 am Petar Jovanovic

target-mips: fix incorrect test for MTHLIP

The pos field in the DSPControl register is not correctly initialized.
Per documentation, the result of MTHLIP is unpredictable if the value of the
pos field before the execution is greater than 32.

Signed-off-by: Petar Jovanovic <>...

a05ddd92 01/30/2013 12:18 pm Andreas Färber

tests: Fix {rtc, m48t59}-test build on illumos

Struct tm does not have tm_gmtoff field on illumos.
Fix the build by not zero-initializing these fields on Solaris.

Cc:
Signed-off-by: Andreas Färber <>
Signed-off-by: Stefan Hajnoczi <>

ec9466ff 01/28/2013 10:48 pm Anthony Liguori

Merge remote-tracking branch 'afaerber/qom-cpu' into staging

  • afaerber/qom-cpu: (37 commits)
    kvm: Pass CPUState to kvm_on_sigbus_vcpu()
    cpu: Unconditionalize CPUState fields
    target-m68k: Use type_register() instead of type_register_static()
    target-unicore32: Use type_register() instead of type_register_static()...
503cb22e 01/28/2013 10:46 pm Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

  1. By Paolo Bonzini (14) and others
  2. Via Kevin Wolf
    • kwolf/for-anthony: (24 commits)
      ide: Add fall through annotations
      block: Create proper size file for disk mirror
      ahci: Add migration support...
247c9de1 01/27/2013 03:34 pm Eduardo Habkost

target-i386: Topology & APIC ID utility functions

This introduces utility functions for the APIC ID calculation, based on:
Intel® 64 Architecture Processor Topology Enumeration
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/...

c5cd02ba 01/26/2013 03:52 pm Andreas Färber

tests: Add gcov support for x86_64 qtest

Since x86_64 is a superset of i386 and reuses all its test cases, adopt
all the i386 gcov source files as well, substituting their paths
appropriately.

Signed-off-by: Andreas Färber <>
Signed-off-by: Blue Swirl <>

cba040c2 01/26/2013 03:52 pm Andreas Färber

tests: Add gcov support for sparc64 qtest

m48t59-test is individually being executed for sparc and sparc64, so add
the gcov source file for sparc64 as well.

Signed-off-by: Andreas Färber <>
Signed-off-by: Blue Swirl <>