qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 98f9e3: qtest: drop unused child_pid field


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 98f9e3: qtest: drop unused child_pid field
Date: Fri, 21 Feb 2014 07:30:06 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 98f9e35befe5c11e3da448cbe015969ed91730a4
      
https://github.com/qemu/qemu/commit/98f9e35befe5c11e3da448cbe015969ed91730a4
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-02-19 (Wed, 19 Feb 2014)

  Changed paths:
    M tests/libqtest.c

  Log Message:
  -----------
  qtest: drop unused child_pid field

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>


  Commit: cef60c925c41563721dc73b1ace7b2f399f72a5b
      
https://github.com/qemu/qemu/commit/cef60c925c41563721dc73b1ace7b2f399f72a5b
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-02-19 (Wed, 19 Feb 2014)

  Changed paths:
    M tests/libqtest.c

  Log Message:
  -----------
  qtest: make QEMU our direct child process

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: Stefan Hajnoczi <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>


  Commit: b15d422a23a3e4cf1b4195af209211eccdb88d51
      
https://github.com/qemu/qemu/commit/b15d422a23a3e4cf1b4195af209211eccdb88d51
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2014-02-19 (Wed, 19 Feb 2014)

  Changed paths:
    M tests/libqtest.c

  Log Message:
  -----------
  qtest: kill QEMU process on g_assert() failure

The QEMU process stays running if the test case fails.  This patch fixes
the leak by installing a SIGABRT signal handler which invokes
qtest_end().

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>


  Commit: 3e890c77cf038d8c2de66ed7996fe77a6f94787c
      
https://github.com/qemu/qemu/commit/3e890c77cf038d8c2de66ed7996fe77a6f94787c
  Author: Peter Maydell <address@hidden>
  Date:   2014-02-21 (Fri, 21 Feb 2014)

  Changed paths:
    M tests/libqtest.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/stefanha/tags/qtest-monitor-process-pull-request' into staging

qtest resource cleanup pull request

# gpg: Signature made Wed 19 Feb 2014 14:46:34 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <address@hidden>"
# gpg:                 aka "Stefan Hajnoczi <address@hidden>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/qtest-monitor-process-pull-request:
  qtest: kill QEMU process on g_assert() failure
  qtest: make QEMU our direct child process
  qtest: drop unused child_pid field

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/7a87a7b3e421...3e890c77cf03

reply via email to

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