1. 14 Oct, 2023 4 commits
  2. 11 Oct, 2023 15 commits
  3. 10 Oct, 2023 11 commits
  4. 09 Oct, 2023 5 commits
  5. 08 Oct, 2023 3 commits
  6. 07 Oct, 2023 2 commits
    • Daniel Borkmann's avatar
      selftests/bpf: Make seen_tc* variable tests more robust · 37345b85
      Daniel Borkmann authored
      Martin reported that on his local dev machine the test_tc_chain_mixed() fails as
      "test_tc_chain_mixed:FAIL:seen_tc5 unexpected seen_tc5: actual 1 != expected 0"
      and others occasionally, too.
      
      However, when running in a more isolated setup (qemu in particular), it works fine
      for him. The reason is that there is a small race-window where seen_tc* could turn
      into true for various test cases when there is background traffic, e.g. after the
      asserts they often get reset. In such case when subsequent detach takes place,
      unrelated background traffic could have already flipped the bool to true beforehand.
      
      Add a small helper tc_skel_reset_all_seen() to reset all bools before we do the ping
      test. At this point, everything is set up as expected and therefore no race can occur.
      All tc_{opts,links} tests continue to pass after this change.
      Reported-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Link: https://lore.kernel.org/r/20231006220655.1653-7-daniel@iogearbox.netSigned-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
      37345b85
    • Daniel Borkmann's avatar
      selftests/bpf: Test query on empty mprog and pass revision into attach · 685446b0
      Daniel Borkmann authored
      Add a new test case to query on an empty bpf_mprog and pass the revision
      directly into expected_revision for attachment to assert that this does
      succeed.
      
        ./test_progs -t tc_opts
        [    1.406778] tsc: Refined TSC clocksource calibration: 3407.990 MHz
        [    1.408863] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fcaf6eb0, max_idle_ns: 440795321766 ns
        [    1.412419] clocksource: Switched to clocksource tsc
        [    1.428671] bpf_testmod: loading out-of-tree module taints kernel.
        [    1.430260] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
        #252     tc_opts_after:OK
        #253     tc_opts_append:OK
        #254     tc_opts_basic:OK
        #255     tc_opts_before:OK
        #256     tc_opts_chain_classic:OK
        #257     tc_opts_chain_mixed:OK
        #258     tc_opts_delete_empty:OK
        #259     tc_opts_demixed:OK
        #260     tc_opts_detach:OK
        #261     tc_opts_detach_after:OK
        #262     tc_opts_detach_before:OK
        #263     tc_opts_dev_cleanup:OK
        #264     tc_opts_invalid:OK
        #265     tc_opts_max:OK
        #266     tc_opts_mixed:OK
        #267     tc_opts_prepend:OK
        #268     tc_opts_query:OK
        #269     tc_opts_query_attach:OK     <--- (new test)
        #270     tc_opts_replace:OK
        #271     tc_opts_revision:OK
        Summary: 20/0 PASSED, 0 SKIPPED, 0 FAILED
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Link: https://lore.kernel.org/r/20231006220655.1653-6-daniel@iogearbox.netSigned-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
      685446b0