Skip to contentSkip to conversation

fsync03: Convert docs to docparse

PATCH New Ma Xinjian via ltp 1 participant 3 messages Feb 10, 2025 – Feb 17, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsync03: Convert docs to docparse

---
 testcases/kernel/syscalls/fsync/fsync03.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
testcases/kernel/syscalls/fsync/fsync03.c +9 -8
index d32c4a3e7..1fd8e8648 100644
@@ -4,14 +4,15 @@
  *   Copyright (c) 2019 SUSE LLC <[email protected]>
  */
 
-/*
- * Test Description:
- *  Testcase to check that fsync(2) sets errno correctly.
- *  1. Call fsync() on a pipe(fd), and expect EINVAL.
- *  2. Call fsync() on a socket(fd), and expect EINVAL.
- *  3. Call fsync() on a closed fd, and test for EBADF.
- *  4. Call fsync() on an invalid fd, and test for EBADF.
- *  5. Call fsync() on a fifo(fd), and expect EINVAL.
+/*\
+ * [Description]
+ *
+ * Verify that fsync(2) sets errno to:
+ * 1. EINVAL if calling fsync() on a pipe(fd)
+ * 2. EINVAL if calling fsync() on a socket(fd)
+ * 3. EBADF if calling fsync() on a closed fd
+ * 4. EBADF if calling fsync() on an invalid fd
+ * 5. EINVAL if calling fsync() on a fifo(fd)
  */
 
 #include <unistd.h>
Signature · 5 lines
2.47.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

PATCH v2 1/1 fsync03: Convert docs to docparse

---
 testcases/kernel/syscalls/fsync/fsync03.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
testcases/kernel/syscalls/fsync/fsync03.c +7 -8
index d32c4a3e7..d8c321b85 100644
@@ -4,14 +4,13 @@
  *   Copyright (c) 2019 SUSE LLC <[email protected]>
  */
 
-/*
- * Test Description:
- *  Testcase to check that fsync(2) sets errno correctly.
- *  1. Call fsync() on a pipe(fd), and expect EINVAL.
- *  2. Call fsync() on a socket(fd), and expect EINVAL.
- *  3. Call fsync() on a closed fd, and test for EBADF.
- *  4. Call fsync() on an invalid fd, and test for EBADF.
- *  5. Call fsync() on a fifo(fd), and expect EINVAL.
+/*\
+ * Verify that fsync(2) sets errno to:
+ * 1. EINVAL if calling fsync() on a pipe(fd).
+ * 2. EINVAL if calling fsync() on a socket(fd).
+ * 3. EBADF if calling fsync() on a closed fd.
+ * 4. EBADF if calling fsync() on an invalid fd.
+ * 5. EINVAL if calling fsync() on a fifo(fd).
  */
 
 #include <unistd.h>
Signature · 5 lines
2.47.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw

Hi Ma,

we are currently moving from docparse to RST format [1], so if you want, you can already update to it. Thanks,

Andrea

[1] https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html

Quoted 31 lines · Ma Xinjian via ltp
---
  testcases/kernel/syscalls/fsync/fsync03.c | 15 +++++++--------
  1 file changed, 7 insertions(+), 8 deletions(-)
testcases/kernel/syscalls/fsync/fsync03.c +7 -8
index d32c4a3e7..d8c321b85 100644
@@ -4,14 +4,13 @@
   *   Copyright (c) 2019 SUSE LLC <[email protected]>
   */
 
-/*
- * Test Description:
- *  Testcase to check that fsync(2) sets errno correctly.
- *  1. Call fsync() on a pipe(fd), and expect EINVAL.
- *  2. Call fsync() on a socket(fd), and expect EINVAL.
- *  3. Call fsync() on a closed fd, and test for EBADF.
- *  4. Call fsync() on an invalid fd, and test for EBADF.
- *  5. Call fsync() on a fifo(fd), and expect EINVAL.
+/*\
+ * Verify that fsync(2) sets errno to:
+ * 1. EINVAL if calling fsync() on a pipe(fd).
+ * 2. EINVAL if calling fsync() on a socket(fd).
+ * 3. EBADF if calling fsync() on a closed fd.
+ * 4. EBADF if calling fsync() on an invalid fd.
+ * 5. EINVAL if calling fsync() on a fifo(fd).
   */
 
  #include <unistd.h>
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp