From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 2/3] syscalls: make use of .min_cpus
Date: Fri, 4 Dec 2020 06:33:04 +0000 [thread overview]
Message-ID: <20201204063305.6820-2-liwang@redhat.com> (raw)
In-Reply-To: <20201204063305.6820-1-liwang@redhat.com>
To set the minimum numbers of online CPU for test.
From Martin Doucha:
af_alg07 requires 2 CPUs, otherwise it'll report false positives.
The test will pass only if fchownat() hits a half-closed socket and
returns error. But IIRC the half-closed socket will be destroyed during
reschedule which means there's no race window to hit anymore. But it
would be better to put the TCONF condition into the test itself.
getcwd04: as itself requirements.
Signed-off-by: Li Wang <liwang@redhat.com>
---
testcases/kernel/crypto/af_alg07.c | 1 +
testcases/kernel/syscalls/getcwd/getcwd04.c | 6 ++----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/crypto/af_alg07.c b/testcases/kernel/crypto/af_alg07.c
index 6ad86f4f3..539ebee11 100644
--- a/testcases/kernel/crypto/af_alg07.c
+++ b/testcases/kernel/crypto/af_alg07.c
@@ -110,6 +110,7 @@ static struct tst_test test = {
.setup = setup,
.cleanup = cleanup,
.min_kver = "4.10.0",
+ .min_cpus = 2,
.taint_check = TST_TAINT_W | TST_TAINT_D,
.tags = (const struct tst_tag[]) {
{"linux-git", "9060cb719e61"},
diff --git a/testcases/kernel/syscalls/getcwd/getcwd04.c b/testcases/kernel/syscalls/getcwd/getcwd04.c
index 2fa65fb2c..2e07e675f 100644
--- a/testcases/kernel/syscalls/getcwd/getcwd04.c
+++ b/testcases/kernel/syscalls/getcwd/getcwd04.c
@@ -68,9 +68,6 @@ static void verify_getcwd(void)
static void setup(void)
{
- if (tst_ncpus() == 1)
- tst_brk(TCONF, "This test needs two cpus at least");
-
SAFE_SIGNAL(SIGALRM, sigproc);
alarm(TIMEOUT);
@@ -101,5 +98,6 @@ static struct tst_test test = {
.setup = setup,
.test_all = verify_getcwd,
.needs_tmpdir = 1,
- .forks_child = 1
+ .forks_child = 1,
+ .min_cpus = 2
};
--
2.21.3
next prev parent reply other threads:[~2020-12-04 6:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 11:06 [LTP] [PATCH 1/3] lib: add .min_cpus in tst_test struct Li Wang
2020-12-03 11:06 ` [LTP] [PATCH 2/3] syscalls: take use of .min_cpus Li Wang
2020-12-03 11:06 ` [LTP] [PATCH 3/3] af_alg07: add dynamic bias for ARM Li Wang
2020-12-03 12:32 ` Richard Palethorpe
2020-12-03 14:27 ` Martin Doucha
2020-12-03 12:18 ` [LTP] [PATCH 1/3] lib: add .min_cpus in tst_test struct Richard Palethorpe
2020-12-04 6:33 ` [LTP] [PATCH v2 " Li Wang
2020-12-04 6:33 ` Li Wang [this message]
2020-12-07 14:41 ` [LTP] [PATCH v2 2/3] syscalls: make use of .min_cpus Cyril Hrubis
2020-12-04 6:33 ` [LTP] [PATCH v2 3/3] af_alg07: add dynamic bias for ARM Li Wang
2020-12-09 6:12 ` Li Wang
2020-12-09 9:17 ` Richard Palethorpe
2020-12-09 11:26 ` Martin Doucha
2020-12-09 12:37 ` Li Wang
2020-12-07 14:41 ` [LTP] [PATCH v2 1/3] lib: add .min_cpus in tst_test struct 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=20201204063305.6820-2-liwang@redhat.com \
--to=liwang@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