* [LTP] [PATCH] open08.c: Docparse format and rewording of description
@ 2022-07-09 16:49 Avinesh Kumar
2022-07-11 6:24 ` Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Avinesh Kumar @ 2022-07-09 16:49 UTC (permalink / raw)
To: ltp
Signed-off-by: Avinesh Kumar <akumar@suse.de>
---
testcases/kernel/syscalls/open/open08.c | 38 +++++++------------------
1 file changed, 10 insertions(+), 28 deletions(-)
diff --git a/testcases/kernel/syscalls/open/open08.c b/testcases/kernel/syscalls/open/open08.c
index 10f55fb90..5e1cf82f9 100644
--- a/testcases/kernel/syscalls/open/open08.c
+++ b/testcases/kernel/syscalls/open/open08.c
@@ -4,35 +4,17 @@
* Copyright (c) 2018 Linux Test Project
*/
-/*
- * DESCRIPTION
- * Check for the following errors:
- * 1. EEXIST
- * 2. EISDIR
- * 3. ENOTDIR
- * 4. ENAMETOOLONG
- * 5. EACCES
- * 6. EFAULT
- *
- * ALGORITHM
- * 1. Open a file with O_CREAT and O_EXCL, when the file already
- * exists. Check the errno for EEXIST
- *
- * 2. Pass a directory as the pathname and request a write access,
- * check for errno for EISDIR
- *
- * 3. Specify O_DIRECTORY as a parameter to open and pass a file as the
- * pathname, check errno for ENOTDIR
- *
- * 4. Attempt to open() a filename which is more than VFS_MAXNAMLEN, and
- * check for errno to be ENAMETOOLONG.
- *
- * 5. Attempt to open a (0600) file owned by different user in WRONLY mode,
- * open(2) should fail with EACCES.
+/*\
+ * [Description]
*
- * 6. Attempt to pass an invalid pathname with an address pointing outside
- * the accessible address space of the process, as the argument to open(),
- * and expect to get EFAULT.
+ * Verify that open() fails with:
+ * - EEXIST when pathname already exists and O_CREAT and O_EXCL were used.
+ * - EISDIR when pathname refers to a directory and the access requested
+ * involved writing.
+ * - ENOTDIR when O_DIRECTORY was specified and pathname was not a directory.
+ * - ENAMETOOLONG when pathname was too long.
+ * - EACCES when requested access to the file is not allowed.
+ * - EFAULT when pathname points outside the accessible address space.
*/
#define _GNU_SOURCE /* for O_DIRECTORY */
--
2.36.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] open08.c: Docparse format and rewording of description
2022-07-09 16:49 [LTP] [PATCH] open08.c: Docparse format and rewording of description Avinesh Kumar
@ 2022-07-11 6:24 ` Petr Vorel
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2022-07-11 6:24 UTC (permalink / raw)
To: Avinesh Kumar; +Cc: ltp
Hi Avinesh,
> + * Verify that open() fails with:
Here needs to be blank line otherwise the result would be wrongly formatted:
Verify that open() fails with: - EEXIST when pathname already exists and O_CREAT and O_EXCL were used - EISDIR when pathname refers to a directory and the access requested involved writing - ENOTDIR when O_DIRECTORY was specified and pathname was not a directory - ENAMETOOLONG when pathname was too long - EACCES when requested access to the file is not allowed - EFAULT when pathname points outside the accessible address space
Please next time verify the result (cd metadata && make && $BROWSER ../docparse/*.html
Merged with this fix, removed docs and space behind #define.
Kind regards,
Petr
> + * - EEXIST when pathname already exists and O_CREAT and O_EXCL were used.
> + * - EISDIR when pathname refers to a directory and the access requested
> + * involved writing.
> + * - ENOTDIR when O_DIRECTORY was specified and pathname was not a directory.
> + * - ENAMETOOLONG when pathname was too long.
> + * - EACCES when requested access to the file is not allowed.
> + * - EFAULT when pathname points outside the accessible address space.
> */
> #define _GNU_SOURCE /* for O_DIRECTORY */
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-11 6:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-09 16:49 [LTP] [PATCH] open08.c: Docparse format and rewording of description Avinesh Kumar
2022-07-11 6:24 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox