From: "Darrick J. Wong" <djwong@kernel.org>
To: Zorro Lang <zlang@redhat.com>
Cc: fstests <fstests@vger.kernel.org>,
xfs <linux-xfs@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>
Subject: [PATCH] xfs/801: provide missing sysfs-dump function
Date: Tue, 8 Apr 2025 11:17:32 -0700 [thread overview]
Message-ID: <20250408181732.GH6274@frogsfrogsfrogs> (raw)
From: Darrick J. Wong <djwong@kernel.org>
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>
---
tests/xfs/801 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/xfs/801 b/tests/xfs/801
index 1190cfab8a9f94..a05a6efc1a9058 100755
--- a/tests/xfs/801
+++ b/tests/xfs/801
@@ -42,6 +42,18 @@ test -w "$knob" || _notrun "tmpfs transparent hugepages disabled"
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
next reply other threads:[~2025-04-08 18:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 18:17 Darrick J. Wong [this message]
2025-04-08 19:42 ` [PATCH] xfs/801: provide missing sysfs-dump function Zorro Lang
2025-04-10 5:36 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250408181732.GH6274@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.