Reorganize log message patterns in testsuite
authorJacob Bachmeyer <jcb@gnu.org>
Wed, 23 Nov 2022 00:42:30 +0000 (18:42 -0600)
committerJacob Bachmeyer <jcb@gnu.org>
Wed, 23 Nov 2022 00:42:30 +0000 (18:42 -0600)
This groups the message patterns by processing phase.

Prior to committing, this was validated with:
    (DIFF='git diff --cached';
     comm -3 <($DIFF | grep ^- | sed -e 's/^-//' | sort) \
             <($DIFF | grep ^+ | sed -e 's/^+//' | sort) )

The output shows only a blank line and diff headers.  To replicate, change
the "git diff" command to compare this commit with its parent.

testsuite/lib/gatekeeper.exp

index 7e5a39c44603fb1a08c0e6f829cb07bbe8545f2a..6c1f3483b842afd9121df8ca1bc2626cfbe51133 100644 (file)
@@ -496,60 +496,6 @@ proc analyze_log { base_dir name assess } {
                     # running time for the generate-ftpindex tool
                 }
 
-       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
-                [^ ]+ does not exist - can not archive} {
-                    # from archive, when target does not exist
-                    set A(action,archive-failure,not-found) 1
-                    exp_continue
-                }
-       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
-                archived [^ ]+ to [^\r\n]+} {
-                    # from archive, upon success
-                    set A(action,archive-item) 1
-                    # will need to revise log messages to make this
-                    # include a file name relative to the test base
-                    exp_continue
-                }
-
-       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
-                added symlink [^ ]+ pointing to [^\r\n]+} {
-                    # from execute_commands, creating a symlink
-                    set A(action,make-symlink) 1
-                    # will need to revise log messages to make this
-                    # include a file name relative to the test base
-                    exp_continue
-                }
-       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
-                creation of symlink [^ ]+ to [^ ]+ in [^ ]+ failed[^\r\n]+} {
-                    # from execute_commands, when the symlink builtin fails
-                    set A(action,make-symlink-failure) 1
-                    # will need to revise log messages to make this
-                    # include a file name relative to the test base
-                    exp_continue
-                }
-       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
-                symlink [^ ]+ was not found} {
-                    # from execute_commands, when an item to be removed is
-                    # not a symlink after all
-                    set A(action,rm-symlink-failure,not-found) 1
-                    exp_continue
-                }
-       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
-                refusing to remove a non-symlink file} {
-                    # from execute_commands, when an item to be removed is
-                    # not a symlink after all
-                    set A(action,rm-symlink-failure,not-link) 1
-                    exp_continue
-                }
-       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
-                removed symlink [^\r\n]+} {
-                    # from execute_commands, removing a symlink
-                    set A(action,rm-symlink) 1
-                    # will need to revise log messages to make this
-                    # include a file name relative to the test base
-                    exp_continue
-                }
-
        -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\
                 DEBUG: uploaded file to check: ([^\r\n]+)} {
                     # from scan_incoming readdir loop
@@ -623,12 +569,6 @@ proc analyze_log { base_dir name assess } {
                     exp_continue
                 }
 
-       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[AA\]\
-                DEBUG: found keyring [^\r\n]+} {
-                    # from keyring_file, while searching for keyrings
-                    exp_continue
-                }
-
        -re {^gatekeeper\[[0-9]+\]: \(Test\) \[PV\]\
                 unknown package[^\r\n]+} {
                     # from validate_commands, when package has no config tree
@@ -746,18 +686,25 @@ proc analyze_log { base_dir name assess } {
                     set A(validate,no-filename,$expect_out(1,string)) 1
                     exp_continue
                 }
-       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[AA\]\
-                no keyring for package ([^\r\n]+)} {
-                    # from read_directive_file, if package keyring not found
-                    set A(validate,package-no-keys) 1
-                    exp_continue
-                }
        -re {^gatekeeper\[[0-9]+\]: \(Test\) \[PV\]\
                 filename element mismatch: [^\r\n]+} {
                     # from read_directive_file, on name mismatch
                     set A(validate,filename-mismatch) 1
                     exp_continue
                 }
+
+       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[AA\]\
+                DEBUG: found keyring [^\r\n]+} {
+                    # from keyring_file, while searching for keyrings
+                    exp_continue
+                }
+
+       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[AA\]\
+                no keyring for package ([^\r\n]+)} {
+                    # from read_directive_file, if package keyring not found
+                    set A(validate,package-no-keys) 1
+                    exp_continue
+                }
        -re {^gatekeeper\[[0-9]+\]: \(Test\) \[AA\]\
                 DEBUG: (?:Directive|File) signature made [^\r\n]+} {
                     # from read_directive_file, reporting signature timestamp
@@ -808,6 +755,7 @@ proc analyze_log { base_dir name assess } {
                     set A(gpgv,upload-verify-failed,$expect_out(1,string)) 1
                     exp_continue
                 }
+
        -re {^gatekeeper\[[0-9]+\]: \(Test\) \[VL\]\
                 DEBUG: tested negative for CVE-[^\r\n]+} {
                     # from check_files, when checks for known issues pass
@@ -841,6 +789,59 @@ proc analyze_log { base_dir name assess } {
                     set A(install,target-file-exists) 1
                     exp_continue
                 }
+       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
+                [^ ]+ does not exist - can not archive} {
+                    # from archive, when target does not exist
+                    set A(action,archive-failure,not-found) 1
+                    exp_continue
+                }
+       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
+                archived [^ ]+ to [^\r\n]+} {
+                    # from archive, upon success
+                    set A(action,archive-item) 1
+                    # will need to revise log messages to make this
+                    # include a file name relative to the test base
+                    exp_continue
+                }
+
+       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
+                added symlink [^ ]+ pointing to [^\r\n]+} {
+                    # from execute_commands, creating a symlink
+                    set A(action,make-symlink) 1
+                    # will need to revise log messages to make this
+                    # include a file name relative to the test base
+                    exp_continue
+                }
+       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
+                creation of symlink [^ ]+ to [^ ]+ in [^ ]+ failed[^\r\n]+} {
+                    # from execute_commands, when the symlink builtin fails
+                    set A(action,make-symlink-failure) 1
+                    # will need to revise log messages to make this
+                    # include a file name relative to the test base
+                    exp_continue
+                }
+       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
+                symlink [^ ]+ was not found} {
+                    # from execute_commands, when an item to be removed is
+                    # not a symlink after all
+                    set A(action,rm-symlink-failure,not-found) 1
+                    exp_continue
+                }
+       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
+                refusing to remove a non-symlink file} {
+                    # from execute_commands, when an item to be removed is
+                    # not a symlink after all
+                    set A(action,rm-symlink-failure,not-link) 1
+                    exp_continue
+                }
+       -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
+                removed symlink [^\r\n]+} {
+                    # from execute_commands, removing a symlink
+                    set A(action,rm-symlink) 1
+                    # will need to revise log messages to make this
+                    # include a file name relative to the test base
+                    exp_continue
+                }
        -re {^gatekeeper\[[0-9]+\]: \(Test\) \[EX\]\
                 overwriting [^\r\n]+} {
                     # from install_files, if target is to be replaced