public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Zhao Gongyi <zhaogongyi@huawei.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] needs_root: Add setting of needs_root
Date: Thu, 13 Oct 2022 09:41:36 +0200	[thread overview]
Message-ID: <Y0fBMGxUQpZhz0AE@pevik> (raw)
In-Reply-To: <20221012091526.35373-3-zhaogongyi@huawei.com>

Hi Zhao,

> Add setting of  needs_root, otherwise run the test without root
> will fail and report EACCESS or EPERM.
...
>  testcases/kernel/syscalls/bind/bind06.c                       | 1 +
>  testcases/kernel/syscalls/cma/process_vm_readv02.c            | 1 +
>  testcases/kernel/syscalls/cma/process_vm_readv03.c            | 1 +
>  testcases/kernel/syscalls/cma/process_vm_writev02.c           | 1 +
>  testcases/kernel/syscalls/copy_file_range/copy_file_range01.c | 1 +
>  testcases/kernel/syscalls/ipc/msgget/msgget03.c               | 1 +
>  testcases/kernel/syscalls/preadv/preadv03.c                   | 1 +
>  testcases/kernel/syscalls/pwritev/pwritev03.c                 | 1 +
>  testcases/kernel/syscalls/sendto/sendto03.c                   | 1 +
>  testcases/kernel/syscalls/setsockopt/setsockopt05.c           | 1 +
>  testcases/kernel/syscalls/setsockopt/setsockopt06.c           | 1 +
>  testcases/kernel/syscalls/setsockopt/setsockopt07.c           | 1 +
>  testcases/kernel/syscalls/setsockopt/setsockopt08.c           | 1 +
>  testcases/kernel/syscalls/setsockopt/setsockopt09.c           | 1 +
>  testcases/kernel/syscalls/swapon/swapon01.c                   | 1 +
>  15 files changed, 15 insertions(+)
...
> +++ b/testcases/kernel/syscalls/ipc/msgget/msgget03.c
> @@ -72,6 +72,7 @@ static void cleanup(void)

>  static struct tst_test test = {
>  	.needs_tmpdir = 1,
> +	.needs_root = 1,
>  	.setup = setup,
>  	.cleanup = cleanup,
>  	.test_all = verify_msgget,

At least this one is working without root:

$ ./testcases/kernel/syscalls/ipc/msgget/msgget03
tst_test.c:1526: TINFO: Timeout per run is 0h 00m 30s
msgget03.c:41: TINFO: Current environment 0 message queues are already in use
msgget03.c:55: TINFO: The maximum number of message queues (32000) reached
msgget03.c:30: TPASS: msgget(1629588886, 1536) : ENOSPC (28)

Summary:
passed   1
failed   0
broken   0
skipped  0
warnings 0

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-10-13  7:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12  9:15 [LTP] [PATCH 0/2] Optimization reference to needs_root Zhao Gongyi via ltp
2022-10-12  9:15 ` [LTP] [PATCH 1/2] lib: Add checking of needs_root Zhao Gongyi via ltp
2022-10-12 11:33   ` Petr Vorel
2022-10-12 18:47     ` Bird, Tim
2022-10-12 19:13       ` Petr Vorel
2022-10-12  9:15 ` [LTP] [PATCH 2/2] needs_root: Add setting " Zhao Gongyi via ltp
2022-10-13  7:41   ` Petr Vorel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-10-13  7:45 zhaogongyi via ltp
2022-10-13  9:19 ` Petr Vorel
2022-10-13 14:03 zhaogongyi via ltp
2022-10-13 22:26 ` Petr Vorel
2022-10-14  2:00 zhaogongyi via ltp
2022-10-14  6:50 ` Petr Vorel
2022-10-14  7:02 zhaogongyi via ltp
2022-10-20 12:21 zhaogongyi via ltp

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=Y0fBMGxUQpZhz0AE@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=zhaogongyi@huawei.com \
    /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