From 9e8faa90f374d5ddfc92e6b23e9e028419cbac64 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Sat, 12 Feb 2022 22:32:24 -0600 Subject: [PATCH] Add debugging message reporting directive signature timestamp --- testsuite/lib/upload.exp | 6 ++++++ upload-ftp-v1.2.pl | 3 +++ 2 files changed, 9 insertions(+) diff --git a/testsuite/lib/upload.exp b/testsuite/lib/upload.exp index 6c38d84..53e2de8 100644 --- a/testsuite/lib/upload.exp +++ b/testsuite/lib/upload.exp @@ -747,6 +747,12 @@ proc analyze_log { base_dir name assess } { set A(validate,filename-mismatch-directive) 1 exp_continue } + -re {^ftp-upload\[[0-9]+\]: \(Test\)\ + DEBUG: Signature made [^\r\n]+} { + # from read_directive_file, reporting signature timestamp + set A(validate,signature-timestamp) 1 + exp_continue + } -re {^ftp-upload\[[0-9]+\]: \(Test\)\ DEBUG: [^ ]+ size is [[:digit:]]+} { diff --git a/upload-ftp-v1.2.pl b/upload-ftp-v1.2.pl index 0f0f42c..c274991 100755 --- a/upload-ftp-v1.2.pl +++ b/upload-ftp-v1.2.pl @@ -976,6 +976,9 @@ sub read_directive_file { # test of the $filename_required variable. if (($retval =~ /Signature made (.*)/) && ($filename_required)) { my $timestr = $1; + + ftp_syslog('debug', "($log_style) DEBUG: Signature made $1") if DEBUG; + # If the time/date string starts with a weekday (e.g. "Wed Apr 28 16:40:03 2004 EDT"), # chop off the weekday - Date::Manip doesn't like it $timestr =~ s/^[a-z]+? ([a-z]+)/$1/i; -- 2.25.1