From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3] [vma] Add regression tests for vsyscall and vdso
Date: Thu, 17 Aug 2017 12:24:47 +0200 [thread overview]
Message-ID: <20170817102447.GA28406@rei> (raw)
In-Reply-To: <20170809143934.2875-1-vkabatov@redhat.com>
Hi!
I've fixed a few cases of bashism (please try to run the test with dash
before submitting next time) and added TST_NEEDS_TMPDIR=1 since the test
creates the core file which should be put into temporary directory.
And pushed, thanks.
The diff for what I did:
diff --git a/testcases/kernel/mem/vma/vma05.sh b/testcases/kernel/mem/vma/vma05.sh
index 04affa021..1008b9c8b 100755
--- a/testcases/kernel/mem/vma/vma05.sh
+++ b/testcases/kernel/mem/vma/vma05.sh
@@ -38,6 +38,7 @@ TST_SETUP=setup
TST_CLEANUP=cleanup
TST_TESTFUNC=vma_report_check
TST_NEEDS_ROOT=1
+TST_NEEDS_TMPDIR=1
TST_NEEDS_CMDS="gdb"
and:
diff --git a/testcases/kernel/mem/vma/vma05.sh b/testcases/kernel/mem/vma/vma05.sh
index 5742fbc22..662290d60 100755
--- a/testcases/kernel/mem/vma/vma05.sh
+++ b/testcases/kernel/mem/vma/vma05.sh
@@ -59,10 +59,10 @@ cleanup()
vma_report_check()
{
- if [ $(uname -m) == "x86_64" ] ; then
- if LINE=$(grep "vsyscall" /proc/self/maps) ; then
+ if [ $(uname -m) = "x86_64" ]; then
+ if LINE=$(grep "vsyscall" /proc/self/maps); then
RIGHT="ffffffffff600000-ffffffffff601000[[:space:]]r-xp"
- if grep -q "$RIGHT" <<< "$LINE" ; then
+ if echo "$LINE" | grep -q "$RIGHT"; then
tst_res TPASS "[vsyscall] reported correctly"
else
tst_res TFAIL "[vsyscall] reporting wrong"
@@ -71,10 +71,10 @@ vma_report_check()
fi
rm -rf core*
- { vma05_vdso; } >& /dev/null
+ { vma05_vdso; } > /dev/null 2>&1
TRACE=$(gdb -silent -ex="thread apply all backtrace" -ex="quit"\
vma05_vdso ./core* 2> /dev/null)
- if grep -qF "??" <<< "$TRACE" ; then
+ if echo "$TRACE" | grep -qF "??"; then
tst_res TFAIL "[vdso] bug not patched"
else
tst_res TPASS "[vdso] backtrace complete"
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2017-08-17 10:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 14:39 [LTP] [PATCH v3] [vma] Add regression tests for vsyscall and vdso vkabatov
2017-08-17 10:24 ` Cyril Hrubis [this message]
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=20170817102447.GA28406@rei \
--to=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 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.