• 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
058 4.1 KB