Page MenuHome GnuPG

checks/verify.test fails on bad_ls_asc for FreeBSD 4.2-RELEASE system
Closed, ResolvedPublic

Description

A FreeBSD 4.2-RELEASE host was unable to pass the
'make check' due to problems in verify.test

A FreeBSD 4.8-STABLE host was able to pass all of
the 'make check'tests without any problems.

Steps taken:

./configure
gmake
gmake check

gpg (GnuPG) 1.4.6
Copyright (C) 2006 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Home: .
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB
PASS: version.test
PASS: mds.test
PASS: decrypt.test
PASS: decrypt-dsa.test
PASS: sigs.test
PASS: sigs-dsa.test
PASS: encrypt.test
PASS: encrypt-dsa.test
PASS: seat.test
PASS: clearsig.test
PASS: encryptp.test
PASS: detach.test
PASS: armsigs.test
PASS: armencrypt.test
PASS: armencryptp.test
PASS: signencrypt.test
PASS: signencrypt-dsa.test
PASS: armsignencrypt.test
PASS: armdetach.test
PASS: armdetachm.test
PASS: detachm.test
PASS: genkey1024.test
PASS: conventional.test
PASS: conventional-mdc.test
PASS: multisig.test
FAIL: verify.test

PASS: armor.test

1 of 27 tests failed

Please report to bug-gnupg@gnu.org

gmake[2]: *** [check-TESTS] Error 1

Details

Version
1.4.6

Event Timeline

mdb added a subscriber: mdb.

FWIW, I have seen probably the same problem on OpenBSH. The reason is a buggy
shell:

set -e
/bin/false && echo "command failed"

Will bail out despite that it should not due to the implicit test using &&.
This is a clear bug in the shel and nothing we should repair.

Well, it should obviously read: echo "command succeded". The actual failing
code used in the test script is:

case "$i" in
 [...]  
 bad_*_asc)
    $GPG --verify x && error "verify of $i succeeded but should not"
    ;;
 [...]

Surrounding test GPG line with set+x/-x helps.

Adding a 'set -x; ... ; set +x' around the bad_*_asc and the bad

msg_*_asc_multisig)
    set -x
   $GPG --verify --allow-multisig-verification x \
       || error "verify of $i failed"
   $GPG --verify x && error "verify of $i succeeded but should not"
    set +x

was also needed. That said, both FreeBSD 4.2-RELEASE (which failed the
verify.test) and FreeBSD 4.8-RELEASE (which passes the tests) behave in
the same way:

% /bin/sh
$ set -e
$ /bin/false && echo "command failed"
/bin/false: not found
$ /usr/bin/false && echo "command failed"
$

Again my fault. I meant: bracketing the command with set +e/-e.

Your example is not correct: A non existing /bin/false lets the shell return an
error which is different from a comman return afilure (what is false's soley
purpose).

To move on I have applied the workaround. But it is still a buggy shell.

werner claimed this task.
werner removed a project: Restricted Project.