8 char testfilename
[] = "__TEST__";
14 fd
= creat(testfilename
, 0700);
16 TEST((fchmod(fd
, 0444) != -1));
17 TEST((fstat(fd
, &buf
) != -1));
18 TEST(((buf
.st_mode
& 0777) == 0444));
19 TEST((fchmod(fd
, 0555) != -1));
20 TEST((fstat(fd
, &buf
) != -1));
21 TEST(((buf
.st_mode
& 0777) == 0555));
22 TEST((fchmod(fd
, 0666) != -1));
23 TEST((fstat(fd
, &buf
) != -1));
24 TEST(((buf
.st_mode
& 0777) == 0666));
25 TEST((fchmod(fd
, 0777) != -1));
26 TEST((fstat(fd
, &buf
) != -1));
27 TEST(((buf
.st_mode
& 0777) == 0777));