diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml index 64a56db95..7927d20f2 100644 --- a/.github/workflows/ci-tests.yaml +++ b/.github/workflows/ci-tests.yaml @@ -146,7 +146,6 @@ jobs: run: | apt update apt install -y \ - libcapstone-dev \ openmpi-bin \ libopenmpi-dev \ ninja-build \ diff --git a/Dockerfile b/Dockerfile index 67367755e..5e6b9f7c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,6 @@ RUN apt update \ ca-certificates \ cmake \ git \ - libcapstone-dev \ libopenmpi-dev \ ninja-build \ openmpi-bin \ @@ -38,7 +37,6 @@ ENV LD_LIBRARY_PATH="/usr/local/lib" RUN apt update \ && apt install -y --no-install-recommends \ - libcapstone4 \ openmpi-bin \ openssh-server \ && rm -rf /var/lib/apt/lists/* \ diff --git a/README.md b/README.md index 5b5d177c3..d73031df9 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ CAPIO depends on the following software that needs to be manually installed: The following dependencies are automatically fetched during cmake configuration phase, and compiled when required. - [CAPIO-CL](https://github.com/High-Performance-IO/CAPIO-CL) To handle the CAPIO-CL configuration and enforce streaming directives -- [syscall_intercept](https://github.com/pmem/syscall_intercept) to intercept syscalls +- [alpha-unito/syscall_intercept](https://github.com/alpha-unito/syscall_intercept) to intercept syscalls (forked from ```pmem/syscall_interept```) - [Taywee/args](https://github.com/Taywee/args) to parse server command line inputs ### Compile capio diff --git a/capio/posix/syscall_intercept/CMakeLists.txt b/capio/posix/syscall_intercept/CMakeLists.txt index 650784458..9b91fd1a0 100644 --- a/capio/posix/syscall_intercept/CMakeLists.txt +++ b/capio/posix/syscall_intercept/CMakeLists.txt @@ -14,13 +14,15 @@ include(ExternalProject) # Import external project from git ##################################### ExternalProject_Add(syscall_intercept - GIT_REPOSITORY https://github.com/pmem/syscall_intercept.git - GIT_TAG ca4b13531f883597c2f04a40e095f76f6c3a6d22 + GIT_REPOSITORY https://github.com/alpha-unito/syscall_intercept.git + GIT_TAG 7dbdf6ab9c576f96843ef2553b7efc7d15cf66b4 PREFIX ${CMAKE_CURRENT_BINARY_DIR} CMAKE_ARGS + -DSTATIC_CAPSTONE=ON -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH= -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -) \ No newline at end of file + -DPERFORM_STYLE_CHECKS=OFF +) diff --git a/capio/tests/integration/src/main.cpp b/capio/tests/integration/src/main.cpp index 377356755..5da524aa2 100644 --- a/capio/tests/integration/src/main.cpp +++ b/capio/tests/integration/src/main.cpp @@ -1,5 +1,7 @@ #include +#include "common/syscall.hpp" + char **build_args() { char **args = (char **) malloc(3 * sizeof(uintptr_t)); @@ -59,7 +61,7 @@ class CapioServerEnvironment : public testing::Environment { void SetUp() override { if (server_pid < 0) { ASSERT_NE(std::getenv("CAPIO_DIR"), nullptr); - ASSERT_GE(server_pid = fork(), 0); + ASSERT_GE(server_pid = capio_syscall(SYS_fork), 0); if (server_pid == 0) { execvpe(args[0], args, envp); _exit(127); diff --git a/capio/tests/unit/syscall/src/clone.cpp b/capio/tests/unit/syscall/src/clone.cpp index d5bd37242..3a7bb94c3 100644 --- a/capio/tests/unit/syscall/src/clone.cpp +++ b/capio/tests/unit/syscall/src/clone.cpp @@ -4,6 +4,7 @@ #include #include +#include #include constexpr int ARRAY_SIZE = 100; @@ -61,7 +62,7 @@ TEST(SystemCallTest, TestThreadCloneProducerConsumer) { } TEST(SystemCallTest, TestForkParentChild) { - auto pid = fork(); + auto pid = syscall(SYS_fork); EXPECT_GE(pid, 0); if (pid == 0) { exit(EXIT_SUCCESS); @@ -69,7 +70,7 @@ TEST(SystemCallTest, TestForkParentChild) { } TEST(SystemCallTest, TestThreadCloneProducerConsumerWithStat) { - constexpr const char *PATHNAME = "test_file.txt"; + constexpr const char *PATHNAME = "test_clone.txt"; sem = static_cast(malloc(sizeof(sem_t))); EXPECT_EQ(sem_init(sem, 0, 0), 0); FILE *fp = fopen(PATHNAME, "w+"); diff --git a/capio/tests/unit/syscall/src/main.cpp b/capio/tests/unit/syscall/src/main.cpp index 5654badbf..dc556f93e 100644 --- a/capio/tests/unit/syscall/src/main.cpp +++ b/capio/tests/unit/syscall/src/main.cpp @@ -1,6 +1,8 @@ #include #include +#include "common/syscall.hpp" + char **build_args() { char **args = (char **) malloc(4 * sizeof(uintptr_t)); @@ -66,7 +68,7 @@ class CapioServerEnvironment : public testing::Environment { void SetUp() override { if (server_pid < 0) { ASSERT_NE(std::getenv("CAPIO_DIR"), nullptr); - ASSERT_GE(server_pid = fork(), 0); + ASSERT_GE(server_pid = capio_syscall(SYS_fork), 0); if (server_pid == 0) { execvpe(args[0], args, envp); _exit(127);