From bbb9d8c6386d0ce77397e1d6f1b14d1b49e740f1 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Sat, 15 Oct 2022 19:28:25 -0500 Subject: [PATCH] Update testsuite for terminology change The original concept of "triplets" is now generalized to "packets" that can contain any number of files. --- testsuite/gatekeeper.all/01_loose.exp | 1 + testsuite/gatekeeper.all/03_triplet.exp | 76 ++++++++++++------------- testsuite/gatekeeper.all/11_am_cve.exp | 2 +- testsuite/lib/gatekeeper.exp | 6 +- 4 files changed, 43 insertions(+), 42 deletions(-) diff --git a/testsuite/gatekeeper.all/01_loose.exp b/testsuite/gatekeeper.all/01_loose.exp index e15fb86..17e4a2b 100644 --- a/testsuite/gatekeeper.all/01_loose.exp +++ b/testsuite/gatekeeper.all/01_loose.exp @@ -32,6 +32,7 @@ proc check_loose_directive { desc case args } { scan,foo.directive.asc "scan found directive file" consider,foo "considered loose directive file" found,foo.directive.asc "found directive file for processing" + found-packet,foo.directive.asc "found loose directive packet" } if { [llength $opt(log)] > 0 } { append log_items $opt(log) } diff --git a/testsuite/gatekeeper.all/03_triplet.exp b/testsuite/gatekeeper.all/03_triplet.exp index 1f3b1f5..e55980c 100644 --- a/testsuite/gatekeeper.all/03_triplet.exp +++ b/testsuite/gatekeeper.all/03_triplet.exp @@ -110,7 +110,7 @@ check_triplet "bogus: signature from unknown key in directive" setup { } } log { found,foo.tar.gz.directive.asc "found directive in triplet" - found-triplet,foo.tar.gz.directive.asc:foo.tar.gz.sig:foo.tar.gz \ + found-packet,foo.tar.gz.directive.asc:foo.tar.gz.sig:foo.tar.gz \ "found triplet" gpgv,directive-verify-failed "incorrect signature rejected" } email-to { @@ -146,7 +146,7 @@ check_triplet "bogus: signature from unknown key on file" setup { } } log { found,foo.tar.gz.directive.asc "found directive in triplet" - found-triplet,foo.tar.gz.directive.asc:foo.tar.gz.sig:foo.tar.gz \ + found-packet,foo.tar.gz.directive.asc:foo.tar.gz.sig:foo.tar.gz \ "found triplet" gpgv,upload-verify-failed,foo.tar.gz "incorrect signature rejected" } email-to { @@ -185,7 +185,7 @@ check_triplet "bogus: bad signature in directive" setup { } } log { found,foo.tar.gz.directive.asc "found directive in triplet" - found-triplet,foo.tar.gz.directive.asc:foo.tar.gz.sig:foo.tar.gz \ + found-packet,foo.tar.gz.directive.asc:foo.tar.gz.sig:foo.tar.gz \ "found triplet" gpgv,directive-verify-failed "incorrect signature rejected" } email-to { @@ -221,7 +221,7 @@ check_triplet "bogus: bad signature on file" setup { } } log { found,foo.tar.gz.directive.asc "found directive in triplet" - found-triplet,foo.tar.gz.directive.asc:foo.tar.gz.sig:foo.tar.gz \ + found-packet,foo.tar.gz.directive.asc:foo.tar.gz.sig:foo.tar.gz \ "found triplet" gpgv,upload-verify-failed "incorrect signature rejected" } email-to { @@ -253,7 +253,7 @@ check_triplet "bogus: empty directive" setup { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" } email-to { ftp-upload-script@gnu.org foo@example.gnu.org @@ -287,7 +287,7 @@ check_triplet "bogus: directive with unknown key" setup { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-directive-line "bogus directive line detected" } email-to { @@ -324,7 +324,7 @@ check_triplet "bogus: signed for unknown package" setup { } } log { found,bar.tar.gz.directive.asc "found directive in triplet" - found-triplet,bar.tar.gz.directive.asc:bar.tar.gz.sig:bar.tar.gz \ + found-packet,bar.tar.gz.directive.asc:bar.tar.gz.sig:bar.tar.gz \ "found triplet" unknown-package "unknown package from directive" } email-to { @@ -365,7 +365,7 @@ check_triplet "bogus: signed but package has no keys" setup { } } log { found,bar.tar.gz.directive.asc "found directive in triplet" - found-triplet,bar.tar.gz.directive.asc:bar.tar.gz.sig:bar.tar.gz \ + found-packet,bar.tar.gz.directive.asc:bar.tar.gz.sig:bar.tar.gz \ "found triplet" gpgv,directive-verify-failed "reject upload for misconfigured package" } email-to { @@ -409,7 +409,7 @@ check_triplet "bogus: signed but package has no email addresses" setup { } } log { found,bar.tar.gz.directive.asc "found directive in triplet" - found-triplet,bar.tar.gz.directive.asc:bar.tar.gz.sig:bar.tar.gz \ + found-packet,bar.tar.gz.directive.asc:bar.tar.gz.sig:bar.tar.gz \ "found triplet" unknown-package "reject upload for misconfigured package" } email-to { @@ -444,7 +444,7 @@ check_triplet "bogus: directive signature from the future" setup { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,future-signature-timestamp \ "reject upload from the future" @@ -487,7 +487,7 @@ check_triplet "bogus: signed with wrong key" setup { } } log { found,bar.tar.gz.directive.asc "found directive in triplet" - found-triplet,bar.tar.gz.directive.asc:bar.tar.gz.sig:bar.tar.gz \ + found-packet,bar.tar.gz.directive.asc:bar.tar.gz.sig:bar.tar.gz \ "found triplet" gpgv,directive-verify-failed "incorrect signature rejected" } email-to { @@ -529,7 +529,7 @@ check_triplet "bogus: signed with wrong key in directive" setup { } } log { found,bar.tar.gz.directive.asc "found directive in triplet" - found-triplet,bar.tar.gz.directive.asc:bar.tar.gz.sig:bar.tar.gz \ + found-packet,bar.tar.gz.directive.asc:bar.tar.gz.sig:bar.tar.gz \ "found triplet" gpgv,directive-verify-failed "incorrect signature rejected" } email-to { @@ -572,7 +572,7 @@ check_triplet "bogus: signed with wrong key on file" setup { } } log { found,bar.tar.gz.directive.asc "found directive in triplet" - found-triplet,bar.tar.gz.directive.asc:bar.tar.gz.sig:bar.tar.gz \ + found-packet,bar.tar.gz.directive.asc:bar.tar.gz.sig:bar.tar.gz \ "found triplet" gpgv,upload-verify-failed "incorrect signature rejected" } email-to { @@ -618,7 +618,7 @@ check_triplet "bogus: version field not a number" setup { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-version "invalid version rejected" } email-to { @@ -651,7 +651,7 @@ check_triplet "bogus: invalid v1.0 format directive" setup { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-version "invalid version rejected" } email-to { @@ -682,7 +682,7 @@ check_triplet "obsolete: v1.0 format directive" setup { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,no-filename "directive file lacking version rejected" } email-to { @@ -719,7 +719,7 @@ check_triplet "bogus: duplicated version key" setup { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-version-repeat "version key repeated" } email-to { @@ -753,7 +753,7 @@ check_triplet "bogus: ambiguous version declaration" setup { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-version-repeat "version key repeated" } email-to { @@ -789,7 +789,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,no-filename "directive file lacking filename rejected" } email-to { @@ -823,7 +823,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-filename \ "directive file with bogus filename rejected" @@ -858,7 +858,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-filename-repeat \ "directive file with repeated filename rejected" @@ -893,7 +893,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-filename-repeat \ "directive file with ambiguous filename rejected" @@ -927,7 +927,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,filename-mismatch \ "directive file with wrong filename rejected" @@ -961,7 +961,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,no-directory-given \ "directive file with no directory key rejected" @@ -996,7 +996,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-directory \ "directive file with empty directory key rejected" @@ -1038,7 +1038,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-directory \ "directive file with invalid directory $BDIR rejected" @@ -1074,7 +1074,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-directory-depth \ "directive file with excessively deep directory rejected" @@ -1110,7 +1110,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-directory-repeat \ "directive file with repeated directory key rejected" @@ -1147,7 +1147,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-directory-repeat \ "directive file with ambiguous directory key rejected" @@ -1191,7 +1191,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" workdone,1 "1 upload processed" } email-to { @@ -1228,7 +1228,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" workdone,1 "1 upload processed" } email-to { @@ -1265,7 +1265,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" gpgv,directive-verify-failed "directive signature rejected" } email-to { @@ -1302,7 +1302,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" workdone,1 "1 upload processed" } email-to { @@ -1344,7 +1344,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" install,target-signature-exists \ "existing signature not replaced" @@ -1387,7 +1387,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" install,target-file-exists \ "existing file not replaced" @@ -1431,7 +1431,7 @@ check_triplet "bogus: v1.1 format directive to replace file" setup { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-replace-flag \ "replace flag rejected in v1.1" @@ -1471,7 +1471,7 @@ check_triplet "v1.2 format directive to replace file" setup { { archive } archived-files { foo/foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" install,target-signature-replaced "signature replaced using v1.2" install,target-file-replaced "file replaced using v1.2" @@ -1513,7 +1513,7 @@ check_triplet "bogus: v1.2 format directive with bogus replace value" setup { } } log { found,foo.bin.directive.asc "found directive in triplet" - found-triplet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ + found-packet,foo.bin.directive.asc:foo.bin.sig:foo.bin \ "found triplet" validate,bad-parameter,replace \ "invalid replace flag value rejected" diff --git a/testsuite/gatekeeper.all/11_am_cve.exp b/testsuite/gatekeeper.all/11_am_cve.exp index 9df83dc..3c4523b 100644 --- a/testsuite/gatekeeper.all/11_am_cve.exp +++ b/testsuite/gatekeeper.all/11_am_cve.exp @@ -38,7 +38,7 @@ proc check_am_cve_upload {desc fragment {log {}}} { mail,addresses "outgoing mail sent" found,foo.tar.gz.directive.asc "found directive in triplet" - found-triplet,foo.tar.gz.directive.asc:foo.tar.gz.sig:foo.tar.gz \ + found-packet,foo.tar.gz.directive.asc:foo.tar.gz.sig:foo.tar.gz \ "found triplet" exploit-check,check-Makefile.in "checked for Makefile.in in tarball" diff --git a/testsuite/lib/gatekeeper.exp b/testsuite/lib/gatekeeper.exp index 0f852e2..683b6e6 100644 --- a/testsuite/lib/gatekeeper.exp +++ b/testsuite/lib/gatekeeper.exp @@ -574,9 +574,9 @@ proc analyze_log { base_dir name assess } { } -re {^gatekeeper\[[0-9]+\]: \(Test\)\ processing [[]([^]]+)\]} { - # from scan_incoming, when a triplet is found - set A(found-triplet) 1 - set A(found-triplet,$expect_out(1,string)) 1 + # from scan_incoming, when a packet is found + set A(found-packet) 1 + set A(found-packet,$expect_out(1,string)) 1 exp_continue } -re {^gatekeeper\[[0-9]+\]: \(Test\)\ -- 2.25.1