From: Jacob Bachmeyer Date: Sat, 25 Mar 2023 01:02:00 +0000 (-0500) Subject: Fix bug in test driver X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=14d9bba1fce6b032119bba38bf0b1adf7d7f38e6;p=gatekeeper.git Fix bug in test driver This bug was exposed in commit fc58d8e82444d9f949f2ac5cbbed928ad6b12c30, but only affected testsuite runs when coverage data is collected. The exact cause is unknown, but that commit changed the processing used for verifying signatures and the bug caused the testsuite to prematurely declare the gatekeeper run complete and move on to the next test when a signature was verified. Presumably, the improved signature verification somehow interacted poorly with Expect. Bizarrely, the issue only occurred when Devel::Cover was used to check the coverage of the testsuite and did not occur under regular testing. The root cause is surely timing related, since perl is much slower when collecting code coverage data. This is also the reason the bug went unnoticed for so long: coverage runs are infrequent except when making improvements to the testsuite. --- diff --git a/testsuite/lib/gatekeeper.exp b/testsuite/lib/gatekeeper.exp index e4c9f5a..e3a0220 100644 --- a/testsuite/lib/gatekeeper.exp +++ b/testsuite/lib/gatekeeper.exp @@ -311,7 +311,8 @@ proc run_upload_batch_test {} { lappend runcmd $GATEKEEPER_TOOL --testing-this-script eval $runcmd # copy any output produced to the log - expect { -re {.+} { exp_continue } eof { wait } } + expect { -re {.+} { exp_continue } eof } + wait -i $spawn_id } proc analyze_file_tree { base_dir name zones mode {itemlist {}} } {