open08.c: Docparse format and rewording of description
PATCH 1/1 open08.c: Docparse format and rewording of description
--- testcases/kernel/syscalls/open/open08.c | 38 +++++++------------------ 1 file changed, 10 insertions(+), 28 deletions(-)
testcases/kernel/syscalls/open/open08.c +10 -28
@@ -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 */
Signature · 5 lines
2.36.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Avinesh,
Quoted 1 line
+ * 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
Quoted 10 lines
+ * - EEXIST when pathname already exists and
O_CREATandO_EXCLwere used.
+ * - EISDIR when pathname refers to a directory and the access requested
+ * involved writing.
+ * - ENOTDIR whenO_DIRECTORYwas 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/* forO_DIRECTORY*/
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp