[LTP] [PATCH v2 3/4] syscalls/pwritev: Fix docparse
Xiao Yang
yangx.jy@fujitsu.com
Sun Jan 21 13:29:58 CET 2024
Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com>
---
testcases/kernel/syscalls/pwritev/pwritev01.c | 16 +++++-----
testcases/kernel/syscalls/pwritev/pwritev02.c | 32 +++++++------------
testcases/kernel/syscalls/pwritev/pwritev03.c | 6 ++--
3 files changed, 23 insertions(+), 31 deletions(-)
diff --git a/testcases/kernel/syscalls/pwritev/pwritev01.c b/testcases/kernel/syscalls/pwritev/pwritev01.c
index 66358f7c4..d0ec14a69 100644
--- a/testcases/kernel/syscalls/pwritev/pwritev01.c
+++ b/testcases/kernel/syscalls/pwritev/pwritev01.c
@@ -4,14 +4,14 @@
* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
*/
-/*
-* Test Name: pwritev01
-*
-* Test Description:
-* Testcase to check the basic functionality of the pwritev(2).
-* pwritev(2) should succeed to write the expected content of data
-* and after writing the file, the file offset is not changed.
-*/
+/*\
+ * [Description]
+ *
+ * Testcase to check the basic functionality of the pwritev(2).
+ *
+ * pwritev(2) should succeed to write the expected content of data
+ * and after writing the file, the file offset is not changed.
+ */
#define _GNU_SOURCE
#include <string.h>
diff --git a/testcases/kernel/syscalls/pwritev/pwritev02.c b/testcases/kernel/syscalls/pwritev/pwritev02.c
index 0881b7566..f3a7cc003 100644
--- a/testcases/kernel/syscalls/pwritev/pwritev02.c
+++ b/testcases/kernel/syscalls/pwritev/pwritev02.c
@@ -4,27 +4,17 @@
* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
*/
-/*
-* Test Name: pwritev02
-*
-* Description:
-* 1) pwritev(2) fails if iov_len is invalid.
-* 2) pwritev(2) fails if the vector count iovcnt is less than zero.
-* 3) pwritev(2) fails if offset is negative.
-* 4) pwritev(2) fails when attempts to write from a invalid address
-* 5) pwritev(2) fails if file descriptor is invalid.
-* 6) pwritev(2) fails if file descriptor is not open for writing.
-* 7) pwritev(2) fails if fd is associated with a pipe.
-*
-* Expected Result:
-* 1) pwritev(2) should return -1 and set errno to EINVAL.
-* 2) pwritev(2) should return -1 and set errno to EINVAL.
-* 3) pwritev(2) should return -1 and set errno to EINVAL.
-* 4) pwritev(2) should return -1 and set errno to EFAULT.
-* 5) pwritev(2) should return -1 and set errno to EBADF.
-* 6) pwritev(2) should return -1 and set errno to EBADF.
-* 7) pwritev(2) should return -1 and set errno to ESPIPE.
-*/
+/*\
+ * [Description]
+ *
+ * - EINVAL when iov_len is invalid.
+ * - EINVAL when the vector count iovcnt is less than zero.
+ * - EINVAL when offset is negative.
+ * - EFAULT when attempts to write from a invalid address
+ * - EBADF when file descriptor is invalid.
+ * - EBADF when file descriptor is not open for writing.
+ * - ESPIPE when fd is associated with a pipe.
+ */
#define _GNU_SOURCE
diff --git a/testcases/kernel/syscalls/pwritev/pwritev03.c b/testcases/kernel/syscalls/pwritev/pwritev03.c
index 8b91de336..ea2892971 100644
--- a/testcases/kernel/syscalls/pwritev/pwritev03.c
+++ b/testcases/kernel/syscalls/pwritev/pwritev03.c
@@ -4,10 +4,12 @@
* Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
*/
-/*
- * Description:
+/*\
+ * [Description]
+ *
* Check the basic functionality of the pwritev(2) for the file
* opened with O_DIRECT in all filesystem.
+ *
* pwritev(2) should succeed to write the expected content of data
* and after writing the file, the file offset is not changed.
*/
--
2.40.0
More information about the ltp
mailing list