[LTP] [PATCH 2/3] nfs03.sh: Wait for all files to be removed

Martin Doucha mdoucha@suse.cz
Wed Sep 20 12:50:44 CEST 2023


On 20. 09. 23 9:59, Richard Palethorpe wrote:
> Hello,
> 
> Martin Doucha <mdoucha@suse.cz> writes:
> 
>> 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.
> 
> You mean unmounting fails if there are still operations in progress?
> 
> Like does umount fail with EBUSY?

Yes, the unmount will fail with EBUSY. Then the test filesystem gets 
deleted while still mounted over NFS and a new NFS mount gets added on 
top. Then the NFS client randomly gets confused and complains about fsid 
change.

> 
>>
>> 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
> 
> 

-- 
Martin Doucha   mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic



More information about the ltp mailing list