I want to report a possible bug in openssl-1.0.0/test/cms-test.pl:
sub run_smime_tests {
...
        system("$scmd$rscmd 2>cms.err 1>cms.out");
        if ($?) {
            print "$tnam: generation error\n";
            $$rv++;
            exit 1 if $halt_err;
            next;
        }

According to ActivePerl Document 
(file:///C:/Perl/html/lib/pods/perlfunc.html#system), it reads:
> The return value is the exit status of the program as returned by the wait 
> call. To get the actual exit value, shift right by eight (see below).

    @args = ("command", "arg1", "arg2");
    system(@args) == 0
        or die "system @args failed: $?"
> If you'd like to manually inspect system's failure, you can check all 
> possible failure modes by inspecting $? like this:
    if ($? == -1) {
        print "failed to execute: $!\n";
    }
    elsif ($? & 127) {
        printf "child died with signal %d, %s coredump\n",
            ($? & 127),  ($? & 128) ? 'with' : 'without';
    }
    else {
        printf "child exited with value %d\n", $? >> 8;
    }

On my win7 x64 system, I tried to compile openssl-1.0.0 with 
MinGW/MSYS/ActivePerl and it failed when "make test".
The problematic test case statement is:
../util/shlib_wrap.sh ../apps/openssl cms -sign -in smcont.txt -outform DER 
-nodetach -certfile smime-certs/smroot.pem -signer smime-certs/smrsa1.pem -out 
test.cms
After some debug work, I found openssl.exe returned 0, while the system() call 
in the perl script returned 256.
I have tried ActivePerl-5.12.0.1200-MSWin32-x64-292396 and 
ActivePerl-5.10.1.1007-MSWin32-x86-291969, and the problems are the same.

Best regards,
Feiyun Wang


      
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to