From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [COMMITTED] utimensat01: fix kvers arrary boundary
Date: Mon, 31 Aug 2020 06:35:52 +0000 [thread overview]
Message-ID: <20200831063552.11252-1-liwang@redhat.com> (raw)
To get rid of errors:
8 utimensat01.c:295: INFO: Testing variant: syscall with old kernel spec
9 tst_test.c:1300: BROK: Test killed by SIGSEGV!
and,
BROK: utimensat01.c:293: mkdir(test_dir,0700) failed: EEXIST (17)
Signed-off-by: Li Wang <liwang@redhat.com>
---
testcases/kernel/syscalls/utimensat/utimensat01.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/utimensat/utimensat01.c b/testcases/kernel/syscalls/utimensat/utimensat01.c
index 5cc5f1d33..e2d4fee3e 100644
--- a/testcases/kernel/syscalls/utimensat/utimensat01.c
+++ b/testcases/kernel/syscalls/utimensat/utimensat01.c
@@ -161,6 +161,7 @@ static void update_error(struct test_case *tc)
static struct tst_kern_exv kvers[] = {
/* Ubuntu kernel has patch b3b4283 since 4.4.0-48.69 */
{ "UBUNTU", "4.4.0-48.69" },
+ { NULL, NULL},
};
if (tc->exp_err != -1)
@@ -295,7 +296,8 @@ static void setup(void)
tst_res(TINFO, "Testing variant: %s", variants[tst_variant].desc);
bad_addr = tst_get_bad_addr(NULL);
- SAFE_MKDIR(TEST_DIR, 0700);
+ if (access(TEST_DIR, R_OK))
+ SAFE_MKDIR(TEST_DIR, 0700);
for (i = 0; i < ARRAY_SIZE(tcase); i++)
update_error(&tcase[i]);
--
2.21.1
reply other threads:[~2020-08-31 6:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200831063552.11252-1-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