1. 08 3月, 2019 1 次提交
  2. 20 11月, 2018 1 次提交
  3. 26 10月, 2018 1 次提交
  4. 15 5月, 2018 1 次提交
    • M
      iotests: Add failure matching to common.qemu · 81c6ddf4
      Max Reitz 提交于
      Currently, common.qemu only allows to match for results indicating
      success.  The only way to fail is by provoking a timeout.  However,
      sometimes we do have a defined failure output and can match for that,
      which saves us from having to wait for the timeout in case of failure.
      Because failure can sometimes just result in a _notrun in the test, it
      is actually important to care about being able to fail quickly.
      
      Also, sometimes we simply do not get any specific output in case of
      success.  The only way to handle this currently would be to define an
      error message as the string to look for, which means that actual success
      results in a timeout.  This is really bad because it unnecessarily slows
      down a succeeding test.
      
      Therefore, this patch adds a new parameter $success_or_failure to
      _timed_wait_for and _send_qemu_cmd.  Setting this to a non-empty string
      makes both commands expect two match parameters: If the first matches,
      the function succeeds.  If the second matches, the function fails.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 20180406151731.4285-2-mreitz@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      81c6ddf4
  5. 22 11月, 2017 1 次提交
  6. 06 10月, 2017 2 次提交
  7. 11 7月, 2017 1 次提交
  8. 26 6月, 2017 1 次提交
  9. 27 4月, 2017 1 次提交
  10. 12 2月, 2017 1 次提交
  11. 11 11月, 2016 1 次提交
  12. 03 2月, 2016 1 次提交
  13. 11 11月, 2015 1 次提交
    • J
      qemu-iotests: fix cleanup of background processes · f6c8c2e0
      Jeff Cody 提交于
      Commit 934659c4 switched the iotests to run qemu and qemu-nbd from a bash
      subshell, in order to catch segfaults.  Unfortunately, this means the
      process PID cannot be captured via '$!'. We stopped killing qemu and
      qemu-nbd processes, leaving a lot of orphaned, running qemu processes
      after executing iotests.
      
      Since the process is using exec in the subshell, the PID is the
      same as the subshell PID.
      
      Track these PIDs for cleanup using pidfiles in the $TEST_DIR. Only
      track the qemu PID, however, if requested - not all usage requires
      killing the process.
      Reported-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Message-id: 9e4f958b3895b7259b98d845bb46f000ba362869.1446232490.git.jcody@redhat.com
      [mreitz@redhat.com: Replaced '! -z "..."' by '-n "..."']
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      f6c8c2e0
  14. 05 9月, 2015 1 次提交
    • B
      qemu-iotests: disable default qemu devices for cross-platform compatibility · 2711fd33
      Bo Tu 提交于
      This patch fixes an io test suite issue that was introduced with the
      commit c88930a6 'qemu-char: Permit only
      a single "stdio" character device'. The option supresses the creation of
      default devices such as the floopy and cdrom. Output files for test case
      067, 071, 081 and 087 need to be updated to accommodate this change.
      Use virtio-blk instead of virtio-blk-pci as the device driver for test
      case 067. For virtio-blk-pci is the same with virtio-blk as device
      driver but other platform such as s390 may not recognize the virtio-blk-pci.
      
      The default devices differ across machines. As the qemu output often
      contains these devices (or events for them, like opening a CD tray on
      reset), the reference output currently is rather machine-specific.
      
      All existing qemu tests explicitly configure the devices they're working
      with, so just pass -nodefaults to qemu by default to disable the default
      devices. Update the reference outputs accordingly.
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NMichael Mueller <mimu@linux.vnet.ibm.com>
      Reviewed-by: NSascha Silbe <silbe@linux.vnet.ibm.com>
      Signed-off-by: NXiao Guang Chen <chenxg@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      2711fd33
  15. 16 2月, 2015 1 次提交
  16. 10 12月, 2014 1 次提交
  17. 25 6月, 2014 1 次提交
  18. 10 5月, 2014 1 次提交
    • J
      block: qemu-iotests - add common.qemu, for bash-controlled qemu tests · e940bc13
      Jeff Cody 提交于
      This creates some common functions for bash language qemu-iotests
      to control, and communicate with, a running QEMU process.
      
      4 functions are introduced:
      
          1. _launch_qemu()
              This launches the QEMU process(es), and sets up the file
              descriptors and fifos for communication.  You can choose to
              launch each QEMU process listening for either QMP or HMP
              monitor.  You can call this function multiple times, and
              save the handle returned from each.  The returned handle is
              in $QEMU_HANDLE.  You must copy this value.
      
      Commands 2 and 3 use the handle received from _launch_qemu(), to talk
      to the appropriate process.
      
          2. _send_qemu_cmd()
              Sends a command string, specified by $2, to QEMU.  If $3 is
              non-NULL, _send_qemu_cmd() will wait to receive $3 as a
              required result string from QEMU.  Failure to receive $3 will
              cause the test to fail.  The command can optionally be retried
              $qemu_cmd_repeat number of times.  Set $qemu_error_no_exit
              to not force the test the fail on exit; in this case,
              $QEMU_STATUS[$1] will be set to -1 on failure.
      
          3. _timed_wait_for()
              Waits for a response, for up to a default of 10 seconds.  If
              $2 is not seen in that time (anywhere in the response), then
              the test fails.  Primarily used by _send_qemu_cmd, but could
              be useful standalone, as well.  To prevent automatic exit
              (and therefore test failure), set $qemu_error_no_exit to a
              non-NULL value.  If $silent is a non-NULL value, then output
              to stdout will be suppressed.
      
          4. _cleanup_qemu()
              Kills the running QEMU processes, and removes the fifos.
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      e940bc13