Update file-posix.c utest
authorKevin Klues <klueska@cs.berkeley.edu>
Thu, 15 Oct 2015 05:21:06 +0000 (22:21 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 15 Oct 2015 16:07:00 +0000 (12:07 -0400)
Update this test to reflect some cahnges in the previous commit. This
utest is failing, however, because the vfs doesn't currently support
openat. Once this is fixed, this test should pass again.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/utest/file-posix.c

index dc79981..99a1b71 100644 (file)
@@ -20,16 +20,11 @@ TEST_SUITE("FILE POSIX");
 bool test_openat(void)
 {
        int dfd = open("/dir1", O_RDONLY);
-       if (dfd < 0) {
-               perror("open dir1");
-               return FALSE;
-       }
+       UT_ASSERT(dfd >= 0);
+
        int ffd = openat(dfd, "f1.txt", O_RDWR);
-       if (ffd < 0) {
-               perror("open f1.txt");
-               close(dfd);
-               return FALSE;
-       }
+       UT_ASSERT(ffd >= 0, close(dfd));
+
        close(ffd);
        close(dfd);
        return TRUE;