From: Cyril Hrubis <chrubis@suse.cz>
To: "Yang Xu (Fujitsu)" <xuyang2018.jy@fujitsu.com>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH v2 2/2] syscalls/faccessat202: Add new testcase
Date: Wed, 23 Aug 2023 08:51:38 +0200 [thread overview]
Message-ID: <ZOWseuRX3rJKObL0@yuki> (raw)
In-Reply-To: <c9ec804c-d100-f678-a0bf-9634f2d17b67@fujitsu.com>
Hi!
>
> Thank you for your suggestion, but i think " SAFE_SETEUID(ltpuser->pw_uid)"
>
> should be changed to "SAFE_SETEUID(0)" to change EUID back.
Right, that was copy&paste typo.
> >> + TST_EXP_FAIL(faccessat2(*tc->fd, *tc->filename,
> >> + tc->mode, tc->flags), tc->exp_errno);
> >> + }
> >> +
> >> + tst_reap_children();
> >> + } else {
> >> + TST_EXP_FAIL(faccessat2(*tc->fd, *tc->filename,
> >> + tc->mode, tc->flags), tc->exp_errno);
> > Can we get a better message here? As it is it prints
> > "faccessat2(*tc->fd, *tc->filename, tc->mode, tc->flags) ..."
> >
> > Which is a bit ugly.
>
> Because i used tst_get_bad_addr to test a bad pathname point ,
>
> so if i output relevant information, the test will be killed by SIGSEGV.
>
> In the v3 version, I will change it to this:
>
> "TST_EXP_FAIL(faccessat2(*tc->fd, *tc->filename, tc->mode, tc->flags),
>
> tc->exp_errno, "faccessat2()")"
>
> How about this?
Either that or we can add short description to the test structure and
pass TST_EXP_FAIL(..., "faccessat2() %s", tc->desc)
At least some cases would be better with description, for instance for
the euid test the description should be something as
"with AT_EACCESS and unpriviledged EUID"
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-08-23 6:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-22 10:41 [LTP] [PATCH v2 1/2] syscalls/faccessat201: Add new testcase Yang Xu
2023-08-22 10:41 ` [LTP] [PATCH v2 2/2] syscalls/faccessat202: " Yang Xu
2023-08-22 14:59 ` Cyril Hrubis
2023-08-23 3:52 ` Yang Xu (Fujitsu)
2023-08-23 6:51 ` Cyril Hrubis [this message]
2023-08-22 14:22 ` [LTP] [PATCH v2 1/2] syscalls/faccessat201: " 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=ZOWseuRX3rJKObL0@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=xuyang2018.jy@fujitsu.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