From 3bcfd15650be9df4e8472fbd0f84ad7371a5aa5d Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Mon, 31 Oct 2022 23:04:16 -0500 Subject: [PATCH] Add processing phase tag "SC" for scan phase --- gatekeeper.pl | 7 ++++++- testsuite/lib/gatekeeper.exp | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index a23535e..82be9f1 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -2387,7 +2387,12 @@ sub cleanup { # - Main execution path # -my @packets = gather_packets($incoming_dir, $incoming_tmp); +our $Phase; +my @packets; +{ + local $Phase = 'SC'; + @packets = gather_packets($incoming_dir, $incoming_tmp); +} # we've moved the files to work on to a new directory. chdir ($incoming_tmp) diff --git a/testsuite/lib/gatekeeper.exp b/testsuite/lib/gatekeeper.exp index 224ab76..12d56f3 100644 --- a/testsuite/lib/gatekeeper.exp +++ b/testsuite/lib/gatekeeper.exp @@ -533,59 +533,59 @@ proc analyze_log { base_dir name assess } { exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\ DEBUG: uploaded file to check: ([^\r\n]+)} { # from scan_incoming readdir loop set A(scan,$expect_out(1,string)) 1 exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\ [0-9]+ files with bogus names were trashcanned} { # from scan_incoming, reporting count of bad file names exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\ Trashcanned files removed} { # from scan_incoming, when garbage files are purged exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\ DEBUG: lsof command line: [^\r\n]*} { # from scan_incoming, tracing lsof call exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\ DEBUG: lsof output: [^\r\n]*} { # from scan_incoming, tracing lsof output exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\ DEBUG: upload in progress for ([^,]+),\ ignoring during this run} { # from scan_incoming, when lsof reports file still open set A(open,$expect_out(1,string)) 1 exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\ DEBUG: ([^ ]+) has[^,]+, skipping} { # from scan_incoming, when recent mtime excludes a file set A(recent,$expect_out(1,string)) 1 exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\ DEBUG: considering stem \[([^ ]+)\] for processing.} { # from scan_incoming, top of packet checking loop set A(consider,$expect_out(1,string)) 1 exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\ processing [[]([^]]+)\]} { # 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\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\ Found directive file with filename directive \(([^ ]+)\),\ but no accompanying files.\ Ignoring directive file in this run.} { @@ -593,13 +593,13 @@ proc analyze_log { base_dir name assess } { set A(skip-loose,$expect_out(1,string)) 1 exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\ Overlength directive file \(([^ ]+)\) [^\r\n]+} { # from scan_incoming, on finding an oversize directive set A(oversize-directive,$expect_out(1,string)) 1 exp_continue } - -re {^gatekeeper\[[0-9]+\]: \(Test\)\ + -re {^gatekeeper\[[0-9]+\]: \(Test\) \[SC\]\ Overlength signature file \(([^ ]+)\) [^\r\n]+} { # from scan_incoming, on finding an oversize signature set A(oversize-signature,$expect_out(1,string)) 1 -- 2.25.1