From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] syscalls/capget01: Cleanup & convert to new library
Date: Tue, 7 Jan 2020 13:02:24 +0100 [thread overview]
Message-ID: <20200107120224.GA26408@rei.lan> (raw)
In-Reply-To: <1576049159-14014-1-git-send-email-xuyang2018.jy@cn.fujitsu.com>
Hi!
Pushed with following changes:
diff --git a/testcases/kernel/syscalls/capget/capget01.c b/testcases/kernel/syscalls/capget/capget01.c
index 743e307c5..bc8bd7ce7 100644
--- a/testcases/kernel/syscalls/capget/capget01.c
+++ b/testcases/kernel/syscalls/capget/capget01.c
@@ -31,18 +31,18 @@ static void verify_capget(unsigned int n)
.pid = pid,
};
- struct __user_cap_data_struct data;
+ struct __user_cap_data_struct data[2];
tst_res(TINFO, "%s", tc->message);
- TEST(tst_syscall(__NR_capget, &hdr, &data));
+ TEST(tst_syscall(__NR_capget, &hdr, data));
if (TST_RET == 0)
tst_res(TPASS, "capget() returned %ld", TST_RET);
else
tst_res(TFAIL | TTERRNO, "Test Failed, capget() returned %ld",
TST_RET);
- if (data.effective & 1 << CAP_NET_RAW)
+ if (data[0].effective & 1 << CAP_NET_RAW)
tst_res(TFAIL, "capget() gets CAP_NET_RAW unexpectedly in pE");
else
tst_res(TPASS, "capget() doesn't get CAP_NET_RAW as expected in PE");
The version 2 and 3 are 64 bit capabilities, hence we have to pass array of cap_struct_data instead.
Otherwise this is a nice improvement on the testcase, thanks.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2020-01-07 12:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 7:25 [LTP] [PATCH 1/2] syscalls/capget01: Cleanup & convert to new library Yang Xu
2019-12-11 7:25 ` [LTP] [PATCH 2/2] syscalls/capget02: " Yang Xu
2020-01-07 12:23 ` Cyril Hrubis
2020-01-07 12:02 ` Cyril Hrubis [this message]
2020-01-07 12:26 ` [LTP] [PATCH 1/2] syscalls/capget01: " Cyril Hrubis
2020-01-08 2:34 ` Yang Xu
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=20200107120224.GA26408@rei.lan \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox