Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: nil pointer exception on utils.IsfileExists #72

Merged
merged 3 commits into from
Jan 24, 2024

Conversation

cainelli
Copy link
Contributor

@cainelli cainelli commented Jan 3, 2024

Fixes #71

Description of changes:

Handle other type of errors beyond ErrNotExist.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@jayanthvn jayanthvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for fixing this.

@jayanthvn jayanthvn merged commit 9389292 into aws:main Jan 24, 2024
2 checks passed
@cainelli cainelli deleted the fix-isfileexist-nil-pointer branch January 30, 2024 13:59
jayanthvn added a commit that referenced this pull request Feb 2, 2024
* 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](golang/sys@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] <[email protected]>
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] <[email protected]>
Co-authored-by: Apurup Chevuru <[email protected]>
Co-authored-by: Fernando Cainelli <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
jayanthvn added a commit that referenced this pull request May 3, 2024
* 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](golang/sys@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] <[email protected]>
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](stretchr/testify@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] <[email protected]>
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](golang/sys@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] <[email protected]>
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](uber-go/zap@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] <[email protected]>
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](golang/sys@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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Test mod file

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Apurup Chevuru <[email protected]>
Co-authored-by: Fernando Cainelli <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
jayanthvn added a commit that referenced this pull request Jun 20, 2024
* 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 <[email protected]>

* 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](golang/sys@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] <[email protected]>
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 <[email protected]>

* makefile: refactor using pattern rule

Signed-off-by: shun159 <[email protected]>

---------

Signed-off-by: shun159 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Signed-off-by: shun159 <[email protected]>

* 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 <[email protected]>

---------

Signed-off-by: shun159 <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Apurup Chevuru <[email protected]>
Co-authored-by: Alex Jones <[email protected]>
Co-authored-by: Davanum Srinivas <[email protected]>
Co-authored-by: Eishun Kondoh <[email protected]>
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 <[email protected]>

* 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](golang/sys@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] <[email protected]>
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 <[email protected]>

* makefile: refactor using pattern rule

Signed-off-by: shun159 <[email protected]>

---------

Signed-off-by: shun159 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Signed-off-by: shun159 <[email protected]>

* 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 <[email protected]>

* Add v6 test and inc log level (#53)

* Fix verifier log buffer size (#54)

---------

Signed-off-by: shun159 <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Apurup Chevuru <[email protected]>
Co-authored-by: Alex Jones <[email protected]>
Co-authored-by: Davanum Srinivas <[email protected]>
Co-authored-by: Eishun Kondoh <[email protected]>
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 <[email protected]>

* 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](golang/sys@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] <[email protected]>
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 <[email protected]>

* makefile: refactor using pattern rule

Signed-off-by: shun159 <[email protected]>

---------

Signed-off-by: shun159 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Signed-off-by: shun159 <[email protected]>

* 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 <[email protected]>

* Add v6 test and inc log level (#53)

* Fix verifier log buffer size (#54)

* Use defer close

---------

Signed-off-by: shun159 <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Apurup Chevuru <[email protected]>
Co-authored-by: Alex Jones <[email protected]>
Co-authored-by: Davanum Srinivas <[email protected]>
Co-authored-by: Eishun Kondoh <[email protected]>
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 <[email protected]>

* 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](golang/sys@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] <[email protected]>
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 <[email protected]>

* makefile: refactor using pattern rule

Signed-off-by: shun159 <[email protected]>

---------

Signed-off-by: shun159 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Signed-off-by: shun159 <[email protected]>

* 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 <[email protected]>

* 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](uber-go/zap@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] <[email protected]>
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](golang/sys@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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: shun159 <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Apurup Chevuru <[email protected]>
Co-authored-by: Alex Jones <[email protected]>
Co-authored-by: Davanum Srinivas <[email protected]>
Co-authored-by: Eishun Kondoh <[email protected]>
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 <[email protected]>

* 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](golang/sys@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] <[email protected]>
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 <[email protected]>

* makefile: refactor using pattern rule

Signed-off-by: shun159 <[email protected]>

---------

Signed-off-by: shun159 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Signed-off-by: shun159 <[email protected]>

* 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 <[email protected]>

* 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](uber-go/zap@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] <[email protected]>
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](golang/sys@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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pr-tests.yaml (#62)

* Update gomod

---------

Signed-off-by: shun159 <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Apurup Chevuru <[email protected]>
Co-authored-by: Alex Jones <[email protected]>
Co-authored-by: Davanum Srinivas <[email protected]>
Co-authored-by: Eishun Kondoh <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update mocks (#70)

Co-authored-by: Apurup Chevuru <[email protected]>

* 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](golang/sys@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] <[email protected]>
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] <[email protected]>
Co-authored-by: Apurup Chevuru <[email protected]>
Co-authored-by: Fernando Cainelli <[email protected]>
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](golang/sys@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] <[email protected]>
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](stretchr/testify@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] <[email protected]>
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](golang/sys@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] <[email protected]>
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](uber-go/zap@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] <[email protected]>
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](golang/sys@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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Test mod file

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Apurup Chevuru <[email protected]>
Co-authored-by: Fernando Cainelli <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: shun159 <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Apurup Chevuru <[email protected]>
Co-authored-by: Alex Jones <[email protected]>
Co-authored-by: Davanum Srinivas <[email protected]>
Co-authored-by: Eishun Kondoh <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Fernando Cainelli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nil pointer exception on utils.IsfileExists
2 participants