rnp
rnp copied to clipboard
Remove CFG_USERINPUTFD and use stdin replacement in affected tests.
Closes #1609 and closes #1857
Affected tests now use stdin temporarily replaced with a pipe read end.
Codecov Report
Patch coverage: 86.53
% and project coverage change: +0.64
:tada:
Comparison is base (
32149be
) 83.81% compared to head (56c28ad
) 84.45%.
:exclamation: Current head 56c28ad differs from pull request most recent head d997e6c. Consider uploading reports for the commit d997e6c to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## main #2091 +/- ##
==========================================
+ Coverage 83.81% 84.45% +0.64%
==========================================
Files 161 143 -18
Lines 32395 29147 -3248
==========================================
- Hits 27151 24617 -2534
+ Misses 5244 4530 -714
Impacted Files | Coverage Δ | |
---|---|---|
src/lib/crypto/backend_version.cpp | 100.00% <ø> (+26.08%) |
:arrow_up: |
src/librekey/g23_sexp.hpp | 100.00% <ø> (ø) |
|
src/librepgp/stream-packet.h | 100.00% <ø> (ø) |
|
src/tests/support.h | 100.00% <ø> (ø) |
|
src/tests/utils-rnpcfg.cpp | 100.00% <ø> (ø) |
|
src/librepgp/stream-packet.cpp | 80.93% <50.00%> (-0.53%) |
:arrow_down: |
src/tests/generatekey.cpp | 89.73% <53.84%> (+1.05%) |
:arrow_up: |
src/lib/rnp.cpp | 79.88% <60.00%> (-0.18%) |
:arrow_down: |
src/rnpkeys/tui.cpp | 88.51% <85.71%> (+1.15%) |
:arrow_up: |
src/lib/crypto/hash_common.cpp | 98.11% <100.00%> (-0.14%) |
:arrow_down: |
... and 8 more |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
258/259 Test #248: rnp_tests.test_fuzz_verify .................................................... Passed 5.99 sec
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
ci/lib/install_functions.inc.sh: line 676: 2438 Aborted (core dumped) "$@"
Error: Process completed with exit code 134.
strange, all of the failing centos-and-fedora instances fail with the same std::bad_alloc
error in a place not possibly related to the introduced changes
@antonsviridenko It could be somehow related to the redirected stdin (and be thrown from GTest side), as other PRs work well.
All failed instances use OpenSSL as a backend...
Any ideas how to debug this?
ci/lib/install_functions.inc.sh: line 676: 2438 Aborted (core dumped) "$@"
Looks like it's something related to Python environment in Centos/Fedora.
@antonsviridenko Did you try to revert you commits, related to stdio redirection, and see whether that helps?
Did you try to revert you commits, related to stdio redirection, and see whether that helps?
I assume that yes, reverting commits will remove CI failures.
I think it could be related to duplicated STDIN not having CLOEXEC flags... And affected platforms run cli_tests through some python wrapper.
Is there any possibility to recreate the same local environment as in failing centos-and-fedora machines?
@antonsviridenko Wow, this one get lost somehow. Locally you may just use corresponding Docker container, install prerequisites, copy rnp sources there, build and run tests. Another option is https://github.com/nektos/act but I didn't try it yet and don't know in which way it works and is it possible to properly debug things.