Skip to content
Merged
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
1 change: 0 additions & 1 deletion .github/workflows/ci-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ jobs:
run: |
apt update
apt install -y \
libcapstone-dev \
openmpi-bin \
libopenmpi-dev \
ninja-build \
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ RUN apt update \
ca-certificates \
cmake \
git \
libcapstone-dev \
libopenmpi-dev \
ninja-build \
openmpi-bin \
Expand Down Expand Up @@ -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/* \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions capio/posix/syscall_intercept/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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=<INSTALL_DIR>
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
)
-DPERFORM_STYLE_CHECKS=OFF
)
4 changes: 3 additions & 1 deletion capio/tests/integration/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <gtest/gtest.h>

#include "common/syscall.hpp"

char **build_args() {
char **args = (char **) malloc(3 * sizeof(uintptr_t));

Expand Down Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions capio/tests/unit/syscall/src/clone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <fcntl.h>
#include <semaphore.h>
#include <syscall.h>
#include <unistd.h>

constexpr int ARRAY_SIZE = 100;
Expand Down Expand Up @@ -61,15 +62,15 @@ TEST(SystemCallTest, TestThreadCloneProducerConsumer) {
}

TEST(SystemCallTest, TestForkParentChild) {
auto pid = fork();
auto pid = syscall(SYS_fork);
EXPECT_GE(pid, 0);
if (pid == 0) {
exit(EXIT_SUCCESS);
}
}

TEST(SystemCallTest, TestThreadCloneProducerConsumerWithStat) {
constexpr const char *PATHNAME = "test_file.txt";
constexpr const char *PATHNAME = "test_clone.txt";
sem = static_cast<sem_t *>(malloc(sizeof(sem_t)));
EXPECT_EQ(sem_init(sem, 0, 0), 0);
FILE *fp = fopen(PATHNAME, "w+");
Expand Down
4 changes: 3 additions & 1 deletion capio/tests/unit/syscall/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <gtest/gtest.h>
#include <linux/limits.h>

#include "common/syscall.hpp"

char **build_args() {
char **args = (char **) malloc(4 * sizeof(uintptr_t));

Expand Down Expand Up @@ -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);
Expand Down
Loading