helpGnuTLS - Support: sr #107449, selftest sh-script fails on...


sr #107449: selftest sh-script fails on non-bash

Submitted by:  None
Submitted on:  Fri 06 Aug 2010 08:49:33 PM UTC  
Category:  None Priority:  5 - Normal
Severity:  2 - Minor Status:  Done
Privacy:  Public Assigned to:  Simon Josefsson <jas>
Originator Email:  -email is unavailable- Open/Closed:  Closed
Operating System:  *BSD

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 30 Sep 2010 08:41:24 PM UTC, comment #1: 

Thanks, applied and pushed.

Simon Josefsson <jas>
Project AdministratorIn charge of this item.
Fri 06 Aug 2010 08:49:33 PM UTC, original submission:  

tests/openpgp-certs/testselfsigs sets "set -e" but later does:

This happens to work with bash because "unset" doesn't give an error
there if the variable wasn't defined before.
A regular/Posix sh gives a non-zero return code here, stopping the
script in its tracks due to the "-e".
for reference. The wording is somewhat poor because it says
"Unsetting a variable or function that was not previously set shall
not be considered an error and does not cause the shell to abort".
It is not about aborting in the common case but about the exit code;
the aborting would only due to the "-e".
Anyway, the sh and ksh implementations I found give a non-zero
return code in this situation.

Replacing the offending line with
unset RETCODE || true
fixes the issue.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jas (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-09-30 jas StatusNone => Done
        Assigned toNone => jas
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.7