From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] open14: Rewrite to new API
Date: Tue, 22 Jul 2025 10:32:21 +0200 [thread overview]
Message-ID: <20250722083221.GB19816@pevik> (raw)
In-Reply-To: <20250721154946.34223-1-mdoucha@suse.cz>
Hi Martin,
> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
> Changes since v1:
> - Added subtest info to test description
> - Added .needs_root = 1
Thank you!
...
> -#define _GNU_SOURCE
I also think that _GNU_SOURCE is not needed, hopefully this will not break some
non-glibc libc. But it looks to be ok for MUSL and uclibc-ng follows glibc API.
> -#include <sys/types.h>
> -#include <sys/stat.h>
> -#include <unistd.h>
> -#include <errno.h>
> +/*\
> + * Check the functionality of O_TMPFILE flag for open() syscall:
Unfortunately, this requires a blank line otherwise the text in generated doc [1] will be inline:
Check the functionality of O_TMPFILE flag for open() syscall: 1) Creation and linking (naming) of a single temp file 2) Creation of multiple unlinked temp files in a hierarchy of directories 3) Access permissions of linked temp files match creation mode argument
I plan to modify doc/conf.py to add this blank line if it's missing. (I would
prefer this would be already in json generated metadata/metaparse.c but Cyril
wanted to be in the code which generates output from JSON.
[1] https://linux-test-project.readthedocs.io/en/latest/users/test_catalog.html#open14
> + * 1) Creation and linking (naming) of a single temp file
> + * 2) Creation of multiple unlinked temp files in a hierarchy of directories
> + * 3) Access permissions of linked temp files match creation mode argument
> + */
...
> for (i = 0; i < blocks_num; ++i)
> - SAFE_WRITE(cleanup, SAFE_WRITE_ALL, fd, buf, size);
> + SAFE_WRITE(1, fd, buf, size);
Although SAFE_WRITE_ALL is ugly it's IMHO more descriptive than 1.
It's also more widely used in LTP tests than 1, but I'm ok with it.
The rest LGTM.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
If you don't mind I would amend the code before merge (diff below).
Kind regards,
Petr
+++ testcases/kernel/syscalls/open/open14.c
@@ -7,6 +7,7 @@
/*\
* Check the functionality of O_TMPFILE flag for open() syscall:
+ *
* 1) Creation and linking (naming) of a single temp file
* 2) Creation of multiple unlinked temp files in a hierarchy of directories
* 3) Access permissions of linked temp files match creation mode argument
@@ -53,7 +54,7 @@ static void write_file(int fd)
SAFE_WRITE(1, fd, buf, size);
}
-void test01(void)
+static void test01(void)
{
struct stat st;
char path[PATH_MAX];
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-07-22 8:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 15:49 [LTP] [PATCH v2] open14: Rewrite to new API Martin Doucha
2025-07-22 8:32 ` Petr Vorel [this message]
2025-07-22 13:01 ` Martin Doucha
2025-07-24 8:00 ` Petr Vorel
2025-07-22 13:26 ` 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=20250722083221.GB19816@pevik \
--to=pvorel@suse.cz \
--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