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

test: print logical instruction count per program #26641

Merged
merged 1 commit into from
Jul 19, 2023

Commits on Jul 18, 2023

  1. test: print logical instruction count per program

    As it says on the tin, echo instruction count for all programs, both if the
    Collection fails to load, as well as at the end of the last line of the
    verifier log on a successful load.
    
    Example output of successful load:
    ```
    === RUN   TestVerifier/bpf_host_1
        verifier_test.go:216: tail_srv6_reply: processed 277 insns (limit 1000000) ... mark_read 8 (201 unverified insns)
    ...
    ```
    
    Example output of unsuccessful load:
    
    ```
    === RUN   TestVerifier/bpf_lxc_1
        verifier_test.go:201: Full verifier log at bpf_lxc_1_verifier.log
        verifier_test.go:203: BPF unverified instruction count per program:
        verifier_test.go:205: tail_handle_ipv4: 1048 insns
    ```
    
    Also output the original `err` containing the name of the prog that caused
    the verifier error, which was accidentally removed by 1833964
    ("test/verifier: don't dump full log into test output"). It's now
    documented why it's included.
    
    Signed-off-by: Timo Beckers <timo@isovalent.com>
    ti-mo committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    6fb37c1 View commit details
    Browse the repository at this point in the history