If the test is executed on NFS, it may print: rm: cannot remove `/mnt/ltp-xeJYpESVKz/acltest01.fCogoo4gn0': Directory not empty
It seems the following happen: 1. After 'unmount -d' 'acltest01.fCogoo4gn0/blkext3' is still in use by udev. See kernel commit a1ecac3b0656a68259927c234e505804d33a7b83 ("loop: Make explicit loop device destruction lazy") 2. Due to the "NFS silly rename" feature, command 'rm -f acltest01.fCogoo4gn0/blkext3' renames 'blkext3' to '.nfs*' 3. The removal of 'acltest01.fCogoo4gn0' directory fails, because it still contains this '.nfs*' file. Intorucing a wait cycle should fix this problem. Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmansk...@oracle.com> --- It's a follow up to: http://sourceforge.net/p/ltp/mailman/message/32987268/ Indeed, 'sync' was wrong there. testcases/kernel/fs/acls/acl_test01 | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/testcases/kernel/fs/acls/acl_test01 b/testcases/kernel/fs/acls/acl_test01 index 4dc15ef..b4c2c70 100755 --- a/testcases/kernel/fs/acls/acl_test01 +++ b/testcases/kernel/fs/acls/acl_test01 @@ -99,6 +99,22 @@ do_cleanup() { MOUNT_POINT=$(readlink -f "mount-ext3") mount | grep -q $MOUNT_POINT && umount -d $MOUNT_POINT + # Cope with "NFS silly rename" + if [ $(tst_fs_type .) = "NFS" ]; then + rm -f blkext3 + + TIMEOUT=5 + while $(ls -la | grep -q .nfs); do + sleep 1 + + TIMEOUT=$(( $TIMEOUT - 1 )) + if [ $TIMEOUT -eq 0 ]; then + tst_resm TBROK "The loop device is still in use" + break + fi + done + fi + tst_rmdir # We set it back to Enforcing. -- 1.7.1 ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list