Statistics
| Branch: | Revision:

root / tests @ f8ce0403

# Date Author Comment
23ea2ecc 08/06/2013 04:27 pm Stefan Hajnoczi

qemu-iotests: add poke_file utility function

The new poke_file function sets bytes at an offset in a file given a
printf-style format string. It can be used to corrupt an image file for
test coverage of error paths.

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

ca6cbb65 08/06/2013 04:27 pm Fam Zheng

qemu-iotests: add empty test case for vmdk

Will add vmdk specific tests later here.

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

8aa1331c 08/06/2013 04:27 pm Fam Zheng

vmdk: check granularity field in opening

Granularity is used to calculate the cluster size and allocate r/w
buffer. Check the value from image before using it, so we don't abort()
for unbounded memory allocation.

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

f8ce0403 08/06/2013 04:27 pm Fam Zheng

vmdk: check l2 table size when opening

header.num_gtes_per_gte determines size for L2 table. Check for too big
value before using it. Limit to 512M entries (2GB per one L2 table).

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

9580498b 08/06/2013 11:41 am Stefan Hajnoczi

qemu-iotests: filter QEMU version in monitor banner

Filter out the QEMU monitor version banner so that tests do not break
when the QEMU version number is changed.

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

64160cd2 08/05/2013 04:06 pm Anthony Liguori

Merge remote-tracking branch 'filippov/tags/20130729-xtensa' into staging

xtensa queue 2013-07-29

  • filippov/tags/20130729-xtensa:
    target-xtensa: check register window inline
    target-xtensa: don't generate dead code to access invalid SRs
    tests/tcg/xtensa: Fix out-of-tree build...
8afaefb8 08/02/2013 07:21 pm Kevin Wolf

block: Disable driver-specific options for 1.6

We don't want to commit to the API yet before everything is worked out.
Like already for 1.5, disable it again for the 1.6 release. This commit
is meant to be reverted after the 1.6 release.

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

beb3faaa 07/30/2013 06:48 pm Petar Jovanovic

target-mips: correct the values in the DSP tests

Five tests files for DSP instructions had wrong expected values in the tests.
This change fixes this, and this has been cross-checked by running the same
test binaries on Malta 74K board.

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

9213aa53 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Reject invalid characters in schema file

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id:
Signed-off-by: Anthony Liguori <>

6974ccd5 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Fix schema parser to check syntax systematically

Fixes at least the following parser bugs:

  • accepts any token in place of a colon
  • treats comma as optional
  • crashes when closing braces or brackets are missing

Signed-off-by: Markus Armbruster <>...

5f3cd2b7 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Fix diagnosing non-objects at a schema's top-level

Report syntax error instead of crashing.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id: ...

f1a145e1 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Permit comments starting anywhere on the line

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id:
Signed-off-by: Anthony Liguori <>

98626572 07/29/2013 06:37 pm Markus Armbruster

tests: QAPI schema parser tests

The parser handles erroneous input badly. To be improved shortly.

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

4f193e34 07/29/2013 06:37 pm Markus Armbruster

tests: Use qapi-schema-test.json as schema parser test

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id:
Signed-off-by: Anthony Liguori <>

c7a3f252 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Restructure lexer and parser

The parser has a rather unorthodox structure:

Until EOF:
Read a section:
Generator function get_expr() yields one section after the
other, as a string. An unindented, non-empty line that...
2caba36c 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Decent syntax error reporting

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id:
Signed-off-by: Anthony Liguori <>

aaa2ebc5 07/29/2013 05:35 pm Andreas Färber

tests/tcg/xtensa: Fix out-of-tree build

Signed-off-by: Andreas Färber <>
Signed-off-by: Max Filippov <>

7be9d0e6 07/29/2013 05:24 pm Max Filippov

target-xtensa: add extui unit test

Signed-off-by: Max Filippov <>

461bdb34 07/29/2013 10:03 am Aurelien Jarno

Merge branch 'trivial-patches' of git://git.corpit.ru/qemu

  • 'trivial-patches' of git://git.corpit.ru/qemu:
    target-mips: Remove assignment to a variable which is never used
    misc: Use g_assert_not_reached for code which is expected to be unreachable
    qemu-options: mention C-a h in the -nographic doc...
b6a9f468 07/29/2013 08:48 am Petar Jovanovic

target-mips: fix mipsdsp_mul_q31_q31

Multiplication of two fractional word elements is not correct when sign
extension/promotion is needed. This change fixes it by adding correct
casts from unsigned to signed values.
In addition, the tests (dpaq_sa_l_w.c and dpsq_sa_l_w.c) have been extended...

d36c231f 07/29/2013 01:27 am Petar Jovanovic

target-mips: fix mipsdsp_trunc16_sat16_round

This change corrects rounding and saturation of Q31 fractional value in
mipsdsp_trunc16_sat16_round(). Overflow detection was incorrect for the
corner case for PRECRQ_RS.PH, and this test case is also part of the change....

4877866e 07/28/2013 07:26 pm Petar Jovanovic

target-mips: fix multiplication in mipsdsp_rndq15_mul_q15_q15

Multiplication of Q15 fractional halfword vectors was incorrect in the
previous implementation of mipsdsp_rndq15_mul_q15_q15. It failed to take
element signs into account. This change fixes it, and it adds a test case...

dfc6f865 07/27/2013 10:22 am Stefan Weil

misc: Use g_assert_not_reached for code which is expected to be unreachable

The macro g_assert_not_reached is a better self documenting replacement
for assert(0) or assert(false).

Signed-off-by: Stefan Weil <>
Signed-off-by: Michael Tokarev <>

e3409362 07/26/2013 11:01 pm Ian Main

Add tests for sync modes 'TOP' and 'NONE'

This patch adds tests for sync modes top and none. Test for 'TOP'
is separated out as it requires a backing file. Also added a test
for invalid format.

Signed-off-by: Ian Main <>
Signed-off-by: Kevin Wolf <>

0f227a94 07/26/2013 11:01 pm Kevin Wolf

blockdev: Rename 'readonly' option to 'read-only'

Option name cleanup before it becomes a QMP API.

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

64aa99d3 07/26/2013 10:59 pm Kevin Wolf

qcow2: Use dashes instead of underscores in options

This is what QMP wants to use. The options haven't been enabled in any
release yet, so we're still free to change them.

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

8fefa31b 07/25/2013 04:12 pm Paolo Bonzini

qtest: add test for ISA I/O space endianness

This writes a register and reads its 1/2/4 byte parts. Masking
is done in the device model.

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

d2f5ea97 07/25/2013 04:12 pm Paolo Bonzini

pc-testdev: add I/O port to test memory.c auto split/combine

The ports at 0xe8..0xeb have impl.min/max_access_size == 1, so
that memory accesses are split and combined by the memory core.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Anthony Liguori <>...

3464700f 07/22/2013 11:41 pm Peter Maydell

tests: Add test-bitops.c with some sextract tests

Add some simple test cases for the new sextract32
and sextract64 functions.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>
Message-id: ...

aea6a169 07/18/2013 09:27 pm Markus Armbruster

boot-order-test: Better separate target-specific and generic parts

The initial version did just PC. I didn't bother to separate out
generic parts, because I don't like to abstract from a single case.

Now we have two cases, PC and PowerMac, and I'm about to add more....

484986e2 07/18/2013 09:27 pm Markus Armbruster

boot-order-test: Code motion for better readability

Cc: Andreas Färber <>
Cc: Alexander Graf <>
Cc:
Signed-off-by: Markus Armbruster <>
Message-id: ...

e99f87cc 07/18/2013 09:27 pm Markus Armbruster

boot-order-test: Add tests for PowerPC PREP

Cc: Andreas Färber <>
Cc: Alexander Graf <>
Cc:
Signed-off-by: Markus Armbruster <>
Message-id: ...

f88dc7dd 07/18/2013 09:27 pm Markus Armbruster

boot-order-test: Add tests for Sun4m

Cc: Blue Swirl <>
Signed-off-by: Markus Armbruster <>
Message-id:
Signed-off-by: Anthony Liguori <>

26491a38 07/18/2013 09:27 pm Markus Armbruster

libqos: Generalize I/O-mapped fw_cfg

Provide a constructor that takes the base address in addition to the
PC-specific one.

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

24943978 07/18/2013 09:27 pm Markus Armbruster

boot-order-test: Add tests for Sun4u

Cc: Blue Swirl <>
Signed-off-by: Markus Armbruster <>
Message-id:
Signed-off-by: Anthony Liguori <>

edbd790d 07/18/2013 09:27 pm Markus Armbruster

boot-order-test: New; covering just PC for now

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

db2b5500 07/18/2013 09:27 pm Anthony Liguori

libqos: include dependencies

Otherwise rebuilds can fail when libqos is modified.

Reported-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>
Signed-off-by: Markus Armbruster <>
Message-id: ...

7a100165 07/18/2013 09:27 pm Markus Armbruster

libqos: Add support for memory-mapped fw_cfg

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

530a7e48 07/18/2013 09:27 pm Andreas Färber

boot-order-test: Add tests for PowerMacs

They set the boot device via fw_cfg, which is then translated to a boot
path of "hd" or "cd" in OpenBIOS.

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

995b0e13 07/18/2013 09:27 pm Markus Armbruster

boot-order-test: Cover -boot once in ppc tests

Cc: Andreas Färber <>
Cc: Alexander Graf <>
Cc:
Signed-off-by: Markus Armbruster <>
Message-id: ...

1d9358e6 07/18/2013 07:32 pm Markus Armbruster

libqtest: New qtest_end() to go with qtest_start()

Signed-off-by: Markus Armbruster <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Anthony Liguori <>
Message-id: ...

fdd26fca 07/18/2013 07:32 pm Markus Armbruster

libqtest: Plug fd and memory leaks in qtest_quit()

Reviewed-by: Anthony Liguori <>
Signed-off-by: Markus Armbruster <>
Reviewed-by: Andreas Färber <>
Message-id: ...

b53169ea 07/15/2013 10:49 am Stefan Hajnoczi

blockdev: add sync mode to drive-backup QMP command

The drive-backup command is similar to the drive-mirror command, except
no guest data written after the command executes gets copied. Add a
sync mode argument which determines whether the entire disk is copied,...

98289620 07/15/2013 10:49 am Kevin Wolf

block: Don't parse protocol from file.filename

One of the major reasons for doing something new for -blockdev and
blockdev-add was that the old block layer code parses filenames instead
of just taking them literally. So we should really leave it untouched...

7a370406 07/15/2013 10:49 am Kevin Wolf

qemu-iotests: Update 051 reference output

This has been broken by commit bd5c51ee.

Signed-off-by: Kevin Wolf <>

5444e768 07/04/2013 06:42 pm Paolo Bonzini

add a header file for atomic operations

We're already using them in several places, but __sync builtins are just
too ugly to type, and do not provide seqcst load/store operations.

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

6046c620 07/02/2013 09:17 am Paolo Bonzini

int128: optimize and add test cases

For add, the carry only requires checking one of the arguments.
For sub and neg, we can similarly optimize computation of the
carry.

For ge, we can just do lexicographic order.

Signed-off-by: Paolo Bonzini <>

0dbe8a1b 06/28/2013 10:20 am Stefan Hajnoczi

qemu-iotests: extract wait_until_completed() into iotests.py

The 'drive-mirror' tests often issue 'block-job-complete' and wait for
the QMP completion event. Other types of block jobs also want to wait
for completion but they may not need to issue 'block-job-complete'....

e5ca8fdd 06/28/2013 10:20 am Stefan Hajnoczi

qemu-iotests: add 055 drive-backup test case

Testing drive-backup is similar to image streaming and drive mirroring.
This test case is based on 041.

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

492fdc6f 06/24/2013 11:25 am Kevin Wolf

Revert "block: Disable driver-specific options for 1.5"

This reverts commit 8ec7d390b0d50b5e5b4b1d8dba7ba40d64a70875.

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

22bfa16e 06/14/2013 09:08 pm Michael Roth

ide-test: fix failure for test_flush

bd07684aacfb61668ae2c25b7dd00b64f3d7c7f3 added a test to ensure BSY
flag is set when a flush request is in flight. It does this by setting
a blkdebug breakpoint on flush_to_os before issuing a CMD_FLUSH_CACHE.
It then resumes CMD_FLUSH_CACHE operation and checks that BSY is unset....

bd07684a 06/06/2013 12:27 pm Kevin Wolf

ide-test: Add FLUSH CACHE test case

This checks in particular that BSY is set while the flush request is in
flight.

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

c27d5656 06/06/2013 12:27 pm Kevin Wolf

ide-test: Add enum value for DEV

Get rid of the magic number.

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

5e00984a 06/06/2013 12:27 pm Kevin Wolf

cutils: Support 'P' and 'E' suffixes in strtosz()

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

ecc1c88e 06/04/2013 01:11 pm Stefan Hajnoczi

qemu-iotests: make assert_no_active_block_jobs() common

Tests 030 and 041 both use query-block-jobs to check whether any block
jobs are active. Make this code common so that 'drive-backup' and other
new feature tests will be able to reuse it.

Suggested-by: Kevin Wolf <>...

2575fe16 06/04/2013 01:11 pm Stefan Hajnoczi

qemu-iotests: make cancel_and_wait() common

The cancel_and_wait() function has been duplicated in 030 and 041. Move
it into iotests.py and let it return the event so tests can perform
additional asserts.

Note that 041's cancel_and_wait(wait_ready=True) is replaced by...

3a3918c3 06/04/2013 01:11 pm Stefan Hajnoczi

qemu-iotests: make compare_images() common

The iotests.compare_images() function returns True if two image files
have the identical data. Previously this was implemented by converting
images to raw and then comparing their contents using Python. Since
"qemu-img compare" is now available and is more efficient, switch to it....

2499a096 06/04/2013 01:11 pm Stefan Hajnoczi

qemu-iotests: make create_image() common

Both 030 and 041 use create_image(). Move it to iotests.py.

Also drop ImageStreamingTestCase since the class now has no methods.

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

8ddd08c5 06/04/2013 01:11 pm Stefan Hajnoczi

qemu-iotests: fix 054 cluster size help output

Commit f3f4d2c09b9cf46903ba38425ec46c44185162bd added a hint to increase
the cluster size when a large image cannot be created. Test 054 now has
outdated output and fails because the golden output does not match....

a678e26c 05/30/2013 04:08 pm Michael Roth

qapi: pad GenericList value fields to 64 bits

With the introduction of native list types, we now have types such as
int64List where the 'value' field is not a pointer, but the actual
64-bit value.

On 32-bit architectures, this can lead to situations where 'next' field...

04129606 05/29/2013 04:16 pm Stefan Hajnoczi

tests: set MALLOC_PERTURB_ to expose memory bugs

glibc wipes malloc(3) memory when the MALLOC_PERTURB_ environment
variable is set. The value of the environment variable determines the
bit pattern used to wipe memory. For more information, see
http://udrepper.livejournal.com/11429.html....

c93331c9 05/24/2013 05:17 pm Kevin Wolf

qcow2.py: Subcommand for changing header fields

Signed-off-by: Kevin Wolf <>

bd91ecbf 05/24/2013 05:17 pm Kevin Wolf

qemu-iotests: Try creating huge qcow2 image

It's supposed to fail gracefully instead of segfaulting.

Signed-off-by: Kevin Wolf <>

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 <>

83c84667 05/23/2013 04:44 pm Michael Roth

qapi: add native list coverage for QMP output visitor tests

This exercises schema-generated visitors for native list types and does
some sanity checking on validity of serialized data.

Signed-off-by: Michael Roth <>
Reviewed-by: Laszlo Ersek <>...

199e0f17 05/23/2013 04:44 pm Michael Roth

qapi: add native list coverage for QMP input visitor tests

This exercises schema-generated visitors for native list types and does
some sanity checking on validity of deserialized data.

Signed-off-by: Michael Roth <>
Reviewed-by: Laszlo Ersek <>...

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....

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: