about summary refs log tree commit diff
path: root/tests/openat.c
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-07-29 21:39:17 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-07-29 21:39:17 +0200
commitc96cd77e8309c129adcd88411745dfb48fd58da5 (patch)
treec20b7ce09a0691dbaa337fdb15640e44929d8a2c /tests/openat.c
parentmisc: Update gitignore (diff)
downloadfs-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.c11
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) {