Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kyechou committed Jul 23, 2024
1 parent cab1bdb commit 9fa47b8
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ set(VECTORSZ 4000 CACHE STRING "Memory allocation for spin state vector")
include("CheckTypeSize")
check_type_size("void *" SIZEOF_VOID_P)
check_type_size("int" SIZEOF_INT)
add_compile_options(-Wall -Wextra -Werror)
add_compile_options(-Wall -Wextra -Werror -O2)

#
# release/debug compile flags
Expand Down
2 changes: 1 addition & 1 deletion src/dockerapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ Document DockerAPI::inspect_img(const string &img_name) {
}

Document DockerAPI::rm_img(const string &img_name) {
string path = "/images/" + img_name;
string path = "/images/" + img_name + "?force=true";
return this->send_curl_request(method::DELETE, path);
}

Expand Down
2 changes: 0 additions & 2 deletions src/droptrace.bpf.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "../build/vmlinux.h"

#include <linux/string.h>

#include <bpf/bpf_core_read.h>
#include <bpf/bpf_helpers.h>

Expand Down
5 changes: 1 addition & 4 deletions src/droptrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ void DropTrace::start() {
logger.error("Another BPF progam is already loaded");
}

_bpf = droptrace_bpf__open();

if (!_bpf) {
if (!(_bpf = droptrace_bpf__open())) {
logger.error("Failed to open BPF program", errno);
}

Expand Down Expand Up @@ -163,7 +161,6 @@ void DropTrace::start_listening_for(const Packet &pkt, Driver *driver) {

_ringbuf = ring_buffer__new(bpf_map__fd(_bpf->maps.events),
DropTrace::ringbuf_handler, this, nullptr);

if (!_ringbuf) {
logger.error("Failed to create ring buffer", errno);
}
Expand Down
3 changes: 1 addition & 2 deletions src/packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@

#include "driver/docker.hpp"
#include "driver/driver.hpp"
#include "eqclassmgr.hpp"
#include "eqclass.hpp"
#include "interface.hpp"
#include "lib/hash.hpp"
#include "model-access.hpp"
#include "payload.hpp"
#include "process/process.hpp"
#include "protocols.hpp"

Packet::Packet() :
Expand Down
2 changes: 1 addition & 1 deletion third_party/bpftool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ ExternalProject_Add(bpftool
STEP_TARGETS build
)

set(bpftool_VERSION "7.2.0" PARENT_SCOPE)
set(bpftool_VERSION "7.4.0" PARENT_SCOPE)
set(bpftool_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/bpftool PARENT_SCOPE)
2 changes: 1 addition & 1 deletion third_party/libbpf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ ExternalProject_Add(libbpf
STEP_TARGETS build
)

set(libbpf_VERSION "1.2.2" PARENT_SCOPE)
set(libbpf_VERSION "1.4.0" PARENT_SCOPE)
set(libbpf_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/install PARENT_SCOPE)
set(libbpf_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/install/libbpf.a PARENT_SCOPE)
2 changes: 1 addition & 1 deletion third_party/libbpf/libbpf

0 comments on commit 9fa47b8

Please sign in to comment.