From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: brauner@kernel.org, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 2/2] syscalls/openat: Add new regression test when using open(O_TMPFILE) under umask
Date: Thu, 4 Aug 2022 22:32:12 +0200 [thread overview]
Message-ID: <YuwszCiMuZj3JgYA@pevik> (raw)
In-Reply-To: <c266e389-c6f4-502f-523d-6d51fbf3ed58@suse.cz>
Hi all,
...
> > +static void open_tmpfile_supported(int dirfd)
> > +{
> > + TEST(openat(dirfd, ".", O_TMPFILE | O_RDWR, S_IXGRP | S_ISGID));
> > +
> > + if (TST_RET == -1) {
> > + if (errno == ENOTSUP)
> > + tst_brk(TCONF, "fs doesn't support O_TMPFILE");
> > + else
> > + tst_brk(TBROK | TTERRNO, "open(%d, O_TMPFILE) failed", dirfd);
> > + }
> What if openat() returns some other negative value?
How about add ENOTSUP to safe_openat() (lib/tst_safe_file_at.c) and use SAFE_OPENAT() here?
Kind regards,
Petr
> > +
> > + SAFE_CLOSE(TST_RET);
> > +}
...
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-08-04 20:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-03 3:24 [LTP] [PATCH v2 1/2] syscalls/creat09: Add umask test condition Yang Xu
2022-08-03 3:24 ` [LTP] [PATCH v2 2/2] syscalls/openat: Add new regression test when using open(O_TMPFILE) under umask Yang Xu
2022-08-04 16:08 ` Martin Doucha
2022-08-04 20:32 ` Petr Vorel [this message]
2022-08-15 7:58 ` xuyang2018.jy
2022-08-15 7:41 ` xuyang2018.jy
2022-08-15 9:27 ` [LTP] [PATCH v3 1/2] syscalls/creat09: Add umask test condition Yang Xu
2022-08-15 9:21 ` Christian Brauner
2022-08-15 9:27 ` [LTP] [PATCH v3 2/2] syscalls/openat: Add new regression test when using open(O_TMPFILE) under umask Yang Xu
2022-08-31 6:09 ` xuyang2018.jy
2022-09-13 11:42 ` Cyril Hrubis
2022-09-14 5:49 ` xuyang2018.jy
2022-08-03 7:49 ` [LTP] [PATCH v2 1/2] syscalls/creat09: Add umask test condition Christian Brauner
2022-08-03 8:06 ` xuyang2018.jy
2022-08-04 15:47 ` Martin Doucha
2022-08-05 11:13 ` xuyang2018.jy
2022-08-15 9:32 ` Christian Brauner
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=YuwszCiMuZj3JgYA@pevik \
--to=pvorel@suse.cz \
--cc=brauner@kernel.org \
--cc=ltp@lists.linux.it \
--cc=mdoucha@suse.cz \
/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