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

third_party: add catch2 as submodule #95

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/test-verifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:
sudo apt-get install binutils-dev libboost1.74-all-dev libelf-dev zlib1g-dev ninja-build libyaml-cpp-dev -y
- name: Build test target
run: |
cmake -DBPFTIME_ENABLE_UNIT_TESTING=YES -DBPFTIME_LLVM_JIT=NO -DENABLE_EBPF_VERIFIER=YES -DCMAKE_BUILD_TYPE:STRING=Release -S . -B build -G Ninja
cmake --build build --config Release --target bpftime_verifier_tests
make build-with-user-verifier
- name: Run tests
run: |
./build/bpftime-verifier/bpftime_verifier_tests
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "verifier/ebpf-verifier"]
path = bpftime-verifier/ebpf-verifier
url = https://github.com/vbpf/ebpf-verifier
[submodule "third_party/Catch2"]
path = third_party/Catch2
url = https://github.com/catchorg/Catch2.git
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ endif()

# spdlog
add_subdirectory(third_party/spdlog)
# catch2
add_subdirectory(third_party/Catch2)

set(SPDLOG_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/third_party/spdlog/include)

Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ build-llvm: ## build with llvm as jit backend
cmake -Bbuild -DBPFTIME_ENABLE_UNIT_TESTING=1 -DBPFTIME_LLVM_JIT=1
cmake --build build --config Debug

build-with-user-verifier: ## build with userspace ebpf verifier
cmake -DBPFTIME_ENABLE_UNIT_TESTING=YES -DBPFTIME_LLVM_JIT=NO -DENABLE_EBPF_VERIFIER=YES -DCMAKE_BUILD_TYPE:STRING=Release -B build
cmake --build build --config Release --target bpftime_verifier_tests

clean: ## clean the project
rm -rf build
make -C runtime clean
Expand Down
10 changes: 0 additions & 10 deletions bpftime-verifier/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ set(TEST_SOURCES
test/non_kernel_helper.cpp
)

Include(FetchContent)

FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.0.1
)

FetchContent_MakeAvailable(Catch2)

add_executable(bpftime_verifier_tests ${TEST_SOURCES})
add_dependencies(bpftime_verifier_tests bpftime-verifier)
target_link_libraries(bpftime_verifier_tests PRIVATE bpftime-verifier Catch2::Catch2WithMain)
Expand Down
2 changes: 1 addition & 1 deletion daemon/kernel/bpf_tracer.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ process_perf_event_open_enter(struct trace_event_raw_sys_enter *ctx)
return 0;
}
bpf_probe_read_user(&new_attr_buffer, sizeof(new_attr_buffer), attr);
struct perf_event_attr* new_attr_pointer = &new_attr_buffer;
struct perf_event_attr* new_attr_pointer = (struct perf_event_attr*)&new_attr_buffer;
if (new_attr_pointer->type == uprobe_perf_type) {
// found uprobe
if (enable_replace_uprobe) {
Expand Down
9 changes: 0 additions & 9 deletions daemon/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
Include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.0.1
)

FetchContent_MakeAvailable(Catch2)

find_package(Boost REQUIRED)

set(TEST_SOURCES
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions example/sslsniff/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# sslsniff

Not working because we refactored the runtime.

TODO: make the ring buffer work again.
24 changes: 0 additions & 24 deletions runtime/test/bpf/global.bpf.c

This file was deleted.

73 changes: 0 additions & 73 deletions runtime/test/bpf/patch.bpf.c

This file was deleted.

8 changes: 0 additions & 8 deletions runtime/unit-test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
Include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.0.1
)

FetchContent_MakeAvailable(Catch2)

find_package(Boost REQUIRED)

Expand Down
1 change: 1 addition & 0 deletions third_party/Catch2
Submodule Catch2 added at 32d9ae
1 change: 1 addition & 0 deletions tools/cli-rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ fn run_command(
}
Ok(())
}

#[allow(unused)]
fn my_execve(
path: impl AsRef<str>,
Expand Down
1 change: 1 addition & 0 deletions vm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ see [github.com/eunomia-bpf/bpf-benchmark](https://github.com/eunomia-bpf/bpf-be

## Roadmap

- [ ] Replace simple JIT with ubpf
- [ ] AOT support for LLVM JIT
Loading