BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] Regular expression support for test output matching
@ 2024-06-03 15:53 Cupertino Miranda
  2024-06-03 15:53 ` [PATCH bpf-next 1/2] selftests/bpf: Support checks against a regular expression Cupertino Miranda
  2024-06-03 15:53 ` [PATCH bpf-next 2/2] selftests/bpf: Match tests against " Cupertino Miranda
  0 siblings, 2 replies; 13+ messages in thread
From: Cupertino Miranda @ 2024-06-03 15:53 UTC (permalink / raw)
  To: bpf; +Cc: Cupertino Miranda

Hi everyone,

This patch is in the context of fixing all self-tests for GCC.
I have identified that many of the tests are checking for particular
output matching that is very tight to the code that CLANG generates.

This sort of approach for validation is very fragile and tight to
precise compiler expectations that cannot be guaranteed, even from
different versions of the same compiler.

This patch series introduces a regular expression based approach to
output matching, allowing to validate output without being so tight to
precise output.

Looking forward to your comments.

Best regards,
Cupertino 	

Cupertino Miranda (2):
  selftests/bpf: Support checks against a regular expression.
  selftests/bpf: Match tests against regular expression.

 tools/testing/selftests/bpf/progs/bpf_misc.h  |  11 +-
 .../testing/selftests/bpf/progs/dynptr_fail.c |   6 +-
 .../selftests/bpf/progs/exceptions_assert.c   |   8 +-
 .../testing/selftests/bpf/progs/rbtree_fail.c |   8 +-
 .../bpf/progs/refcounted_kptr_fail.c          |   4 +-
 .../selftests/bpf/progs/verifier_sock.c       |   4 +-
 tools/testing/selftests/bpf/test_loader.c     | 126 ++++++++++++++----
 7 files changed, 120 insertions(+), 47 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-06-06 19:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-03 15:53 [PATCH bpf-next 0/2] Regular expression support for test output matching Cupertino Miranda
2024-06-03 15:53 ` [PATCH bpf-next 1/2] selftests/bpf: Support checks against a regular expression Cupertino Miranda
2024-06-04 18:16   ` Andrii Nakryiko
2024-06-04 21:35   ` Eduard Zingerman
2024-06-03 15:53 ` [PATCH bpf-next 2/2] selftests/bpf: Match tests against " Cupertino Miranda
2024-06-04 18:16   ` Andrii Nakryiko
2024-06-06 10:50     ` Cupertino Miranda
2024-06-06 15:50       ` Alexei Starovoitov
2024-06-06 18:07         ` Cupertino Miranda
2024-06-06 17:19       ` Andrii Nakryiko
2024-06-06 17:47         ` Eduard Zingerman
2024-06-06 19:27           ` Jose E. Marchesi
2024-06-06 18:35         ` Cupertino Miranda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox