mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
overlay/017: use t_dir_type to find file by d_ino
'find -ino' is this test was supposed to filter files by inode number that was recorded with 'ls -i' to compare st_ino returned by stat(2) with d_ino returned by getdents64(2). It turns out that on some systems, 'find -ino' uses stat(2) for filtering by inode number, which is not what we want. Use the auxiliary program t_dir_type to filter files by inode number instead. 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
0b73181005
commit
a19298e363
+2
-1
@@ -56,6 +56,7 @@ _supported_fs overlay
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
_require_test_program "af_unix"
|
||||
_require_test_program "t_dir_type"
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
@@ -107,7 +108,7 @@ function check_inode_numbers()
|
||||
# Test constant readdir(3)/getdents(2) d_ino -
|
||||
# Expect to find file by inode number
|
||||
cat $before | while read ino f; do
|
||||
find $dir/ -maxdepth 1 -inum $ino | grep -q $f || \
|
||||
$here/src/t_dir_type $dir $ino | grep -q $f || \
|
||||
echo "$f not found by ino $ino (from $before)"
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user