[LTP] [PATCH 2/3] nfs03.sh: Wait for all files to be removed
Martin Doucha
mdoucha@suse.cz
Tue Sep 19 13:46:58 CEST 2023
A race condition between the two parallel calls of rm_files may cause
NFS unmount to fail and then the NFS client will get confused by remote
filesystem change which leads to strange failures. Make sure both
rm_files calls finish before returning from the main test function.
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
testcases/network/nfs/nfs_stress/nfs03.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/testcases/network/nfs/nfs_stress/nfs03.sh b/testcases/network/nfs/nfs_stress/nfs03.sh
index e5f4de67c..e9ef5fb78 100755
--- a/testcases/network/nfs/nfs_stress/nfs03.sh
+++ b/testcases/network/nfs/nfs_stress/nfs03.sh
@@ -66,11 +66,13 @@ do_test()
cd ../dir1
wait $pid1
rm_files &
+ pid3=$!
tst_res TINFO "cd dir2 & removing files"
cd ../dir2
wait $pid2
rm_files
+ wait $pid3
tst_res TPASS "test done"
}
--
2.42.0
More information about the ltp
mailing list