Browse Source

Return with 0 in all tests

Jeremy Soller 7 years ago
parent
commit
dd847cc67e
19 changed files with 20 additions and 3 deletions
  1. 1 1
      tests/alloc.c
  2. 1 0
      tests/args.c
  3. 1 1
      tests/brk.c
  4. 1 0
      tests/chdir.c
  5. 1 0
      tests/dup.c
  6. 1 0
      tests/error.c
  7. 1 0
      tests/fchdir.c
  8. 1 0
      tests/fcntl.c
  9. 1 0
      tests/fsync.c
  10. 2 1
      tests/ftruncate.c
  11. 1 0
      tests/getid.c
  12. 1 0
      tests/link.c
  13. 1 0
      tests/math.c
  14. 1 0
      tests/mem.c
  15. 1 0
      tests/pipe.c
  16. 1 0
      tests/rmdir.c
  17. 1 0
      tests/setid.c
  18. 1 0
      tests/sleep.c
  19. 1 0
      tests/unlink.c

+ 1 - 1
tests/alloc.c

@@ -16,5 +16,5 @@ int main(int argc, char ** argv) {
         ptrc[i] = (char)i;
     }
     free(ptrc);
-
+    return 0;
 }

+ 1 - 0
tests/args.c

@@ -8,4 +8,5 @@ int main(int argc, char ** argv) {
         write(STDOUT_FILENO, " ", 1);
     }
     write(STDOUT_FILENO, "\n", 1);
+    return 0;
 }

+ 1 - 1
tests/brk.c

@@ -4,5 +4,5 @@
 int main(int argc, char** argv) {
     int status = brk((void*)100);
     printf("brk exited with status code %d\n", status);
+    return 0;
 }
-

+ 1 - 0
tests/chdir.c

@@ -12,4 +12,5 @@ int main(int argc, char** argv) {
     getcwd(cwd2, 4096);
     printf("final cwd: %s\n", cwd2);
     free(cwd2);
+    return 0;
 }

+ 1 - 0
tests/dup.c

@@ -13,4 +13,5 @@ int main(int argc, char** argv) {
     dup2(fd3, 1);
     printf("hello fd %d", fd3);
     close(fd3);
+    return 0;
 }

+ 1 - 0
tests/error.c

@@ -7,4 +7,5 @@ int main(int argc, char** argv) {
     chdir("nonexistent");
     printf("errno: %d = %s\n", errno, strerror(errno));
     perror("perror");
+    return 0;
 }

+ 1 - 0
tests/fchdir.c

@@ -8,4 +8,5 @@ int main (int argc, char** argv) {
     status = fchdir(fd);
     printf("fchdir exited with status code %d\n", status);
     close(fd);
+    return 0;
 }

+ 1 - 0
tests/fcntl.c

@@ -10,4 +10,5 @@ int main() {
     printf("fd %d duped into fd %d\n", newfd, newfd2);
     close(newfd);
     close(newfd2);
+    return 0;
 }

+ 1 - 0
tests/fsync.c

@@ -8,4 +8,5 @@ int main (int argc, char** argv) {
     status = fsync(fd);
     printf("fsync exited with status code %d\n", status);
     close(fd);
+    return 0;
 }

+ 2 - 1
tests/ftruncate.c

@@ -3,9 +3,10 @@
 #include <stdio.h>
 
 int main (int argc, char** argv) {
-    int fd = creat("ftruncate.out", 0777); 
+    int fd = creat("ftruncate.out", 0777);
     int status;
     status = ftruncate(fd, 100);
     printf("ftruncate exited with status code %d\n", status);
     close(fd);
+    return 0;
 }

+ 1 - 0
tests/getid.c

@@ -11,4 +11,5 @@ int main(int argc, char** argv) {
     uid_t uid = getuid();
     printf("egid: %d, euid: %d, gid: %d, pgid: %d, pid: %d, ppid %d, uid %d\n",
             egid, euid, gid, pgid, pid, ppid, uid);
+    return 0;
 }

+ 1 - 0
tests/link.c

@@ -4,4 +4,5 @@
 int main(int argc, char** argv) {
     link("./link.c", "./link.out");
     perror("link");
+    return 0;
 }

+ 1 - 0
tests/math.c

@@ -5,4 +5,5 @@ int main(int argc, char ** argv) {
     double pi = 3.14;
     float c = cos(pi);
     printf("cos(%f) = %f\n", pi, c);
+    return 0;
 }

+ 1 - 0
tests/mem.c

@@ -20,4 +20,5 @@ int main(int argc, char ** argv) {
 		exit(1);
 	}
 	printf("Correct memccpy\n");
+    return 0;
 }

+ 1 - 0
tests/pipe.c

@@ -30,4 +30,5 @@ int main()
         /* close read end */
         close(pip[0]);
     }
+    return 0;
 }

+ 1 - 0
tests/rmdir.c

@@ -6,4 +6,5 @@ int main(int argc, char** argv) {
     mkdir("foo", 0);
     int status = rmdir("foo");
     printf("rmdir exited with status code %d\n", status);
+    return 0;
 }

+ 1 - 0
tests/setid.c

@@ -23,4 +23,5 @@ int main( void )
         perror( "setreuid" );
     }
     printf("%d has euid %d and uid %d\n", getpid(), geteuid(), getuid());
+    return 0;
   }

+ 1 - 0
tests/sleep.c

@@ -10,4 +10,5 @@ int main(int argc, char** argv) {
     timespec tm = {0, 10000};
     nanosleep(&tm, NULL);
     perror("nanosleep");
+    return 0;
 }

+ 1 - 0
tests/unlink.c

@@ -4,4 +4,5 @@
 int main(int argc, char** argv) {
     link("./unlink.c", "./unlink.out");
     perror("unlink");
+    return 0;
 }