1. 19 2月, 2014 2 次提交
    • S
      qtest: make QEMU our direct child process · cef60c92
      Stefan Hajnoczi 提交于
      qtest_init() cannot use exec*p() to launch QEMU since the exec*p()
      functions take an argument array while qtest_init() takes char
      *extra_args.  Therefore we execute /bin/sh -c <command-line> and let the
      shell parse the argument string.
      
      This left /bin/sh as our child process and our child's child was QEMU.
      We still want QEMU's pid so the -pidfile option was used to let QEMU
      report its pid.
      
      The pidfile needs to be unlinked when the test case exits or fails.  In
      other words, the pidfile creates a new problem for us!
      
      Simplify all this using the shell 'exec' command.  It allows us to
      replace the /bin/sh process with QEMU.  Then we no longer need to use
      -pidfile because we already know our fork child's pid.
      
      Note: Yes, it seems silly to exec /bin/sh when we could just exec QEMU
      directly.  But remember qtest_init() takes a single char *extra_args
      command-line fragment instead of a real argv[] array, so we need
      /bin/sh's argument parsing behavior.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      cef60c92
    • S
      98f9e35b
  2. 03 2月, 2014 2 次提交
  3. 19 11月, 2013 1 次提交
    • A
      qtest: Use -display none by default · 2ad645d2
      Andreas Färber 提交于
      This avoids each test needing to add it to suppress windows popping up.
      
      [Commit 7ceeedd0 ("blockdev-test: add
      test case for drive_add duplicate IDs") and commit
      43cd2098 ("qdev-monitor-test: add
      device_add leak test cases") added qtest tests without specifying
      -display none.
      
      As a result, "make check" now tries to use graphics (GTK or SDL).  Since
      graphics are not used by the test and inappropriate for headless "make
      check" runs, add the missing -display none.
      
      This fixes "make check" in the QEMU buildbot.
      -- Stefan]
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      2ad645d2
  4. 07 11月, 2013 2 次提交
  5. 19 7月, 2013 1 次提交
  6. 01 5月, 2013 1 次提交
  7. 17 4月, 2013 1 次提交
  8. 18 2月, 2013 2 次提交
  9. 02 2月, 2013 1 次提交
    • E
      libqtest: Wait for the right child PID after killing QEMU · 6bf00766
      Eduardo Habkost 提交于
      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
         qtest_quit() fails;
       * waitpid() fails because there's another process already
         waiting for the QEMU process;
       * The process that is already waiting for QEMU is the child created by
         qtest_init() to run system();
       * qtest_quit() is incorrectly waiting for the QEMU PID directly instead
         of the child created by qtest_init().
      
      This fixes the problem by sending SIGTERM to QEMU, but waiting for the
      child process created by qtest_init() (that exits immediately after QEMU
      exits).
      Reported-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6bf00766
  10. 19 12月, 2012 1 次提交
  11. 05 10月, 2012 1 次提交
    • P
      qtest: implement QTEST_STOP · e0fea6b1
      Paolo Bonzini 提交于
      It is quite difficult to debug qtest test cases without extra wrapper
      scripts for QEMU or similar.  This patch adds a simple environment
      variable-based trigger that sends a STOP signal to the QEMU instance
      under test, before attempting to connect to its QMP session.
      
      This will block execution of the testcase and give time to attach a
      debugger to the stopped QEMU process.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      e0fea6b1
  12. 09 7月, 2012 1 次提交
  13. 28 6月, 2012 1 次提交
    • A
      qtest: fix infinite loop when QEMU aborts abruptly · 039380a8
      Anthony Liguori 提交于
      From Markus:
      
      Makes "make check" hang:
      
          QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 gtester -k --verbose -m=quick tests/crash-test tests/rtc-test
          TEST: tests/crash-test... (pid=972)
          qemu-system-x86_64: Device needs media, but drive is empty
      [Nothing happens, wait a while, then hit ^C]
          make: *** [check-qtest-x86_64] Interrupt
      
      This was due to the fact that we weren't checked for errors when
      reading from the QMP socket.  This patch adds appropriate error
      checking.
      Reported-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      039380a8
  14. 22 6月, 2012 1 次提交
  15. 10 5月, 2012 1 次提交
  16. 27 4月, 2012 1 次提交
  17. 24 4月, 2012 1 次提交
  18. 30 3月, 2012 1 次提交