mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
overlay/018: print hardlink content to golden output
diff may skip comparing content of files with identical st_ino/st_dev. Overlayfs stat(2) may return same st_dev/st_ino for hardlink copy ups, but it does not mean that read(2) will return the same content. Convert the test to output hardlink files content to golden output instead of using diff. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
committed by
Eryu Guan
parent
a76feb07aa
commit
35965a3dfd
+6
-6
@@ -57,7 +57,7 @@ _scratch_mkfs >>$seqres.full 2>&1
|
||||
# Create 2 hardlinked files in lower
|
||||
lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER
|
||||
mkdir -p $lowerdir
|
||||
echo "patient zero" >> $lowerdir/foo
|
||||
echo "zero" >> $lowerdir/foo
|
||||
ln $lowerdir/foo $lowerdir/bar
|
||||
|
||||
|
||||
@@ -91,16 +91,16 @@ bar=$SCRATCH_MNT/bar
|
||||
|
||||
FILES="$foo $bar"
|
||||
|
||||
echo "== Before copy up =="
|
||||
cat $FILES
|
||||
record_ino_nlink $tmp.before
|
||||
|
||||
# Modify content of one of the hardlinks
|
||||
echo "mutated" >> $foo
|
||||
echo "one" >> $foo
|
||||
|
||||
echo "== After write one =="
|
||||
cat $FILES
|
||||
check_ino_nlink $tmp.before $tmp.after
|
||||
|
||||
# Compare content of files - expect silence
|
||||
diff $foo $bar
|
||||
|
||||
echo "Silence is golden"
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -1,2 +1,9 @@
|
||||
QA output created by 018
|
||||
Silence is golden
|
||||
== Before copy up ==
|
||||
zero
|
||||
zero
|
||||
== After write one ==
|
||||
zero
|
||||
one
|
||||
zero
|
||||
one
|
||||
|
||||
Reference in New Issue
Block a user