diff options
Diffstat (limited to 'tests/stat')
-rw-r--r-- | tests/stat/test_chmod.c | 24 | ||||
-rw-r--r-- | tests/stat/test_mknod.c | 5 | ||||
-rw-r--r-- | tests/stat/test_stat.c | 3 |
3 files changed, 0 insertions, 32 deletions
diff --git a/tests/stat/test_chmod.c b/tests/stat/test_chmod.c index bf0e2cbe..3574760b 100644 --- a/tests/stat/test_chmod.c +++ b/tests/stat/test_chmod.c @@ -56,11 +56,7 @@ void test() { memset(&s, 0, sizeof s); stat("file", &s); -#if USE_OLD_FS - assert(s.st_mode == (0222 | S_IFREG)); -#else assert(s.st_mode == (0200 | S_IFREG)); -#endif assert(s.st_ctime != lastctime); // @@ -74,11 +70,7 @@ void test() { memset(&s, 0, sizeof s); stat("file", &s); -#if USE_OLD_FS - assert(s.st_mode == (0000 | S_IFREG)); -#else assert(s.st_mode == (0100 | S_IFREG)); -#endif assert(s.st_ctime != lastctime); // @@ -95,11 +87,7 @@ void test() { assert(!err); memset(&s, 0, sizeof s); stat("folder", &s); -#if USE_OLD_FS - assert(s.st_mode == (0222 | S_IFDIR)); -#else assert(s.st_mode == (0300 | S_IFDIR)); -#endif assert(s.st_ctime != lastctime); // @@ -110,11 +98,7 @@ void test() { // make sure the file it references changed stat("file-link", &s); -#if USE_OLD_FS - assert(s.st_mode == (0555 | S_IFREG)); -#else assert(s.st_mode == (0400 | S_IFREG)); -#endif // but the link didn't lstat("file-link", &s); @@ -128,19 +112,11 @@ void test() { // make sure the file it references didn't change stat("file-link", &s); -#if USE_OLD_FS - assert(s.st_mode == (0555 | S_IFREG)); -#else assert(s.st_mode == (0400 | S_IFREG)); -#endif // but the link did lstat("file-link", &s); -#if USE_OLD_FS - assert(s.st_mode == (0555 | S_IFLNK)); -#else assert(s.st_mode == (0500 | S_IFLNK)); -#endif puts("success"); } diff --git a/tests/stat/test_mknod.c b/tests/stat/test_mknod.c index 2b8f650d..361b2315 100644 --- a/tests/stat/test_mknod.c +++ b/tests/stat/test_mknod.c @@ -53,15 +53,10 @@ void test() { // mknod a character device err = mknod("mknod-device", S_IFCHR | 0777, 123); -#if USE_OLD_FS - assert(err); - assert(errno == EPERM); -#else assert(!err); memset(&s, 0, sizeof s); stat("mknod-device", &s); assert(S_ISCHR(s.st_mode)); -#endif #endif diff --git a/tests/stat/test_stat.c b/tests/stat/test_stat.c index 2c2bf53d..f59fb3c3 100644 --- a/tests/stat/test_stat.c +++ b/tests/stat/test_stat.c @@ -104,13 +104,10 @@ void test() { assert(s.st_ino); assert(S_ISCHR(s.st_mode)); assert(s.st_nlink); -#if !USE_OLD_FS - // old FS doesn't store proper device ids #ifndef __APPLE__ // mac uses makedev(3, 2) for /dev/null assert(s.st_rdev == makedev(1, 3)); #endif -#endif assert(!s.st_size); assert(s.st_atime); assert(s.st_mtime); |