* [PATCH] xfs/801: provide missing sysfs-dump function
@ 2025-04-08 18:17 Darrick J. Wong
2025-04-08 19:42 ` Zorro Lang
2025-04-10 5:36 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Darrick J. Wong @ 2025-04-08 18:17 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests, xfs, Christoph Hellwig
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs/801: provide missing sysfs-dump function
2025-04-08 18:17 [PATCH] xfs/801: provide missing sysfs-dump function Darrick J. Wong
@ 2025-04-08 19:42 ` Zorro Lang
2025-04-10 5:36 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Zorro Lang @ 2025-04-08 19:42 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: fstests, xfs, Christoph Hellwig
On Tue, Apr 08, 2025 at 11:17:32AM -0700, Darrick J. Wong wrote:
> 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>
> ---
Reviewed-by: Zorro Lang <zlang@redhat.com>
> 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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs/801: provide missing sysfs-dump function
2025-04-08 18:17 [PATCH] xfs/801: provide missing sysfs-dump function Darrick J. Wong
2025-04-08 19:42 ` Zorro Lang
@ 2025-04-10 5:36 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2025-04-10 5:36 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Zorro Lang, fstests, xfs
On Tue, Apr 08, 2025 at 11:17:32AM -0700, Darrick J. Wong wrote:
> 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.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-10 5:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-08 18:17 [PATCH] xfs/801: provide missing sysfs-dump function Darrick J. Wong
2025-04-08 19:42 ` Zorro Lang
2025-04-10 5:36 ` Christoph Hellwig
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.