From 573cdae8ce17b4e0ec51f5bcc90cc5f49c2e290f Mon Sep 17 00:00:00 2001 From: Baitinq Date: Mon, 29 Jul 2024 12:19:15 +0200 Subject: fs-tracer: store file offset --- tests/openat.c | 7 +++++++ tests/testfile | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/openat.c b/tests/openat.c index d843d2f..e5f6f17 100644 --- a/tests/openat.c +++ b/tests/openat.c @@ -22,6 +22,13 @@ int main(int argc, char** argv) { printf("Write error: %s\n", strerror(errno)); } + ret = syscall(SYS_write, fd, "\nplease", 7); + printf("Write ret: %d\n", ret); + + if (ret == -1) { + printf("Write error: %s\n", strerror(errno)); + } + ret = syscall(SYS_close, fd); printf("Close ret: %d\n", ret); diff --git a/tests/testfile b/tests/testfile index 6426eb5..993bbba 100644 --- a/tests/testfile +++ b/tests/testfile @@ -1 +1,2 @@ -I'm writing this :) pls. \ No newline at end of file +I'm writing this :) pls. +please \ No newline at end of file -- cgit 1.4.1