From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 6/6] mem/vma05.sh: Convert to the new shell library
Date: Mon, 6 Jan 2025 16:15:32 +0100 [thread overview]
Message-ID: <20250106151532.GA328413@pevik> (raw)
In-Reply-To: <20250106132607.25627-7-chrubis@suse.cz>
Hi Cyril,
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Tested-by: Petr Vorel <pvorel@suse.cz>
Thanks for these improvements. Few notes below.
> To run the test from the test directory do:
> PATH=$PATH:$PWD/../../../lib/:$PWD/testcases/lib/:: ./vma05.sh
very nit: safer example would be to have $PATH at the end of the list.
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
> ---
> testcases/kernel/mem/vma/vma05.sh | 96 ++++++++++++++++---------------
> 1 file changed, 49 insertions(+), 47 deletions(-)
> diff --git a/testcases/kernel/mem/vma/vma05.sh b/testcases/kernel/mem/vma/vma05.sh
> index e1ef1014e..1876d7663 100755
> --- a/testcases/kernel/mem/vma/vma05.sh
> +++ b/testcases/kernel/mem/vma/vma05.sh
> @@ -1,6 +1,15 @@
> #!/bin/sh
> +#
> # SPDX-License-Identifier: GPL-2.0-or-later
> +#
very nit: I would not add these new lines.
> # Copyright (C) 2017 Red Hat, Inc.
> +# Copyright (C) 2024 Cyril Hrubis <chrubis@suse.cz>
> +#
> +# ---
> +# doc
> +#
> +# [Description]
> +#
> # Regression test if the vsyscall and vdso VMA regions are reported correctly.
> # While [vsyscall] is mostly deprecated with newer systems, there is
> @@ -15,58 +24,51 @@
> # VM_ALWAYSDUMP)). As a consequence of this bug, VMAs were not included
> # in core dumps which resulted in eg. incomplete backtraces and invalid
> # core dump files created by gdb.
> +# ---
> +#
> +# ---
> +# env
> +# {
> +# "needs_root": true,
> +# "needs_tmpdir": true,
> +# "needs_cmds": ["gdb"],
Maybe also "uname"?
> +# "save_restore": [
> +# ["/proc/sys/kernel/core_pattern", "core", "TBROK"],
> +# ["/proc/sys/kernel/core_uses_pid", "0", "TBROK"]
> +# ],
> +# "tags": [
> +# ["linux-git", "103efcd9aac1"],
> +# ["linux-git", "b6558c4a2378"],
> +# ["linux-git", "e5b97dde514f"]
I wonder how hard to add shell support (with help of ujson) to metadata/metaparse.c.
I created a ticket for it:
https://github.com/linux-test-project/ltp/issues/1216
> +# ]
> +# }
> +# ---
> -TST_SETUP=setup
> -TST_CLEANUP=cleanup
> -TST_TESTFUNC=vma_report_check
> -TST_NEEDS_ROOT=1
> -TST_NEEDS_TMPDIR=1
> -TST_NEEDS_CMDS="gdb"
> -
> -CORE_LIMIT=$(ulimit -c)
> -CORE_PATTERN=$(cat /proc/sys/kernel/core_pattern)
> -CORE_USES_PID=$(cat /proc/sys/kernel/core_uses_pid)
> -
> -setup()
> -{
> - ulimit -c unlimited
> - echo "core" > /proc/sys/kernel/core_pattern
> - echo 0 > /proc/sys/kernel/core_uses_pid
> - unset DEBUGINFOD_URLS
> -}
We don't need setup and cleanup at all. But I see we don't have a support for
them in testcases/lib/tst_run_shell.c yet. I might need to add it for
netstress.c.
...
FYI testcases/lib/tests/shell_loader*.sh would deserve SPDX and copyright.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-01-06 15:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 13:26 [LTP] [PATCH v2 0/6] First new shell library converted test Cyril Hrubis
2025-01-06 13:26 ` [LTP] [PATCH v2 1/6] tst_run_shell: Add save_restore parser Cyril Hrubis
2025-01-06 13:26 ` [LTP] [PATCH v2 2/6] tst_run_shell: Make the tst_test struct static Cyril Hrubis
2025-01-08 13:12 ` Petr Vorel
2025-01-14 12:48 ` Cyril Hrubis
2025-01-06 13:26 ` [LTP] [PATCH v2 3/6] libs/ujson: Fix "Garbage after JSON string!" in strict mode Cyril Hrubis
2025-01-06 13:26 ` [LTP] [PATCH v2 4/6] tst_run_shell: Better errors for metadata extractor Cyril Hrubis
2025-01-06 13:26 ` [LTP] [PATCH v2 5/6] lib/tst_res_.c: Add TBROK handler + more verbose errors Cyril Hrubis
2025-01-06 13:26 ` [LTP] [PATCH v2 6/6] mem/vma05.sh: Convert to the new shell library Cyril Hrubis
2025-01-06 15:15 ` Petr Vorel [this message]
2025-01-06 16:32 ` Cyril Hrubis
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=20250106151532.GA328413@pevik \
--to=pvorel@suse.cz \
--cc=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox