public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v4 0/3] Add test for misaligned fallocate()
@ 2020-01-24 12:55 Martin Doucha
  2020-01-24 12:55 ` [LTP] [PATCH v4 1/3] Add tst_purge_dir() helper function Martin Doucha
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Martin Doucha @ 2020-01-24 12:55 UTC (permalink / raw)
  To: ltp

This patch is a follow-up to the fallocate05 fix. The original fallocate05
test accidentally tested some misaligned allocation and deallocation
on platforms with block size bigger than 8k but it didn't validate
the results correctly. Test calling fallocate() on misaligned file range
and this time validate the results properly, taking into account advanced
FS features like copy-on-write.

Changes since v1:
- Fix compilation with --std=c89
- Misalign by at most 512 bytes, otherwise the test may miss an XFS bug on PPC
- Clear the temp directory using tst_purge_dir()
- Remove useless check in purge_dir()
- Fix potential buffer overflow in rmdir()/purge_dir()
- Add description of tst_purge_dir() to test writing guidelines

Martin Doucha (3):
  Add tst_purge_dir() helper function
  Add test for misaligned fallocate()
  Purge temp directory after each run of fallocate05

 doc/test-writing-guidelines.txt               |  11 +
 include/tst_device.h                          |   5 +
 lib/tst_tmpdir.c                              |  97 ++++---
 runtest/syscalls                              |   1 +
 .../kernel/syscalls/fallocate/fallocate05.c   |  11 +-
 .../kernel/syscalls/fallocate/fallocate06.c   | 253 ++++++++++++++++++
 6 files changed, 332 insertions(+), 46 deletions(-)
 create mode 100644 testcases/kernel/syscalls/fallocate/fallocate06.c

-- 
2.24.1


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

end of thread, other threads:[~2020-02-19 15:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-24 12:55 [LTP] [PATCH v4 0/3] Add test for misaligned fallocate() Martin Doucha
2020-01-24 12:55 ` [LTP] [PATCH v4 1/3] Add tst_purge_dir() helper function Martin Doucha
2020-01-24 12:55 ` [LTP] [PATCH v4 2/3] Add test for misaligned fallocate() Martin Doucha
2020-02-19 15:37   ` Cyril Hrubis
2020-01-24 12:55 ` [LTP] [PATCH v4 3/3] Purge temp directory after each run of fallocate05 Martin Doucha
2020-02-19 15:37   ` Cyril Hrubis

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