* Make bpf prog test run async internally to allow for cancellation
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Skip CI/CD build and tests for doc-only changes
Note that if a PR is updated via a merge commit, e.g., using
the "Update with merge commit" variation of the "Update branch" button
in github, instead of a rebase then the build/tests will be done.
As such, for doc-only changes, to use the "Update branch" button in
github, be sure to use the down arrow to change it to "Update with
rebase".
Fixes#1329
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Harden github workflows
Addresses part of #1949
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Regenerate and checkin corpus files
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Add option to generate .spd files for sample driven PGO
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Fix test failure
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* List test executables in testing document
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* PR feedback
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Remove the obsolete fuzz.exe
The functionality was replaced by execution_context_fuzzer.exe.
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix cmake build
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update fuzzing docs
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Cache verifier based on commit id and options
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Cache llvm and fix cache key for verifier
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Anurag Saxena <43585259+saxena-anurag@users.noreply.github.com>
* Shave 8+ minutes off the overall build time
Currently bpf2c_fuzzer and verifier_fuzzer complete last, 8 or so
minutes after the next long pole:
* bpf2c_fuzzer: 41 mins
* verifier_fuzzer: 41 mins
* stress: 33 mins
* sanitize_unit_tests: 32 mins
* driver: 31 mins
* fuzzing: 31 mins
* bpf2c: 30 mins
Breakdown within the bpf2c fuzzer and verifier fuzzer runs:
* 23-24 mins to build with fuzzing
* 2 mins to download the build artifact
* 15 mins to run the actual fuzzer using random inputs
Fuzz tests should not be the long pole on a per-PR basis, so drop the fuzz time from
15 mins to 5 mins per run so they are not the bottleneck.
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Use 15 mins on scheduled runs
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add helper functions to bpf_endian.h
* Add SPDX identifier for the source of bpf_endian.h
Co-authored-by: Anurag Saxena <43585259+saxena-anurag@users.noreply.github.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
* Move hook NMR registration into netebpext helper class
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Unit test bind hook
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add cgroup sock addr unit test
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add unit tests for rest of cgroup sock addr attach types
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Partial sock_ops unit test support
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Cleanup
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add sock_ops unit test
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix code analysis warning
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix code analysis warning
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix crash
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Remove dependency on trampoline table for interpret and native
Fix for provider attach before wfp initialized
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Fix code analysis failure
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
* Update to latest bpftool
Fixes#1859
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add test for bpftool show map by pin path
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Remove REQUIRE macro from some non-top level test code
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Fix code analysis warning
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
* Add netebpfext fuzzer
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update solution
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add CI/CD workflow
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add script to create netebpfext corpus
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix code analysis warning
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Handle prog types with no data buffer
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Cleanup
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Change global variable to a static member per development guide
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix comment in include file
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>