public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v4 0/9] syscalls: add sync device test-cases
@ 2019-02-21  9:00 Sumit Garg
  2019-02-21  9:00 ` [LTP] [PATCH v4 1/9] lib/tst_device: add new api tst_dev_bytes_written() Sumit Garg
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Sumit Garg @ 2019-02-21  9:00 UTC (permalink / raw)
  To: ltp

This patch-set adds common test for minimal sectors written on device
for various sync related syscalls:
1. syncfs()
2. sync()
3. fsync()
4. fdatasync()
5. sync_file_range()

Also this test is run on all supported filesystems on a test block
device.

Changes in v4:
1. Update common library functions from reusability perspective.
2. Create separate patch for TEST_VOID macro.
3. Add check for broken /sys/block/<device>/stat file.
4. Miscellaneous fixups.

Changes in v3:
1. Scope increased from single patch to this patch-set to add common
   test for sync(), fsync(), fdatasync() and sync_file_range() syscalls.
2. Move common functionality to library functions.
3. Use %lu rather than %s while parsing sectors written.
4. Add config check for C library wrapper and fallback definition for
   syncfs() and sync_file_range() syscalls.

Changes in v2:
1. Remove unused header file include.
2. Remove redundant tst_device check.
3. Remove redundant flags from tst_test struct.

Fixes: https://github.com/linux-test-project/ltp/issues/294

Sumit Garg (9):
  lib/tst_device: add new api tst_dev_bytes_written()
  lib: split tst_fill_file() to create new tst_fill_fd()
  lib/tst_test: define TEST_VOID() macro
  syscalls: add syncfs() sync device test-case
  syscalls/sync: add sync device test-case
  syscalls/fsync: add sync device test-case
  syscalls/fdatasync: add sync device test-case
  syscalls/sync_file_range: Use C library wrapper if present
  syscalls/sync_file_range: add sync device test-case

 configure.ac                                       |  2 +
 include/lapi/sync_file_range.h                     | 57 +++++++++++++++++
 include/lapi/syncfs.h                              | 21 +++++++
 include/tst_device.h                               |  7 +++
 include/tst_fs.h                                   |  9 +++
 include/tst_test.h                                 |  7 +++
 lib/tst_device.c                                   | 29 +++++++++
 lib/tst_fill_file.c                                | 40 +++++++-----
 m4/ltp-sync_file_range.m4                          | 10 +++
 m4/ltp-syncfs.m4                                   | 10 +++
 runtest/syscalls                                   |  6 ++
 testcases/kernel/syscalls/fdatasync/.gitignore     |  1 +
 testcases/kernel/syscalls/fdatasync/fdatasync03.c  | 60 ++++++++++++++++++
 testcases/kernel/syscalls/fsync/.gitignore         |  1 +
 testcases/kernel/syscalls/fsync/fsync04.c          | 60 ++++++++++++++++++
 testcases/kernel/syscalls/sync/.gitignore          |  1 +
 testcases/kernel/syscalls/sync/sync03.c            | 60 ++++++++++++++++++
 .../kernel/syscalls/sync_file_range/.gitignore     |  1 +
 .../sync_file_range/check_sync_file_range.h        | 21 +++++++
 .../syscalls/sync_file_range/sync_file_range01.c   | 62 ++-----------------
 .../syscalls/sync_file_range/sync_file_range02.c   | 72 ++++++++++++++++++++++
 testcases/kernel/syscalls/syncfs/.gitignore        |  1 +
 testcases/kernel/syscalls/syncfs/Makefile          |  8 +++
 testcases/kernel/syscalls/syncfs/check_syncfs.h    | 19 ++++++
 testcases/kernel/syscalls/syncfs/syncfs01.c        | 67 ++++++++++++++++++++
 25 files changed, 558 insertions(+), 74 deletions(-)
 create mode 100644 include/lapi/sync_file_range.h
 create mode 100644 include/lapi/syncfs.h
 create mode 100644 m4/ltp-sync_file_range.m4
 create mode 100644 m4/ltp-syncfs.m4
 create mode 100644 testcases/kernel/syscalls/fdatasync/fdatasync03.c
 create mode 100644 testcases/kernel/syscalls/fsync/fsync04.c
 create mode 100644 testcases/kernel/syscalls/sync/sync03.c
 create mode 100644 testcases/kernel/syscalls/sync_file_range/check_sync_file_range.h
 create mode 100644 testcases/kernel/syscalls/sync_file_range/sync_file_range02.c
 create mode 100644 testcases/kernel/syscalls/syncfs/.gitignore
 create mode 100644 testcases/kernel/syscalls/syncfs/Makefile
 create mode 100644 testcases/kernel/syscalls/syncfs/check_syncfs.h
 create mode 100644 testcases/kernel/syscalls/syncfs/syncfs01.c

-- 
2.7.4


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2019-02-26 13:34 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-21  9:00 [LTP] [PATCH v4 0/9] syscalls: add sync device test-cases Sumit Garg
2019-02-21  9:00 ` [LTP] [PATCH v4 1/9] lib/tst_device: add new api tst_dev_bytes_written() Sumit Garg
2019-02-25 15:21   ` Cyril Hrubis
2019-02-26  6:01     ` Sumit Garg
2019-02-21  9:00 ` [LTP] [PATCH v4 2/9] lib: split tst_fill_file() to create new tst_fill_fd() Sumit Garg
2019-02-21 11:38   ` Daniel Thompson
2019-02-21 12:04     ` Cyril Hrubis
2019-02-21 13:36       ` Daniel Thompson
2019-02-25 15:22   ` Cyril Hrubis
2019-02-26  6:04     ` Sumit Garg
2019-02-21  9:00 ` [LTP] [PATCH v4 3/9] lib/tst_test: define TEST_VOID() macro Sumit Garg
2019-02-21  9:00 ` [LTP] [PATCH v4 4/9] syscalls: add syncfs() sync device test-case Sumit Garg
2019-02-21  9:00 ` [LTP] [PATCH v4 5/9] syscalls/sync: add " Sumit Garg
2019-02-21  9:00 ` [LTP] [PATCH v4 6/9] syscalls/fsync: " Sumit Garg
2019-02-21  9:00 ` [LTP] [PATCH v4 7/9] syscalls/fdatasync: " Sumit Garg
2019-02-21  9:00 ` [LTP] [PATCH v4 8/9] syscalls/sync_file_range: Use C library wrapper if present Sumit Garg
2019-02-21  9:00 ` [LTP] [PATCH v4 9/9] syscalls/sync_file_range: add sync device test-case Sumit Garg
2019-02-25 15:26   ` Cyril Hrubis
2019-02-26  9:02     ` Sumit Garg
2019-02-26 10:57       ` Cyril Hrubis
2019-02-26 11:48         ` Daniel Thompson
2019-02-26 13:34           ` Sumit Garg
2019-02-25 15:19 ` [LTP] [PATCH v4 0/9] syscalls: add sync device test-cases Cyril Hrubis
2019-02-26  5:59   ` Sumit Garg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox