[PATCH 01/11] verify: add verify mode for a pattern with header

Vincent Fu <[email protected]>
Newsgroups org.kernel.vger.fio
Message-ID <[email protected]>
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.

Signed-off-by: Vincent Fu <[email protected]>
---
 HOWTO.rst | 3 +++
 fio.1     | 3 +++
 options.c | 4 ++++
 3 files changed, 10 insertions(+)

diff --git a/HOWTO.rst b/HOWTO.rst
index a5033d82..78a259ef 100644
--- 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 8476b681..d6ee4193 100644
--- a/fio.1
+++ b/fio.1
@@ -3641,6 +3641,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.
diff --git a/options.c b/options.c
index 71c97e9e..28ffc748 100644
--- 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,
-- 
2.47.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.