This test uses sysfs-dump to capture THP diagnostic information to
$seqres.full. Unfortunately, that's not a standard program (it's one of
my many tools) and I forgot to paste the script into the test. Hence
it's been broken since merge for everyone else. Fix it.
Cc: fstests@vger.kernel.org # v2024.08.11
Fixes: 518896a7b483c0 ("xfs: test online repair when xfiles consists of THPs")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
pagesize=`getconf PAGE_SIZE`
pagesize_kb=$((pagesize / 1024))
+sysfs-dump() {
+ for i in "$@"; do
+ if [ -d "$i" ]; then
+ for x in "$i/"*; do
+ test -f "$x" && echo "$x: $(cat "$x")"
+ done
+ else
+ test -f "$i" && echo "$i: $(cat "$i")"
+ fi
+ done
+}
+
echo "settings now: pagesize=${pagesize_kb}KB" >> $seqres.full
sysfs-dump /sys/kernel/mm/transparent_hugepage/* >> $seqres.full