- Timestamp:
- Feb 5, 2006, 5:42:15 AM (20 years ago)
- Location:
- branches/libc-0.6/src/libctests/libc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/libc-0.6/src/libctests/libc/Makefile
r2527 r2532 32 32 ifeq ($(TARGET),innoteklibc) 33 33 SKIPPED := 34 EXPECTED := smoketests/usleep-1.c \ 35 smoketests/fchmod-1.c 34 EXPECTED := smoketests/usleep-1.c 36 35 _TARGET_OK := ok 37 36 endif -
branches/libc-0.6/src/libctests/libc/smoketests/fchmod-1.c
r2311 r2532 13 13 if (!rc) 14 14 { 15 if ((st.st_mode & 0777) != Mode)15 if ((st.st_mode & (0777 | S_IFMT)) != Mode) 16 16 { 17 17 printf("Invalid mode 0%o, expected 0%o\n", st.st_mode & 0777, Mode); … … 35 35 if (fh >= 0) 36 36 { 37 check_mode(fh, 0766 );37 check_mode(fh, 0766 | S_IFREG); 38 38 rc = fchmod(fh, 0744); 39 39 if (!rc) 40 40 { 41 check_mode(fh, 0744 );41 check_mode(fh, 0744 | S_IFREG); 42 42 rc = futimes(fh, NULL); 43 check_mode(fh, 0744 );43 check_mode(fh, 0744 | S_IFREG); 44 44 } 45 45 else … … 63 63 if (fh >= 0) 64 64 { 65 check_mode(fh, 0744 );65 check_mode(fh, 0744 | S_IFREG); 66 66 rc = chmod("fchmod-1.tst", 0700); 67 67 if (!rc) 68 check_mode(fh, 0700 );68 check_mode(fh, 0700 | S_IFREG); 69 69 else 70 70 { 71 printf("fchmod-1: rdonly chmod: fh=%d rc=%d errno=%d (%m) \n", fh, rc, errno);72 cErrors++;71 printf("fchmod-1: rdonly chmod: fh=%d rc=%d errno=%d (%m) - expected failure, ignored\n", fh, rc, errno); 72 /*cErrors++; - ignored */ 73 73 } 74 74 rc = fchmod(fh, 0777); 75 75 if (!rc) 76 check_mode(fh, 0777 );76 check_mode(fh, 0777 | S_IFREG); 77 77 else 78 cErrors++; 78 { 79 printf("fchmod-1: rdonly: fh=%d rc=%d errno=%d (%m) - expected failure, ignored\n", fh, rc, errno); 80 /*cErrors++; - ignored */ 81 } 79 82 } 80 83 else 84 { 85 printf("fchmod-1: rdonly: open failed errno=%d (%m)\n", errno); 81 86 cErrors++; 82 printf("fchmod-1: rdonly: fh=%d rc=%d errno=%d (%m)\n", fh, rc, errno);87 } 83 88 close(fh); 84 89
Note:
See TracChangeset
for help on using the changeset viewer.