siemens / gencmpclient

generic CMP [RFC 4210, RFC 9483] client library and CLI, based on CMPforOpenSSL (https://github.com/mpeylo/cmpossl)
Other
10 stars 7 forks source link

feat(debug): improved debug messages #55

Closed RufusJWB closed 1 month ago

RufusJWB commented 3 months ago

Motivation

Simplify debugging

Proposed Changes

Improving log messages

Test Plan

n/a

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

RufusJWB commented 2 months ago

Thank you for the improvements suggested. Here are some requests for tweaking them.

All implemented. Thank you for the proposals

DDvO commented 2 months ago

@RufusJWB could you please squash you commits, while keeping the unrelated change to .gitignore in a separate commit, and rebase to handle the merge conflict (simply letting your changes override the recent change of -Wl,-rpath,= to -Wl,-rpath,. which has become also part of this PR).

RufusJWB commented 2 months ago

while keeping the unrelated change to .gitignore in a separate commit

Moved this to #61

RufusJWB commented 2 months ago

@RufusJWB could you please squash you commits,

done

DDvO commented 2 months ago

Please check the output of the CI test_all run:

make -f Makefile_tests test_Mock CMPCLIENT="./cmpClient" OPENSSL=openssl OPENSSL_VERSION=[DEBUG] LIB is set to header [DEBUG] OPENSSL_VERSION_MAJOR found in OPENSSLV_H [DEBUG] OS is not MacOS [TRACE] After OS check in header: OPENSSL_VERSION=3.0 [TRACE] OPENSSL_NUMBER_SEL=head -n 1 | sed -r 's/.*OpenSSL //' | awk '{print ($0+0)}' [TRACE] OPENSSLV_H=/usr/include/openssl/opensslv.h [TRACE] OPENSSL_VERSION=3.0 3.0
awk: fatal: cannot open file `[TRACE]' for reading: No such file or directory
make[1]: *** No rule to make target 'LIB'.  Stop.

Somehow the new diagnostic output confuses a Makefile used for the tests.

RufusJWB commented 2 months ago

Please check the output of the CI test_all run:

make -f Makefile_tests test_Mock CMPCLIENT="./cmpClient" OPENSSL=openssl OPENSSL_VERSION=[DEBUG] LIB is set to header [DEBUG] OPENSSL_VERSION_MAJOR found in OPENSSLV_H [DEBUG] OS is not MacOS [TRACE] After OS check in header: OPENSSL_VERSION=3.0 [TRACE] OPENSSL_NUMBER_SEL=head -n 1 | sed -r 's/.*OpenSSL //' | awk '{print ($0+0)}' [TRACE] OPENSSLV_H=/usr/include/openssl/opensslv.h [TRACE] OPENSSL_VERSION=3.0 3.0
awk: fatal: cannot open file `[TRACE]' for reading: No such file or directory
make[1]: *** No rule to make target 'LIB'.  Stop.

Somehow the new diagnostic output confuses a Makefile used for the tests.

looks good now image

DDvO commented 2 months ago

Hmm, the test_all CI run still fails the same way. I suspect that also the output of OPENSSL_VERSION_MAJOR needs to be tweaked.

DDvO commented 2 months ago

BTW, would be nice not to have merge commits. Best practice is to use fixup commits (e.g., on the command line, git commit --fixup @).

DDvO commented 2 months ago

The CI still fails, supposedly because there is still one output line containing the string OPENSSL_VERSION: $(info [TRACE] After OS check in header: OPENSSL_VERSION=$(OPENSSL_VERSION))

DDvO commented 1 month ago

Argh, just recalled that this PR was still in trouble, and meanwhile I understand what went wrong: The new diagnostics output gets prepended to the version info expected by Makefile_v1.

Fixed by directing all the new diagnostic output to stderr. Also updated README.md

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud