From 14030d3acb560ad1a28a2d7b86b030e391a76170 Mon Sep 17 00:00:00 2001 From: Jayanth Varavani <1111446+jayanthvn@users.noreply.github.com> Date: Thu, 20 Jun 2024 10:04:16 -0700 Subject: [PATCH 1/2] Release 1.0 (#83) * Minor nits (#32) * Readme from master to release branch * Fixup poller for events race condition (#43) (#44) * Fixup poller for events race condition * Testing package go tidy * Merge Main to Release-1.0 (#51) * Mocks for public APIs * PR feedback * Make the sdk client global for mocks * Update sdk client for NA mocks (#26) * Update sdk client * fix var * API interface change and UTs for TC functions (#25) * UTs for tc functions * Fix vet * Add mocks * Feedback * PR feedbacl * UTs for recovery and progs (#27) * UTs for recovery and progs * PR feedbacks * UTs for cache and kprobes (#28) * Xdp and Events UT (#29) * XDP and events update * cleanup * Third party attribution doc * readme-v1 (#30) * Update README.md (#33) * Update README.md * chore: spelling in README (#36) * Add github action for functional tests * Merge issue with func tests (#38) * test-data: Fix to use __builtin_memset() instead of memset() (#40) In BPF programs, when using functions like `memset()` and `memcpy()`, you should use LLVM built-in functions like `__builtin_memset()`. Signed-off-by: shun159 * Bump golang.org/x/sys from 0.6.0 to 0.12.0 (#41) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.6.0 to 0.12.0. - [Commits](https://github.com/golang/sys/compare/v0.6.0...v0.12.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fixup poller for events race condition (#43) * Fixup poller for events race condition * Testing package go tidy * makefile: fix to remove unused option from build-bpf target (#42) * makefile: fix to remove unused option from build-bpf target Signed-off-by: shun159 * makefile: refactor using pattern rule Signed-off-by: shun159 --------- Signed-off-by: shun159 * test-data: fix to solve compile warning for test-data (#45) * test-data: fix to solve compile warning for test-data use `void`instead of the `struct sched_process_fork_t` to solve compile warnings for resolvedata and tc.ingress ```shellsesson $ doas make test-data/recoverydata.bpf.elf clang -I../../.. -g -O2 -Wall -fpie -target bpf -DCORE -D__BPF_TRACING__ -D__TARGET_ARCH_x86 -c test-data/recoverydata.bpf.c -o test-data/recoverydata.bpf.elf test-data/recoverydata.bpf.c:101:31: warning: declaration of 'struct sched_process_fork_t' will not be visible outside of this function [-Wvisibility] int sched_process_fork(struct sched_process_fork_t *ctx) { ^ 1 warning generated. ``` Signed-off-by: shun159 * makefile: Refactor the vmlinux and unit-test targets 1. Check the existence of the /sys/kernel/btf/vmlinux file before generating the header file using bpftool. 2. Improve the idempotency of the vmlinux target. 3. Add the `LOGFILE_PATH` variable to allow specifying a different path for the `AWS_EBPF_SDK_LOG_FILE`. Signed-off-by: shun159 --------- Signed-off-by: shun159 * kprobe: Add defer statements for resource cleanup in KprobeAttach()/KretprobeAttach (#46) Ensure that file handle is properly closed using `defer` statements. Signed-off-by: shun159 --------- Signed-off-by: shun159 Signed-off-by: dependabot[bot] Co-authored-by: Apurup Chevuru <60630804+achevuru@users.noreply.github.com> Co-authored-by: Alex Jones Co-authored-by: Davanum Srinivas Co-authored-by: Eishun Kondoh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Merge Main to Release 1.0 (#55) * Mocks for public APIs * PR feedback * Make the sdk client global for mocks * Update sdk client for NA mocks (#26) * Update sdk client * fix var * API interface change and UTs for TC functions (#25) * UTs for tc functions * Fix vet * Add mocks * Feedback * PR feedbacl * UTs for recovery and progs (#27) * UTs for recovery and progs * PR feedbacks * UTs for cache and kprobes (#28) * Xdp and Events UT (#29) * XDP and events update * cleanup * Third party attribution doc * readme-v1 (#30) * Update README.md (#33) * Update README.md * chore: spelling in README (#36) * Add github action for functional tests * Merge issue with func tests (#38) * test-data: Fix to use __builtin_memset() instead of memset() (#40) In BPF programs, when using functions like `memset()` and `memcpy()`, you should use LLVM built-in functions like `__builtin_memset()`. Signed-off-by: shun159 * Bump golang.org/x/sys from 0.6.0 to 0.12.0 (#41) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.6.0 to 0.12.0. - [Commits](https://github.com/golang/sys/compare/v0.6.0...v0.12.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fixup poller for events race condition (#43) * Fixup poller for events race condition * Testing package go tidy * makefile: fix to remove unused option from build-bpf target (#42) * makefile: fix to remove unused option from build-bpf target Signed-off-by: shun159 * makefile: refactor using pattern rule Signed-off-by: shun159 --------- Signed-off-by: shun159 * test-data: fix to solve compile warning for test-data (#45) * test-data: fix to solve compile warning for test-data use `void`instead of the `struct sched_process_fork_t` to solve compile warnings for resolvedata and tc.ingress ```shellsesson $ doas make test-data/recoverydata.bpf.elf clang -I../../.. -g -O2 -Wall -fpie -target bpf -DCORE -D__BPF_TRACING__ -D__TARGET_ARCH_x86 -c test-data/recoverydata.bpf.c -o test-data/recoverydata.bpf.elf test-data/recoverydata.bpf.c:101:31: warning: declaration of 'struct sched_process_fork_t' will not be visible outside of this function [-Wvisibility] int sched_process_fork(struct sched_process_fork_t *ctx) { ^ 1 warning generated. ``` Signed-off-by: shun159 * makefile: Refactor the vmlinux and unit-test targets 1. Check the existence of the /sys/kernel/btf/vmlinux file before generating the header file using bpftool. 2. Improve the idempotency of the vmlinux target. 3. Add the `LOGFILE_PATH` variable to allow specifying a different path for the `AWS_EBPF_SDK_LOG_FILE`. Signed-off-by: shun159 --------- Signed-off-by: shun159 * kprobe: Add defer statements for resource cleanup in KprobeAttach()/KretprobeAttach (#46) Ensure that file handle is properly closed using `defer` statements. Signed-off-by: shun159 * Add v6 test and inc log level (#53) * Fix verifier log buffer size (#54) --------- Signed-off-by: shun159 Signed-off-by: dependabot[bot] Co-authored-by: Apurup Chevuru <60630804+achevuru@users.noreply.github.com> Co-authored-by: Alex Jones Co-authored-by: Davanum Srinivas Co-authored-by: Eishun Kondoh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Merge main to Release 1.0 (#58) * Mocks for public APIs * PR feedback * Make the sdk client global for mocks * Update sdk client for NA mocks (#26) * Update sdk client * fix var * API interface change and UTs for TC functions (#25) * UTs for tc functions * Fix vet * Add mocks * Feedback * PR feedbacl * UTs for recovery and progs (#27) * UTs for recovery and progs * PR feedbacks * UTs for cache and kprobes (#28) * Xdp and Events UT (#29) * XDP and events update * cleanup * Third party attribution doc * readme-v1 (#30) * Update README.md (#33) * Update README.md * chore: spelling in README (#36) * Add github action for functional tests * Merge issue with func tests (#38) * test-data: Fix to use __builtin_memset() instead of memset() (#40) In BPF programs, when using functions like `memset()` and `memcpy()`, you should use LLVM built-in functions like `__builtin_memset()`. Signed-off-by: shun159 * Bump golang.org/x/sys from 0.6.0 to 0.12.0 (#41) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.6.0 to 0.12.0. - [Commits](https://github.com/golang/sys/compare/v0.6.0...v0.12.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fixup poller for events race condition (#43) * Fixup poller for events race condition * Testing package go tidy * makefile: fix to remove unused option from build-bpf target (#42) * makefile: fix to remove unused option from build-bpf target Signed-off-by: shun159 * makefile: refactor using pattern rule Signed-off-by: shun159 --------- Signed-off-by: shun159 * test-data: fix to solve compile warning for test-data (#45) * test-data: fix to solve compile warning for test-data use `void`instead of the `struct sched_process_fork_t` to solve compile warnings for resolvedata and tc.ingress ```shellsesson $ doas make test-data/recoverydata.bpf.elf clang -I../../.. -g -O2 -Wall -fpie -target bpf -DCORE -D__BPF_TRACING__ -D__TARGET_ARCH_x86 -c test-data/recoverydata.bpf.c -o test-data/recoverydata.bpf.elf test-data/recoverydata.bpf.c:101:31: warning: declaration of 'struct sched_process_fork_t' will not be visible outside of this function [-Wvisibility] int sched_process_fork(struct sched_process_fork_t *ctx) { ^ 1 warning generated. ``` Signed-off-by: shun159 * makefile: Refactor the vmlinux and unit-test targets 1. Check the existence of the /sys/kernel/btf/vmlinux file before generating the header file using bpftool. 2. Improve the idempotency of the vmlinux target. 3. Add the `LOGFILE_PATH` variable to allow specifying a different path for the `AWS_EBPF_SDK_LOG_FILE`. Signed-off-by: shun159 --------- Signed-off-by: shun159 * kprobe: Add defer statements for resource cleanup in KprobeAttach()/KretprobeAttach (#46) Ensure that file handle is properly closed using `defer` statements. Signed-off-by: shun159 * Add v6 test and inc log level (#53) * Fix verifier log buffer size (#54) * Use defer close --------- Signed-off-by: shun159 Signed-off-by: dependabot[bot] Co-authored-by: Apurup Chevuru <60630804+achevuru@users.noreply.github.com> Co-authored-by: Alex Jones Co-authored-by: Davanum Srinivas Co-authored-by: Eishun Kondoh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Merge Main to Release 1.0 (#61) * Mocks for public APIs * PR feedback * Make the sdk client global for mocks * Update sdk client for NA mocks (#26) * Update sdk client * fix var * API interface change and UTs for TC functions (#25) * UTs for tc functions * Fix vet * Add mocks * Feedback * PR feedbacl * UTs for recovery and progs (#27) * UTs for recovery and progs * PR feedbacks * UTs for cache and kprobes (#28) * Xdp and Events UT (#29) * XDP and events update * cleanup * Third party attribution doc * readme-v1 (#30) * Update README.md (#33) * Update README.md * chore: spelling in README (#36) * Add github action for functional tests * Merge issue with func tests (#38) * test-data: Fix to use __builtin_memset() instead of memset() (#40) In BPF programs, when using functions like `memset()` and `memcpy()`, you should use LLVM built-in functions like `__builtin_memset()`. Signed-off-by: shun159 * Bump golang.org/x/sys from 0.6.0 to 0.12.0 (#41) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.6.0 to 0.12.0. - [Commits](https://github.com/golang/sys/compare/v0.6.0...v0.12.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fixup poller for events race condition (#43) * Fixup poller for events race condition * Testing package go tidy * makefile: fix to remove unused option from build-bpf target (#42) * makefile: fix to remove unused option from build-bpf target Signed-off-by: shun159 * makefile: refactor using pattern rule Signed-off-by: shun159 --------- Signed-off-by: shun159 * test-data: fix to solve compile warning for test-data (#45) * test-data: fix to solve compile warning for test-data use `void`instead of the `struct sched_process_fork_t` to solve compile warnings for resolvedata and tc.ingress ```shellsesson $ doas make test-data/recoverydata.bpf.elf clang -I../../.. -g -O2 -Wall -fpie -target bpf -DCORE -D__BPF_TRACING__ -D__TARGET_ARCH_x86 -c test-data/recoverydata.bpf.c -o test-data/recoverydata.bpf.elf test-data/recoverydata.bpf.c:101:31: warning: declaration of 'struct sched_process_fork_t' will not be visible outside of this function [-Wvisibility] int sched_process_fork(struct sched_process_fork_t *ctx) { ^ 1 warning generated. ``` Signed-off-by: shun159 * makefile: Refactor the vmlinux and unit-test targets 1. Check the existence of the /sys/kernel/btf/vmlinux file before generating the header file using bpftool. 2. Improve the idempotency of the vmlinux target. 3. Add the `LOGFILE_PATH` variable to allow specifying a different path for the `AWS_EBPF_SDK_LOG_FILE`. Signed-off-by: shun159 --------- Signed-off-by: shun159 * kprobe: Add defer statements for resource cleanup in KprobeAttach()/KretprobeAttach (#46) Ensure that file handle is properly closed using `defer` statements. Signed-off-by: shun159 * Add v6 test and inc log level (#53) * Fix verifier log buffer size (#54) * Use defer close * Minor cleanup * Bump go.uber.org/zap from 1.25.0 to 1.26.0 (#52) Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.25.0 to 1.26.0. - [Release notes](https://github.com/uber-go/zap/releases) - [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md) - [Commits](https://github.com/uber-go/zap/compare/v1.25.0...v1.26.0) --- updated-dependencies: - dependency-name: go.uber.org/zap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump golang.org/x/sys from 0.12.0 to 0.14.0 (#59) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.12.0 to 0.14.0. - [Commits](https://github.com/golang/sys/compare/v0.12.0...v0.14.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: shun159 Signed-off-by: dependabot[bot] Co-authored-by: Apurup Chevuru <60630804+achevuru@users.noreply.github.com> Co-authored-by: Alex Jones Co-authored-by: Davanum Srinivas Co-authored-by: Eishun Kondoh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Merge main to Release 1.0 (#63) * Mocks for public APIs * PR feedback * Make the sdk client global for mocks * Update sdk client for NA mocks (#26) * Update sdk client * fix var * API interface change and UTs for TC functions (#25) * UTs for tc functions * Fix vet * Add mocks * Feedback * PR feedbacl * UTs for recovery and progs (#27) * UTs for recovery and progs * PR feedbacks * UTs for cache and kprobes (#28) * Xdp and Events UT (#29) * XDP and events update * cleanup * Third party attribution doc * readme-v1 (#30) * Update README.md (#33) * Update README.md * chore: spelling in README (#36) * Add github action for functional tests * Merge issue with func tests (#38) * test-data: Fix to use __builtin_memset() instead of memset() (#40) In BPF programs, when using functions like `memset()` and `memcpy()`, you should use LLVM built-in functions like `__builtin_memset()`. Signed-off-by: shun159 * Bump golang.org/x/sys from 0.6.0 to 0.12.0 (#41) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.6.0 to 0.12.0. - [Commits](https://github.com/golang/sys/compare/v0.6.0...v0.12.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fixup poller for events race condition (#43) * Fixup poller for events race condition * Testing package go tidy * makefile: fix to remove unused option from build-bpf target (#42) * makefile: fix to remove unused option from build-bpf target Signed-off-by: shun159 * makefile: refactor using pattern rule Signed-off-by: shun159 --------- Signed-off-by: shun159 * test-data: fix to solve compile warning for test-data (#45) * test-data: fix to solve compile warning for test-data use `void`instead of the `struct sched_process_fork_t` to solve compile warnings for resolvedata and tc.ingress ```shellsesson $ doas make test-data/recoverydata.bpf.elf clang -I../../.. -g -O2 -Wall -fpie -target bpf -DCORE -D__BPF_TRACING__ -D__TARGET_ARCH_x86 -c test-data/recoverydata.bpf.c -o test-data/recoverydata.bpf.elf test-data/recoverydata.bpf.c:101:31: warning: declaration of 'struct sched_process_fork_t' will not be visible outside of this function [-Wvisibility] int sched_process_fork(struct sched_process_fork_t *ctx) { ^ 1 warning generated. ``` Signed-off-by: shun159 * makefile: Refactor the vmlinux and unit-test targets 1. Check the existence of the /sys/kernel/btf/vmlinux file before generating the header file using bpftool. 2. Improve the idempotency of the vmlinux target. 3. Add the `LOGFILE_PATH` variable to allow specifying a different path for the `AWS_EBPF_SDK_LOG_FILE`. Signed-off-by: shun159 --------- Signed-off-by: shun159 * kprobe: Add defer statements for resource cleanup in KprobeAttach()/KretprobeAttach (#46) Ensure that file handle is properly closed using `defer` statements. Signed-off-by: shun159 * Add v6 test and inc log level (#53) * Fix verifier log buffer size (#54) * Use defer close * Minor cleanup * Bump go.uber.org/zap from 1.25.0 to 1.26.0 (#52) Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.25.0 to 1.26.0. - [Release notes](https://github.com/uber-go/zap/releases) - [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md) - [Commits](https://github.com/uber-go/zap/compare/v1.25.0...v1.26.0) --- updated-dependencies: - dependency-name: go.uber.org/zap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump golang.org/x/sys from 0.12.0 to 0.14.0 (#59) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.12.0 to 0.14.0. - [Commits](https://github.com/golang/sys/compare/v0.12.0...v0.14.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update pr-tests.yaml (#62) * Update gomod --------- Signed-off-by: shun159 Signed-off-by: dependabot[bot] Co-authored-by: Apurup Chevuru <60630804+achevuru@users.noreply.github.com> Co-authored-by: Alex Jones Co-authored-by: Davanum Srinivas Co-authored-by: Eishun Kondoh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update mocks (#70) Co-authored-by: Apurup Chevuru <60630804+achevuru@users.noreply.github.com> * Merge main to Release 1.0 (#74) * Update mocks * Fix: nil pointer exception on `utils.IsfileExists` (#72) * fix: nil pointer exception * return an error from IsfileExists * fix: use error.Is * Bump golang.org/x/sys from 0.15.0 to 0.16.0 (#73) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.15.0 to 0.16.0. - [Commits](https://github.com/golang/sys/compare/v0.15.0...v0.16.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix go mod tidy * fix go mod tidy --------- Signed-off-by: dependabot[bot] Co-authored-by: Apurup Chevuru <60630804+achevuru@users.noreply.github.com> Co-authored-by: Fernando Cainelli Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Merge Main to Release 1.0 (#80) * Update mocks * Fix: nil pointer exception on `utils.IsfileExists` (#72) * fix: nil pointer exception * return an error from IsfileExists * fix: use error.Is * Bump golang.org/x/sys from 0.15.0 to 0.16.0 (#73) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.15.0 to 0.16.0. - [Commits](https://github.com/golang/sys/compare/v0.15.0...v0.16.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix go mod tidy * fix go mod tidy * Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 (#75) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump golang.org/x/sys from 0.16.0 to 0.17.0 (#76) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.16.0 to 0.17.0. - [Commits](https://github.com/golang/sys/compare/v0.16.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump go.uber.org/zap from 1.26.0 to 1.27.0 (#77) Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.26.0 to 1.27.0. - [Release notes](https://github.com/uber-go/zap/releases) - [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md) - [Commits](https://github.com/uber-go/zap/compare/v1.26.0...v1.27.0) --- updated-dependencies: - dependency-name: go.uber.org/zap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump golang.org/x/sys from 0.17.0 to 0.19.0 (#79) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.17.0 to 0.19.0. - [Commits](https://github.com/golang/sys/compare/v0.17.0...v0.19.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Test mod file --------- Signed-off-by: dependabot[bot] Co-authored-by: Apurup Chevuru <60630804+achevuru@users.noreply.github.com> Co-authored-by: Fernando Cainelli Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: shun159 Signed-off-by: dependabot[bot] Co-authored-by: Apurup Chevuru <60630804+achevuru@users.noreply.github.com> Co-authored-by: Alex Jones Co-authored-by: Davanum Srinivas Co-authored-by: Eishun Kondoh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Fernando Cainelli --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 51f20a8..5285de0 100644 --- a/README.md +++ b/README.md @@ -131,4 +131,3 @@ instructions [here](https://aws.amazon.com/security/vulnerability-reporting/) or ## License This project is licensed under the Apache-2.0 License. - From 04520dbc2efe56b0d7dae793a4fde9e41a3f6415 Mon Sep 17 00:00:00 2001 From: Jayanth Varavani <1111446+jayanthvn@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:26:32 -0700 Subject: [PATCH 2/2] Mocks for new API (#84) --- go.mod | 3 +++ go.sum | 3 +++ pkg/elfparser/mocks/elfparser_mocks.go | 16 ++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/go.mod b/go.mod index cc9fa8a..fb60076 100644 --- a/go.mod +++ b/go.mod @@ -16,5 +16,8 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df // indirect go.uber.org/multierr v1.10.0 // indirect + golang.org/x/mod v0.4.2 // indirect + golang.org/x/tools v0.1.1 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index ec7040a..534eec3 100644 --- a/go.sum +++ b/go.sum @@ -18,6 +18,7 @@ go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -37,9 +38,11 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.1 h1:wGiQel/hW0NnEkJUk8lbzkX2gFJU6PFxf1v5OlCfuOs= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/pkg/elfparser/mocks/elfparser_mocks.go b/pkg/elfparser/mocks/elfparser_mocks.go index 9172a74..138c119 100644 --- a/pkg/elfparser/mocks/elfparser_mocks.go +++ b/pkg/elfparser/mocks/elfparser_mocks.go @@ -80,6 +80,22 @@ func (mr *MockBpfSDKClientMockRecorder) LoadBpfFile(arg0, arg1 interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadBpfFile", reflect.TypeOf((*MockBpfSDKClient)(nil).LoadBpfFile), arg0, arg1) } +// LoadBpfFileWithCustomData mocks base method. +func (m *MockBpfSDKClient) LoadBpfFileWithCustomData(arg0 elfparser.BpfCustomData) (map[string]elfparser.BpfData, map[string]maps.BpfMap, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "LoadBpfFileWithCustomData", arg0) + ret0, _ := ret[0].(map[string]elfparser.BpfData) + ret1, _ := ret[1].(map[string]maps.BpfMap) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// LoadBpfFileWithCustomData indicates an expected call of LoadBpfFileWithCustomData. +func (mr *MockBpfSDKClientMockRecorder) LoadBpfFileWithCustomData(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadBpfFileWithCustomData", reflect.TypeOf((*MockBpfSDKClient)(nil).LoadBpfFileWithCustomData), arg0) +} + // RecoverAllBpfProgramsAndMaps mocks base method. func (m *MockBpfSDKClient) RecoverAllBpfProgramsAndMaps() (map[string]elfparser.BpfData, error) { m.ctrl.T.Helper()