Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What should "make check" do #91

Open
dgtlrift opened this issue Sep 22, 2023 · 2 comments
Open

What should "make check" do #91

dgtlrift opened this issue Sep 22, 2023 · 2 comments
Labels

Comments

@dgtlrift
Copy link
Contributor

When running make check I get the following details:

============================================================================
Testsuite summary for nss-mdns 0.15.1
============================================================================
# TOTAL: 0
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

so shouldn't it run some tests?

@evverx
Copy link
Member

evverx commented Dec 18, 2024

make check is supposed to run some tests like check_util but the check package has to be installed to get it to work.

@pemensik since the CI isn't set up here (apart from compiling nss-mdns without running any tests) I think it would be great to set it up first to let it test PRs like #94.

It would be great to turn on Packit along with OpenScanHub to properly compile-test it on various architectures and let various static analyzers do their thing as well.

By adding ASan/UBSan it should be possible to catch things like

src/util.c:357:23: runtime error: applying zero offset to null pointer                                                                                        
    #0 0x0000004145e0 in buffer_init /root/nss-mdns/src/util.c:357:23                                                                                         
    #1 0x00000040a164 in test_null_buffer_zero_alloc_returns_nonnull_fn /root/nss-mdns/tests/check_util.c:446:5                                               
    #2 0x7f025b3bc040 in srunner_run_tagged (/lib64/libcheck.so.0+0x9040) (BuildId: 9e5ebaa0a89d3d5c0e9bddc793dbc09eb7a4c5e5)                                 
    #3 0x000000402d27 in main /root/nss-mdns/tests/check_util.c:1072:5                                                                                        
    #4 0x7f025a60f247 in __libc_start_call_main (/lib64/libc.so.6+0x3247) (BuildId: b6c381bfdcb5e08ea82c1c39cf16580181fb6cfc)                                 
    #5 0x7f025a60f30a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x330a) (BuildId: b6c381bfdcb5e08ea82c1c39cf16580181fb6cfc)                          
    #6 0x000000401454 in _start (/root/nss-mdns/check_util+0x401454) (BuildId: a6f8097f16389247890bfa2c1d4811c32b275a93)                                      
                                                                                                                                                              
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/util.c:357:23                                                                                     
src/util.c:357:23: runtime error: applying zero offset to null pointer                                                                                        
    #0 0x0000004145e0 in buffer_init /root/nss-mdns/src/util.c:357:23                                                                                         
    #1 0x00000040a594 in test_null_buffer_nonzero_alloc_returns_null_fn /root/nss-mdns/tests/check_util.c:474:5                                               
    #2 0x7f025b3bc040 in srunner_run_tagged (/lib64/libcheck.so.0+0x9040) (BuildId: 9e5ebaa0a89d3d5c0e9bddc793dbc09eb7a4c5e5)                                 
    #3 0x000000402d27 in main /root/nss-mdns/tests/check_util.c:1072:5                                                                                        
    #4 0x7f025a60f247 in __libc_start_call_main (/lib64/libc.so.6+0x3247) (BuildId: b6c381bfdcb5e08ea82c1c39cf16580181fb6cfc)
    #5 0x7f025a60f30a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x330a) (BuildId: b6c381bfdcb5e08ea82c1c39cf16580181fb6cfc)
    #6 0x000000401454 in _start (/root/nss-mdns/check_util+0x401454) (BuildId: a6f8097f16389247890bfa2c1d4811c32b275a93)

immediately.

@evverx
Copy link
Member

evverx commented Dec 22, 2024

Packit and OpenScanHub were integrated in #96 (and OpenScanHub already reported one finding https://openscanhub.fedoraproject.org/task/29697/log/added.html so it seems to be working). Since the check package is installed there Packit runs check_util.

The GitHub action doesn't run any tests because the check package is missing.

( nss-test and avahi-test aren't run anywhere. clang, ASan/UBsan, Coverity and CodeQL are missing as well but Packit is a good start anyway)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants