From ab4e5b728525fa1409f64fe02713e45c68683fa1 Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Thu, 8 May 2025 14:58:09 -0400 Subject: [PATCH] verify: add verify mode for a pattern with header 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 --- 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 69dd892f..f19b25fb 100644 --- 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. 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.25.1