]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic/032: fix failure due to attempt to wait for non-child process
authorFilipe Manana <fdmanana@suse.com>
Wed, 28 May 2025 11:42:20 +0000 (12:42 +0100)
committerZorro Lang <zlang@kernel.org>
Fri, 20 Jun 2025 16:46:47 +0000 (00:46 +0800)
commitec9a19e726974bf726b75f15ab01b6ecb483d2aa
tree5c1b1417c9a3fc7d0d590313577cabb297178eb0
parent3893dd152f1c915d711bb24bffbc685a3ba06747
generic/032: fix failure due to attempt to wait for non-child process

Running generic/032 can sporadically fail like this:

  generic/032 11s ... - output mismatch (see /home/fdmanana/git/hub/xfstests/results//generic/032.out.bad)
      --- tests/generic/032.out   2023-03-02 21:47:53.884609618 +0000
      +++ /home/fdmanana/git/hub/xfstests/results//generic/032.out.bad    2025-05-28 10:39:34.549499493 +0100
      @@ -1,5 +1,6 @@
       QA output created by 032
       100 iterations
      +/home/fdmanana/git/hub/xfstests/tests/generic/032: line 90: wait: pid 3708239 is not a child of this shell
       000000 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd  >................<
       *
       100000
      ...
      (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/generic/032.out /home/fdmanana/git/h

This is because we are attempting to wait for a process that is not a
child process of the test process and it's instead a child of a process
spawned by the test.

To make sure that after we kill the process running _syncloop() there
isn't any xfs_io process still running syncfs, add instead a trap to
to _syncloop() that waits for xfs_io to finish before the process running
that function exits.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/032