overlay: test multiple origin references to the same lower file
authorAmir Goldstein <amir73il@gmail.com>
Fri, 4 May 2018 09:41:31 +0000 (12:41 +0300)
committerEryu Guan <guaneryu@gmail.com>
Wed, 9 May 2018 16:03:10 +0000 (00:03 +0800)
commit5509684db3b7efdba03619eb10f0d49dc28ba537
treed94faf179599754ddd89e86946862198d8fc5fba
parent12a986fe876dd1ad989cf8f0d7c1d015271463d0
overlay: test multiple origin references to the same lower file

Multiple origin references to the same lower file from upper files
that are not hardlinks will falsely return the same st_ino/st_dev
for two different overlay files and will cause 'diff' to falsely
report that content of files is the same when it is not.

This test checks that overlayfs detects and fails lookup of a
multiply referenced origin.

The check for multiply referenced origin was a by-product of kernel
commit 31747eda41ef ("ovl: hash directory inodes for fsnotify")

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/overlay/059 [new file with mode: 0755]
tests/overlay/059.out [new file with mode: 0644]
tests/overlay/group