overlay/017: test persistent inode numbers after mount cycle
authorAmir Goldstein <amir73il@gmail.com>
Fri, 28 Apr 2017 08:24:48 +0000 (11:24 +0300)
committerEryu Guan <eguan@redhat.com>
Mon, 1 May 2017 06:08:39 +0000 (14:08 +0800)
Overlayfs directory inodes are constant across copy up,
but not persistent on mount cycle.

Compare the inode numbers before and after mount cycle.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/overlay/017

index 4eab2a8cae76e414df5a64596900d1a8861227e9..fabfbb5e61924b814be53297484d82d10f7f1a24 100755 (executable)
@@ -9,7 +9,8 @@
 # - stat file A shows inode number Y != X
 #
 # Also test if d_ino of readdir entries changes after copy up
-# and if inode numbers persist after rename and drop caches.
+# and if inode numbers persist after rename, drop caches and
+# mount cycle.
 #
 #-----------------------------------------------------------------------
 #
@@ -139,6 +140,12 @@ echo 3 > /proc/sys/vm/drop_caches
 # Compare inode numbers before/after rename and drop caches
 check_inode_numbers $testdir $tmp.after_copyup $tmp.after_move
 
+# Verify that the inode numbers survive a mount cycle
+_scratch_cycle_mount
+
+# Compare inode numbers before/after mount cycle
+check_inode_numbers $testdir $tmp.after_move $tmp.after_cycle
+
 echo "Silence is golden"
 status=0
 exit