test/match: support for matching UUIDs

The script can now match UUIDs via the $(UUID) marker.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ied11f9ce65e4f1102309523f3f8ec0ee7c9e74d0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11410
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Konrad Sztyber 2022-02-04 11:31:18 +01:00 committed by Jim Harris
parent 36e9dc6f16
commit a5895656ed
2 changed files with 4 additions and 2 deletions

View File

@ -58,6 +58,7 @@
# $(OPT) line is optional (may be missing, matched if found)
# $(OPX) ends a contiguous list of $(OPT)...$(OPX) lines, at least
# one of which must match
# $(UUID) universally unique identifier
#
# Additionally, if any "X.ignore" file exists, strings or phrases found per
# line in the file will be ignored if found as a substring in the
@ -241,6 +242,7 @@ sub match {
s/\\\$\\\(W\\\)/\\p{Blank}*/g;
s/\\\$\\\(nW\\\)/\\p{Graph}*/g;
s/\\\$\\\(DD\\\)/\\d+\\+\\d+ records in\n\\d+\\+\\d+ records out\n\\d+ bytes \\\(\\d+ .B\\\) copied, [.0-9e-]+[^,]*, [.0-9]+ .B.s/g;
s/\\\$\\\(UUID\\\)/\\p{XPosixXDigit}{8}-\\p{XPosixXDigit}{4}-\\p{XPosixXDigit}{4}-\\p{XPosixXDigit}{4}-\\p{XPosixXDigit}{12}/g;
if (s/\\\$\\\(OPT\\\)//) {
$opt = 1;
} elsif (s/\\\$\\\(OPX\\\)//) {

View File

@ -8,8 +8,8 @@ o- / ...........................................................................
| | o- EE_Malloc4 ...................................................................................... [Size=$(FP)M, Not claimed]
| o- iscsi ............................................................................................................ [Bdevs: 0]
| o- logical_volume ................................................................................................... [Bdevs: 2]
| | o- $(X)-$(X)-$(X)-$(X)-$(X) ................................................ [lvs0/lvol$(FP), Size=$(FP)M, Not claimed]
| | o- $(X)-$(X)-$(X)-$(X)-$(X) ................................................ [lvs0/lvol$(FP), Size=$(FP)M, Not claimed]
| | o- $(UUID) ................................................ [lvs0/lvol$(FP), Size=$(FP)M, Not claimed]
| | o- $(UUID) ................................................ [lvs0/lvol$(FP), Size=$(FP)M, Not claimed]
| o- malloc ........................................................................................................... [Bdevs: 6]
| | o- Malloc0 ............................................................................................. [Size=$(FP)M, Claimed]
| | o- Malloc1 ............................................................................................. [Size=$(FP)M, Claimed]