diff options
| author | Andrii Nakryiko <[email protected]> | 2020-09-28 21:30:44 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-09-29 12:21:23 -0700 |
| commit | 22ba3635163164aa86eb8a9d8645079a0bbd0a66 (patch) | |
| tree | 3167a539b2b405b35650c3e45b97055cc01247e5 /tools/perf/scripts/python | |
| parent | f970cbcdcdb5b3468a6c05332818d226fb60038f (diff) | |
selftests/bpf: Move and extend ASSERT_xxx() testing macros
Move existing ASSERT_xxx() macros out of btf_write selftest into test_progs.h
to use across all selftests. Also expand a set of macros for typical cases.
Now there are the following macros:
- ASSERT_EQ() -- check for equality of two integers;
- ASSERT_STREQ() -- check for equality of two C strings;
- ASSERT_OK() -- check for successful (zero) return result;
- ASSERT_ERR() -- check for unsuccessful (non-zero) return result;
- ASSERT_NULL() -- check for NULL pointer;
- ASSERT_OK_PTR() -- check for a valid pointer;
- ASSERT_ERR_PTR() -- check for NULL or negative error encoded in a pointer.
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions