defined 'test_name' for msg()/vmsg() to work properly
[pintos-anon] / src / tests / filesys / base / syn-read.c
index 27154db154b48de8de6ae06d4b7d948f4134eb8f..7c36a429e4f1a6b4bdd282c6481bec1ad6820e47 100644 (file)
@@ -1,3 +1,7 @@
+/* Spawns 10 child processes, all of which read from the same
+   file and make sure that the contents are what they should
+   be. */
+
 #include <random.h>
 #include <stdio.h>
 #include <syscall.h>
@@ -15,11 +19,11 @@ test_main (void)
   pid_t children[CHILD_CNT];
   int fd;
 
-  CHECK (create (filename, sizeof buf), "create \"%s\"", filename);
-  CHECK ((fd = open (filename)) > 1, "open \"%s\"", filename);
+  CHECK (create (file_name, sizeof buf), "create \"%s\"", file_name);
+  CHECK ((fd = open (file_name)) > 1, "open \"%s\"", file_name);
   random_bytes (buf, sizeof buf);
-  CHECK (write (fd, buf, sizeof buf) > 0, "write \"%s\"", filename);
-  msg ("close \"%s\"", filename);
+  CHECK (write (fd, buf, sizeof buf) > 0, "write \"%s\"", file_name);
+  msg ("close \"%s\"", file_name);
   close (fd);
 
   exec_children ("child-syn-read", children, CHILD_CNT);