verify: add verify mode for a pattern with header
authorVincent Fu <vincentfu@gmail.com>
Thu, 8 May 2025 18:58:09 +0000 (14:58 -0400)
committerVincent Fu <vincent.fu@samsung.com>
Fri, 16 May 2025 16:09:30 +0000 (12:09 -0400)
Add a verify=pattern_hdr option. Previously this was only available when
verify_pattern was set and verify= was omitted. Add a means to
explicitly select this verificaiton mode.

This is useful in the t/verify.py test script because it's troublesome
to have some jobs with a verify= option and omit this option in other
jobs when we want to test pattern verification with a header.

Link: https://lore.kernel.org/r/20250508185832.3702-2-vincent.fu@samsung.com
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
HOWTO.rst
fio.1
options.c

index a5033d825b61b3e12b554abdcaed623a447fee65..78a259efdd3fdcafb31707a3342fa561cf1575c2 100644 (file)
--- a/HOWTO.rst
+++ b/HOWTO.rst
@@ -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.
diff --git a/fio.1 b/fio.1
index 69dd892fc3fb4262931670b5a71e60d3a0908292..f19b25fb08eb815f578e95dfd4b30f9e70bba778 100644 (file)
--- a/fio.1
+++ b/fio.1
@@ -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.
index 71c97e9e35289c5b6fcc30baccef342e3118af7d..28ffc7480d0d1b22a3a98e35d8379e2be9b03318 100644 (file)
--- a/options.c
+++ b/options.c
@@ -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,