Handle xfstests results with and without direct I/O

Use the same check as we do in Makefile.kernelcompat
(look for copy_page_to_iter_nofault in the kernel uio.h
header file) to determine if we should use the no DIO
version of expected xfstests results.

Signed-off-by: Chris Kirby <ckirby@versity.com>
This commit is contained in:
Chris Kirby
2026-07-19 17:14:24 -05:00
parent 0a77a233fd
commit eeb6bf6b2b
4 changed files with 889 additions and 13 deletions
+8 -1
View File
@@ -116,7 +116,14 @@ awk '
grep -E "^(Ran|Not run|Failures):" "$T_TMPDIR/results" | fmt -w 1 > "$T_TMPDIR/results.fmt"
grep -E "^(Passed|Failed).*tests$" "$T_TMPDIR/results" >> "$T_TMPDIR/results.fmt"
diff -u "$T_EXTRA/expected-results" "$T_TMPDIR/results.fmt" > "$T_TMPDIR/results.diff"
if grep -q copy_page_to_iter_nofault /lib/modules/$(uname -r)/build/include/linux/uio.h
then
diff -u "$T_EXTRA/expected-results" "$T_TMPDIR/results.fmt" > "$T_TMPDIR/results.diff"
else
# no direct I/O
diff -u "$T_EXTRA/expected-results.nodio" "$T_TMPDIR/results.fmt" > "$T_TMPDIR/results.diff"
fi
if [ -s "$T_TMPDIR/results.diff" ]; then
echo "tests that were skipped/run differed from expected:"
cat "$T_TMPDIR/results.diff"