Changeset 2311
- Timestamp:
- Aug 28, 2005, 8:08:53 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libctests/libc/smoketests/fchmod-1.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r2310 r2311 30 30 umask(0); 31 31 unlink("fchmod-1.tst"); 32 32 33 int rc = -1; 33 34 int fh = open("fchmod-1.tst", O_RDWR | O_CREAT, 0766); … … 37 38 rc = fchmod(fh, 0744); 38 39 if (!rc) 40 { 39 41 check_mode(fh, 0744); 42 rc = futimes(fh, NULL); 43 check_mode(fh, 0744); 44 } 40 45 else 41 46 cErrors++; … … 46 51 close(fh); 47 52 53 rc = chmod("fchmod-1.tst", 0744); 54 if (rc) 55 { 56 printf("fchmod-1: chmod: rc=%d errno=%d (%m)\n", rc, errno); 57 cErrors++; 58 } 59 48 60 errno = 0; 49 61 rc = -1; … … 51 63 if (fh >= 0) 52 64 { 65 check_mode(fh, 0744); 66 rc = chmod("fchmod-1.tst", 0700); 67 if (!rc) 68 check_mode(fh, 0700); 69 else 70 { 71 printf("fchmod-1: rdonly chmod: fh=%d rc=%d errno=%d (%m)\n", fh, rc, errno); 72 cErrors++; 73 } 53 74 rc = fchmod(fh, 0777); 54 75 if (!rc) … … 62 83 close(fh); 63 84 64 //unlink("fchmod-1.tst");85 unlink("fchmod-1.tst"); 65 86 66 87 if (!cErrors) -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.