SA Bugzilla – Bug 3053
strip2.t is flawed ...
Last modified: 2004-04-24 09:20:28 UTC
I spent a good 2 hours trying to figure out why this test wasn't working... Come to find out that it apparently has never worked, at least in the current incarnation. Here's what happens right now: /usr/bin/perl -T -w ../spamassassin -C log/test_rules_copy --siteconfigpath log/localrules.tmp -p log/test_default.cf -L -t < data/spam/002 > log/strip2.munged /usr/bin/perl -T -w ../spamassassin -C log/test_rules_copy --siteconfigpath log/localrules.tmp -p log/test_default.cf -d < log/strip2.munged > log/strip2.output Use of uninitialized value in substitution (s///) at ../blib/lib/Mail/SpamAssassin.pm line 906. Use of uninitialized value in substitution (s///) at ../blib/lib/Mail/SpamAssassin.pm line 909. Use of uninitialized value in pattern match (m//) at ../blib/lib/Mail/SpamAssassin.pm line 912. Use of uninitialized value in pattern match (m//) at ../blib/lib/Mail/SpamAssassin.pm line 921. Use of uninitialized value in pattern match (m//) at ../blib/lib/Mail/SpamAssassin.pm line 927. Use of uninitialized value in substitution (s///) at ../blib/lib/Mail/SpamAssassin.pm line 932. ok 1 The uninitialized value bit is new due to other code I put in ... That's actually the only reason I noticed the problems with the test. What happens is that the first sarun call tries to create strip2.munged ... Except that sarun() itself redirects to log/<name of test>.<number of test> ... So strip2.munged becomes a blank file. The second sarun() call tries to strip the markup of a blank message, which results in a blank message. The results are diff'ed and found to be ok (blank == blank), so the test passes. So we either need to figure out how to get the output another way, we need to use the log/ <testname>.<testnumber> file, or we should have sarun() not redirect if the command we're running includes a '>' to redirect the output...
Created attachment 1778 [details] suggested patch for 2.6x same as the version applied to HEAD, except 2.6x doesn't have one section of code that the HEAD patch would modify, so I took that out of this patch.
fix applied to HEAD. attached patch for 2.6x and resetting milestone to 2.64...
house cleaning, not doing a 2.64 release, so ...