Commit Graph

2 Commits

Author SHA1 Message Date
Artem Savkov 957d60f568 selftests/bpf: Print log buffer for exceptions test only on failure
JIRA: https://issues.redhat.com/browse/RHEL-23643

commit 4d84dcc739d5b253096f9e47957c5964709f5772
Author: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Date:   Mon Sep 18 17:52:31 2023 +0200

    selftests/bpf: Print log buffer for exceptions test only on failure
    
    Alexei reported seeing log messages for some test cases even though we
    just wanted to match the error string from the verifier. Move the
    printing of the log buffer to a guarded condition so that we only print
    it when we fail to match on the expected string in the log buffer,
    preventing unneeded output when running the test.
    
    Reported-by: Alexei Starovoitov <ast@kernel.org>
    Fixes: d2a93715bfb0 ("selftests/bpf: Add tests for BPF exceptions")
    Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
    Link: https://lore.kernel.org/r/20230918155233.297024-2-memxor@gmail.com
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2024-03-27 10:27:48 +01:00
Artem Savkov 6e7e8f6b44 selftests/bpf: Add tests for BPF exceptions
JIRA: https://issues.redhat.com/browse/RHEL-23643

commit d2a93715bfb0655a63bb1687f43f48eb2e61717b
Author: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Date:   Wed Sep 13 01:32:14 2023 +0200

    selftests/bpf: Add tests for BPF exceptions
    
    Add selftests to cover success and failure cases of API usage, runtime
    behavior and invariants that need to be maintained for implementation
    correctness.
    
    Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
    Link: https://lore.kernel.org/r/20230912233214.1518551-18-memxor@gmail.com
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2024-03-27 10:27:48 +01:00