From: Erico Nunes <ernunes@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 3/3] iopl01: skip test if kernel is locked down
Date: Tue, 28 Jul 2020 18:22:07 +0200 [thread overview]
Message-ID: <20200728162207.332109-3-ernunes@redhat.com> (raw)
In-Reply-To: <20200728162207.332109-1-ernunes@redhat.com>
iopl is restricted under kernel lockdown.
Signed-off-by: Erico Nunes <ernunes@redhat.com>
---
v2:
- update to skip the test here rather than relying on the helper
function to skip.
---
testcases/kernel/syscalls/iopl/iopl01.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/testcases/kernel/syscalls/iopl/iopl01.c b/testcases/kernel/syscalls/iopl/iopl01.c
index edf586cd1..e5ec1147f 100644
--- a/testcases/kernel/syscalls/iopl/iopl01.c
+++ b/testcases/kernel/syscalls/iopl/iopl01.c
@@ -42,6 +42,14 @@ static void verify_iopl(void)
}
}
+static void setup(void)
+{
+ /* iopl is restricted under kernel lockdown. */
+ if (tst_lockdown_enabled())
+ tst_brk(TCONF, "Kernel is locked down, skip this test");
+
+}
+
static void cleanup(void)
{
/*
@@ -54,6 +62,7 @@ static void cleanup(void)
static struct tst_test test = {
.test_all = verify_iopl,
.needs_root = 1,
+ .setup = setup,
.cleanup = cleanup,
};
--
2.26.2
next prev parent reply other threads:[~2020-07-28 16:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-28 16:22 [LTP] [PATCH v2 1/3] lib: add function to check for kernel lockdown Erico Nunes
2020-07-28 16:22 ` [LTP] [PATCH v2 2/3] ioperm01: skip test if kernel is locked down Erico Nunes
2020-07-28 16:22 ` Erico Nunes [this message]
2020-07-29 3:14 ` [LTP] [PATCH v2 1/3] lib: add function to check for kernel lockdown Li Wang
2020-07-29 6:33 ` Cyril Hrubis
2020-07-30 0:21 ` Li Wang
2020-07-29 10:55 ` Erico Nunes
2020-07-29 12:07 ` Li Wang
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=20200728162207.332109-3-ernunes@redhat.com \
--to=ernunes@redhat.com \
--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