X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=blobdiff_plain;f=tests%2Fbtrfs%2F079;h=1e9411be79ed7c32d92e83c4a046cecd0177d3c3;hp=e848a26159b32884eb5da0201f2bfec18bd23131;hb=4f7f6f1cf1b206ab17197e38eb0d732e3f2f43eb;hpb=332232b37f4da8e3ecd07f80574d3203c6541cfd diff --git a/tests/btrfs/079 b/tests/btrfs/079 index e848a261..1e9411be 100755 --- a/tests/btrfs/079 +++ b/tests/btrfs/079 @@ -77,6 +77,12 @@ _filter_error() { } fiemap_work() { + # Wait for any running 'filefrag' subcommand before exitting so that + # after the test kills the subshell running this function, it does not + # fail with EBUSY when unmounting the scratch device because the filefrag + # subcommand is still running with an open file on the scratch fs. + trap "wait; exit" SIGTERM + filename=$1 while true; do $FILEFRAG_PROG $filename 2> $tmp.output 1> /dev/null