Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message May 17, 2025

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 171e18146a3ea26491b087a29c6ee7b0ad21e719:

configure: Fix libnfs cflags and libs (2025-05-14 06:56:13 -0400)

are available in the Git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to fb253b221687439c92a0ee147427d70a4e36e28f:

t/verify: add tests to exercise verify_pattern_interval (2025-05-16 12:09:30 -0400)

----------------------------------------------------------------
Vincent Fu (11):
verify: add verify mode for a pattern with header
verify: fix verify_offset when used with pattern_hdr
verify: make verify_pattern=%o thread safe
verify: omit verify type mismatch error message for pattern verify t/fiotestcommon: lengthen timeout for longer tests
ci: for nightly verify tests use all checksum methods
ci: don't skip verify tests when triggered manually
verify: add verify_pattern_interval option
t/verify: test cases for running pattern and pattern_hdr t/verify: Windows --output work-around
t/verify: add tests to exercise verify_pattern_interval

 HOWTO.rst               |  11 ++++
 cconv.c                 |   2 +
 ci/actions-full-test.sh |   9 ++-
 fio.1                   |  10 +++
 options.c               |  16 +++++
 server.h                |   2 +-
 t/fiotestcommon.py      |   2 +-
 t/verify.py             | 123 +++++++++++++++++++++++++++++++++++--
 thread_options.h        |   3 +
 verify.c                | 158 ++++++++++++++++++++++++++++++++++++++----------
 10 files changed, 295 insertions(+), 41 deletions(-)

---

Diff of recent changes:

HOWTO.rst +11 -0
index a5033d82..f082158a 100644
@@ -3921,6 +3921,9 @@ Verification
 			basic information and checksumming, but if this option is set, only
 			the specific pattern set with :option:`verify_pattern` is verified.
 
+		**pattern_hdr**
+			Verify a pattern in conjunction with a header.
+
 		**null**
 			Only pretend to verify. Useful for testing internals with
 			:option:`ioengine`\=null, not for much else.
@@ -3974,6 +3977,14 @@ Verification
 
 		verify_pattern=0xff%o"abcd"-12
 
+.. option:: verify_pattern_interval=bool
+
+        Recreate an instance of the :option:`verify_pattern` every
+        :option:`verify_pattern_interval` bytes. This is only useful when
+        :option:`verify_pattern` contains the %o format specifier and can be
+        used to speed up the process of writing each block on a device with its
+        offset. Default: 0 (disabled).
+
 .. option:: verify_fatal=bool
 
 	Normally fio will keep checking the entire contents before quitting on a
cconv.c +2 -0
index cc1a52c7..d2faf83e 100644
@@ -186,6 +186,7 @@ int convert_thread_options_to_cpu(struct thread_options *o,
 	o->verify_header_seed = le32_to_cpu(top->verify_header_seed);
 
 	o->verify_pattern_bytes = le32_to_cpu(top->verify_pattern_bytes);
+	o->verify_pattern_interval = le32_to_cpu(top->verify_pattern_interval);
 	o->buffer_pattern_bytes = le32_to_cpu(top->buffer_pattern_bytes);
 	if (o->verify_pattern_bytes >= MAX_PATTERN_SIZE ||
 	    o->buffer_pattern_bytes >= MAX_PATTERN_SIZE ||
@@ -448,6 +449,7 @@ void convert_thread_options_to_net(struct thread_options_pack *top,
 	top->verify_write_sequence = cpu_to_le32(o->verify_write_sequence);
 	top->verify_header_seed = cpu_to_le32(o->verify_header_seed);
 	top->verify_pattern_bytes = cpu_to_le32(o->verify_pattern_bytes);
+	top->verify_pattern_interval = cpu_to_le32(o->verify_pattern_interval);
 	top->verify_fatal = cpu_to_le32(o->verify_fatal);
 	top->verify_dump = cpu_to_le32(o->verify_dump);
 	top->verify_async = cpu_to_le32(o->verify_async);
ci/actions-full-test.sh +6 -3
index 4222a21a..6fa9f4ad 100755
@@ -35,14 +35,17 @@ main() {
 
     fi
 
-    # If we are running a nightly test just run the verify tests.
-    # Otherwise skip the verify test script because it takes so long.
+    # If we are running a nightly test just run the verify tests.  Skip the
+    # verify test script with pull requests and pushes because it takes so
+    # long. When this workflow is run manually everything will be run.
     if [ "${GITHUB_EVENT_NAME}" == "schedule" ]; then
 	args+=(
 	    --run-only
 	    1017
+	    -p
+	    "1017:--complete"
 	)
-    else
+    elif [ "${GITHUB_EVENT_NAME}" == "pull_request" ] || [ "${GITHUB_EVENT_NAME}" == "push" ]; then
 	skip+=(
 	    1017
 	)
fio.1 +10 -0
index 69dd892f..0071c364 100644
@@ -3642,6 +3642,9 @@ Verify a strict pattern. Normally fio includes a header with some
 basic information and checksumming, but if this option is set, only
 the specific pattern set with \fBverify_pattern\fR is verified.
 .TP
+.B pattern_hdr
+Verify a pattern in conjunction with a header.
+.TP
 .B null
 Only pretend to verify. Useful for testing internals with
 `ioengine=null', not for much else.
@@ -3699,6 +3702,13 @@ verify_pattern=0xff%o"abcd"\-12
 .RE
 .RE
 .TP
+.BI verify_pattern_interval \fR=\fPbool
+Recreate an instance of the \fBverify_pattern\fR every
+\fBverify_pattern_interval\fR bytes. This is only useful when
+\fBverify_pattern\fR contains the %o format specifier and can be used to speed
+up the process of writing each block on a device with its offset. Default:
+0 (disabled).
+.TP
 .BI verify_fatal \fR=\fPbool
 Normally fio will keep checking the entire contents before quitting on a
 block verification failure. If this option is set, fio will exit the job on
options.c +16 -0
index 71c97e9e..cfece3fe 100644
@@ -3217,6 +3217,10 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
 			    .oval = VERIFY_PATTERN_NO_HDR,
 			    .help = "Verify strict pattern",
 			  },
+			  { .ival = "pattern_hdr",
+			    .oval = VERIFY_PATTERN,
+			    .help = "Verify pattern with header",
+			  },
 			  {
 			    .ival = "null",
 			    .oval = VERIFY_NULL,
@@ -3287,6 +3291,18 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
 		.category = FIO_OPT_C_IO,
 		.group	= FIO_OPT_G_VERIFY,
 	},
+	{
+		.name	= "verify_pattern_interval",
+		.lname	= "Running verify pattern",
+		.type	= FIO_OPT_INT,
+		.off1	= offsetof(struct thread_options, verify_pattern_interval),
+		.def	= "0",
+		.help	= "Re-create verify pattern every N bytes",
+		.parent = "verify",
+		.hide	= 1,
+		.category = FIO_OPT_C_IO,
+		.group	= FIO_OPT_G_VERIFY,
+	},
 	{
 		.name	= "verify_fatal",
 		.lname	= "Verify fatal",
server.h +1 -1
index 0b93cd02..713fd8e4 100644
@@ -51,7 +51,7 @@ struct fio_net_cmd_reply {
 };
 
 enum {
-	FIO_SERVER_VER			= 110,
+	FIO_SERVER_VER			= 111,
 
 	FIO_SERVER_MAX_FRAGMENT_PDU	= 1024,
 	FIO_SERVER_MAX_CMD_MB		= 2048,
t/fiotestcommon.py +1 -1
index 9003b4c1..04dfb91f 100644
@@ -22,7 +22,7 @@ SUCCESS_DEFAULT = {
 SUCCESS_LONG = {
     'zero_return': True,
     'stderr_empty': True,
-    'timeout': 1800,
+    'timeout': 3600,
     }
 SUCCESS_NONZERO = {
     'zero_return': False,
t/verify.py +119 -4

217 lines not on this page · raw message

thread_options.h +3 -0
index b0094651..6c9dd80a 100644
@@ -146,6 +146,7 @@ struct thread_options {
 	unsigned int verify_offset;
 	char *verify_pattern;
 	unsigned int verify_pattern_bytes;
+	unsigned int verify_pattern_interval;
 	struct pattern_fmt verify_fmt[8];
 	unsigned int verify_fmt_sz;
 	unsigned int verify_fatal;
@@ -478,6 +479,7 @@ struct thread_options_pack {
 	uint32_t verify_interval;
 	uint32_t verify_offset;
 	uint32_t verify_pattern_bytes;
+	uint32_t verify_pattern_interval;
 	uint32_t verify_fatal;
 	uint32_t verify_dump;
 	uint32_t verify_async;
@@ -517,6 +519,7 @@ struct thread_options_pack {
 
 	struct zone_split zone_split[DDIR_RWDIR_CNT][ZONESPLIT_MAX];
 	uint32_t zone_split_nr[DDIR_RWDIR_CNT];
+	uint32_t pad2;
 
 	fio_fp64_t zipf_theta;
 	fio_fp64_t pareto_h;
verify.c +126 -32

204 lines not on this page · raw message