Regression: skip rm/rmdir tests in t-cache on 2.6.38
authorErez Zadok <ezk@cs.sunysb.edu>
Sun, 26 Jun 2011 00:12:13 +0000 (20:12 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Sun, 26 Jun 2011 00:12:13 +0000 (20:12 -0400)
Because can no longer detect cache incoherency in 2.6.38.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
t-cache.sh [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 54af6e9..8fb22d5
@@ -73,16 +73,34 @@ function test_rm {
     rm -f $LOWER_DIR1/f1 || exit $?
     sync
     sleep 5
-    test -f $MOUNTPOINT/f1 && exit $?
-    echo -n "[rm] "
+    case `uname -r` in
+       2.6.3[89]* | 3.* )
+           # 2.6.38+ no longer d-revalidates when lower inode is gone, so I
+           # cannot detect changes below
+           echo -n "[rm-SKIP] "
+           ;;
+       * )
+           test -f $MOUNTPOINT/f1 && exit $?
+           echo -n "[rm] "
+           ;;
+    esac
 }
 
 function test_rmdir {
     rmdir $LOWER_DIR1/d1 || exit $?
     sync
     sleep 5
-    test -d $MOUNTPOINT/d1 && exit $?
-    echo -n "[rmdir] "
+    case `uname -r` in
+       2.6.3[89]* | 3.* )
+           # 2.6.38 no longer d-revalidates when lower inode is gone, so I
+           # cannot detect changes below
+           echo -n "[rmdir-SKIP] "
+           ;;
+       * )
+           test -d $MOUNTPOINT/d1 && exit $?
+           echo -n "[rmdir] "
+           ;;
+    esac
 }
 
 function test_append {