diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-07-29 21:39:17 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-07-29 21:39:17 +0200 |
commit | c96cd77e8309c129adcd88411745dfb48fd58da5 (patch) | |
tree | c20b7ce09a0691dbaa337fdb15640e44929d8a2c /tests/openat.c | |
parent | misc: Update gitignore (diff) | |
download | fs-tracer-c96cd77e8309c129adcd88411745dfb48fd58da5.tar.gz fs-tracer-c96cd77e8309c129adcd88411745dfb48fd58da5.tar.bz2 fs-tracer-c96cd77e8309c129adcd88411745dfb48fd58da5.zip |
fs-tracer: update file contents across multiple writes
Diffstat (limited to 'tests/openat.c')
-rw-r--r-- | tests/openat.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/openat.c b/tests/openat.c index 582260a..b14f4ae 100644 --- a/tests/openat.c +++ b/tests/openat.c @@ -22,14 +22,21 @@ int main(int argc, char** argv) { printf("Write error: %s\n", strerror(errno)); } - ret = syscall(SYS_lseek, fd, 24, SEEK_SET); + 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_lseek, fd, 0, SEEK_SET); printf("FSeek ret: %d\n", ret); if (ret == -1) { printf("FSeek error: %s\n", strerror(errno)); } - ret = syscall(SYS_write, fd, "\nplease", 7); + ret = syscall(SYS_write, fd, "A", 1); printf("Write ret: %d\n", ret); if (ret == -1) { |