From e95800f6556e0a9d981b85fe9038ec870080124f Mon Sep 17 00:00:00 2001 From: Bharat Middha <5100938+bmiddha@users.noreply.github.com> Date: Wed, 25 Dec 2024 03:42:51 +0000 Subject: [PATCH] cleanup --- test2/1.sh | 2 -- test2/2.js | 4 ---- test2/3.sh | 2 -- test2/4.js | 3 --- tests/syscalls/open/basic.c | 2 +- tests/syscalls/openat2/fdcwd.c | 4 +++- 6 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 test2/1.sh delete mode 100644 test2/2.js delete mode 100644 test2/3.sh delete mode 100644 test2/4.js diff --git a/test2/1.sh b/test2/1.sh deleted file mode 100644 index 11ca77c..0000000 --- a/test2/1.sh +++ /dev/null @@ -1,2 +0,0 @@ -SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) -node $SCRIPT_DIR/2.js \ No newline at end of file diff --git a/test2/2.js b/test2/2.js deleted file mode 100644 index f035a26..0000000 --- a/test2/2.js +++ /dev/null @@ -1,4 +0,0 @@ -const { execSync } = require("child_process"); - -console.log("Running 3.sh"); -execSync(`bash ${__dirname}/3.sh`, { stdio: "inherit" }); diff --git a/test2/3.sh b/test2/3.sh deleted file mode 100644 index 2fb3ebd..0000000 --- a/test2/3.sh +++ /dev/null @@ -1,2 +0,0 @@ -SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) -node $SCRIPT_DIR/4.js \ No newline at end of file diff --git a/test2/4.js b/test2/4.js deleted file mode 100644 index fb4b553..0000000 --- a/test2/4.js +++ /dev/null @@ -1,3 +0,0 @@ -const { writeFile } = require("fs/promises"); - -writeFile("/tmp/hello.txt", "Hello, world!\n"); diff --git a/tests/syscalls/open/basic.c b/tests/syscalls/open/basic.c index 602e440..0c3a692 100644 --- a/tests/syscalls/open/basic.c +++ b/tests/syscalls/open/basic.c @@ -12,7 +12,7 @@ int main() const char *pathname = "/tmp"; int flags = O_RDONLY; int mode = 0; - int fd = syscall(SYS_open, pathname, flags, mode); + syscall(SYS_open, pathname, flags, mode); return 0; } diff --git a/tests/syscalls/openat2/fdcwd.c b/tests/syscalls/openat2/fdcwd.c index c531974..59c7139 100644 --- a/tests/syscalls/openat2/fdcwd.c +++ b/tests/syscalls/openat2/fdcwd.c @@ -5,13 +5,15 @@ #include #include +// int openat2(int dirfd, const char *pathname, const struct open_how *how, size_t size); + int main() { int dirfd = AT_FDCWD; const char *pathname = "/tmp"; struct open_how how = {.flags = O_PATH, .mode = 0}; int size = sizeof(struct open_how); - int fd = syscall(SYS_openat2, dirfd, pathname, &how, size); + syscall(SYS_openat2, dirfd, pathname, &how, size); return 0; }