>From c7c328c26a73504006f97d38b85b3178382acc0e Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Wed, 21 Apr 2021 00:12:00 +0200 Subject: [PATCH] tests: fix FP in ls/stat-free-color.sh It seems that ls(1) calls newfstatat(1, ...) on newer systems - but only when there is something to output. * tests/ls/stat-free-color.sh: Create a sample file in order to get the baseline count correctly. --- tests/ls/stat-free-color.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh index 13f41a090..818471b93 100755 --- a/tests/ls/stat-free-color.sh +++ b/tests/ls/stat-free-color.sh @@ -57,9 +57,10 @@ eval $(dircolors -b color-without-stat) # Furthermore, underlying library functions may also implicitly # add an extra stat call, e.g. opendir since glibc-2.21-360-g46f894d. # To avoid counting those, first get a baseline count for running -# ls with one empty directory argument. Then, compare that with the +# ls with one file in the test directory. Then, compare that with the # invocation under test. mkdir d || framework_failure_ +touch d/file || framework_failure_ strace -q -o log1 -e $stats ls --color=always d || fail=1 n_stat1=$(grep -vF '+++' log1 | wc -l) || framework_failure_ -- 2.31.1