libacvp icon indicating copy to clipboard operation
libacvp copied to clipboard

`acvp_app --version` exits non-zero

Open smoser opened this issue 1 year ago • 2 comments

Hi, I was testing out libacvp built in wolfi here. It seems that acvp_app --version exits non-zero (always?). At least in my test:

# acvp_app  --version --disable_fips && echo good || echo bad $?

 ACVP library version: libacvp_oss-2.1.2
ACVP protocol version: 1.0

 Compiled SSL version: OpenSSL 3.3.2 3 Sep 2024
   Linked SSL version: OpenSSL 3.3.2 3 Sep 2024

       FIPS requested: no
bad 1
# acvp_app  --version  && echo good || echo bad $?

 ACVP library version: libacvp_oss-2.1.2
ACVP protocol version: 1.0

 Compiled SSL version: OpenSSL 3.3.2 3 Sep 2024
   Linked SSL version: OpenSSL 3.3.2 3 Sep 2024

       FIPS requested: yes
FIPS Provider Version: (null)
bad 1

--help also exits non-zero , even though it is advertised in output without any arguments:

# acvp_app  ; echo $?
Requires at least 1 Algorithm Test Suite
Use acvp_app --help for more information.
1
# acvp_app --help ; echo $?                                                                 
                          
===========================                                                                               
===== ACVP_APP USAGE ======                      
===========================
...
1

I was just trying to use the version to smoketest the program. Is there another recommended way?

smoser avatar Oct 23 '24 15:10 smoser

Also even with a FIPS module it exists 1. Many automated distribution testing systems expect binaries to exit 0 upon --help / --version calls.

xnox avatar Oct 23 '24 19:10 xnox

Thanks for reporting this, not sure how long the code would have been doing this. Will take a look ASAP.

Andrew

abkarcher avatar Oct 23 '24 20:10 abkarcher

Recent PRs (#900, #901) should resolve many return value and exit code issues, including the ones here. These will be included in the upcoming 2.2.0 release. Apologies for the delay here. Please feel free to reopen if you see any further exit code issues.

Thanks, Andrew

abkarcher avatar Jun 24 '25 14:06 abkarcher