Skip to contentSkip to conversation

fsstress: add mwrite/mread into test operation list

PATCH Superseded Zorro Lang 1 participant 2 messages Mar 23, 2017

v7 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Zorro Lang

author
#0 lore raw

PATCH v7 1/2 fsstress: add mwrite/mread into test operation list

mmap as a popular and basic operation, most of softwares use it to access files. More and more customers report bugs related with mmap/munmap and other stress conditions.

So add mmap read/write test into fsstress to increase mmap related stress to reproduce or find more bugs easily.

---

Hi,

V7 did below changes:
1) Move inode_info() function call backward, to init "struct st" before use it.
2) Return directly if mmap fails
3) Add HAVE_SYS_MMAN_H detection in mwrite() and mread() functions.

Thanks,
Zorro

 configure.ac   |   1 +
 ltp/fsstress.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/global.h   |   4 ++
 3 files changed, 119 insertions(+)
configure.ac +1 -0
index fa48d2f..246f92e 100644
@@ -32,6 +32,7 @@ AC_HEADER_STDC
 			xfs/platform_defs.h	\
 			btrfs/ioctl.h		\
 			cifs/ioctl.h		\
+			sys/mman.h		\
     ])
 
 AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[
ltp/fsstress.c +114 -0

138 lines not on this page · raw message

src/global.h +4 -0
index f63246b..3920c0d 100644
@@ -178,4 +178,8 @@
 
 #endif /* HAVE_LINUX_FALLOC_H */
 
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
+
 #endif /* GLOBAL_H */
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=Z1leMBab4qLfpKF547IMbHJ4BYkn2LGzkzPpkm_h6co&s=2u5WJYHswnAQkeRJleiX-47Kr8_6ET2i1njN-4t5gQE&e= 
author
#1 lore raw

PATCH v7 2/2 xfs/068: update golden output due to new operations in fsstress

xfs/068 use a fixed seed (-s) and number of operations (-n) to run fsstress, to get fixed number of files and directories. But new operations of fsstress will break this "fixed number". So update it, after fsstress get new operations.

---
 tests/xfs/068     | 2 --
 tests/xfs/068.out | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
tests/xfs/068 +0 -2
index 4dac95e..7151e28 100755
@@ -43,8 +43,6 @@ trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
 _supported_fs xfs
 _supported_os Linux
 
-# need to ensure new fsstress operations don't perturb expected output
-FSSTRESS_AVOID="-f insert=0 $FSSTRESS_AVOID"
 _create_dumpdir_stress_num 4096
 _do_dump_restore
 
tests/xfs/068.out +1 -1
index 2196eee..b20604f 100644
@@ -22,7 +22,7 @@ xfsrestore: session id: ID
 xfsrestore: media ID: ID
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
-xfsrestore: 495 directories and 1593 entries processed
+xfsrestore: 474 directories and 1592 entries processed
 xfsrestore: directory post-processing
 xfsrestore: restoring non-directory files
 xfsrestore: restore complete: SECS seconds elapsed
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=j6Gl3BY0f0Kqwur7Rl1-y50OWzImgJOqxJoKZLnYgWU&s=rNtfeLyU70iT2juGD4XdKG7Gs2VBiRY5fgGo38NjUio&e=