Jeff King <peff@xxxxxxxx> writes: > Actually, it's pretty straight-forward and I think the resulting code is > cleaner. Note that we do have to use a real expect_success because of > the side effects. That does increment the test counter. IMHO that's not > a big deal, but if we're concerned it wouldn't be too hard to add a > non-lazy prereq block. > > Patch is below (I pulled GPGSM into its own block, which involved > reindenting; view with "-w"). Nice. Certainly a lot nicer than having to reason about what fd#3 and fd#4 are, which I always have keeping in my head. > @@ -31,51 +34,51 @@ then > chmod 0700 ./gpghome && > GNUPGHOME="$PWD/gpghome" && > export GNUPGHOME && > - (gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) && > - gpg --homedir "${GNUPGHOME}" 2>/dev/null --import \ > + (gpgconf --kill gpg-agent || : ) && > + gpg --homedir "${GNUPGHOME}" --import \ > "$TEST_DIRECTORY"/lib-gpg/keyring.gpg && > - gpg --homedir "${GNUPGHOME}" 2>/dev/null --import-ownertrust \ > + gpg --homedir "${GNUPGHOME}" --import-ownertrust \ > "$TEST_DIRECTORY"/lib-gpg/ownertrust && Good to see all "discard output" go. > - gpg --homedir "${GNUPGHOME}" </dev/null >/dev/null 2>&1 \ > - --sign -u committer@xxxxxxxxxxx && > - test_set_prereq GPG && > + gpg --homedir "${GNUPGHOME}" \ > + --sign -u committer@xxxxxxxxxxx >/dev/null && We lost input redirection; I am assuming that it was unnecessary as the standard input of our tests are all redirected from /dev/null anyway? We are not interested in seeing the signed output (we have nothing to compare to validate the correctness anyway), so discarding the standard output is fine. We do not want to see it even while we are debugging, either. Looking good.