8 char testfilename
[] = "RAM:__TEST__";
14 fd
= creat(testfilename
, 0700);
17 TEST((stat(testfilename
, &buf
) != -1));
18 TEST(((buf
.st_mode
& 0777) == 0700));
19 TEST((chmod(testfilename
, 0111) != -1));
20 TEST((stat(testfilename
, &buf
) != -1));
21 TEST(((buf
.st_mode
& 0777) == 0111));
22 TEST((chmod(testfilename
, 0222) != -1));
23 TEST((stat(testfilename
, &buf
) != -1));
24 TEST(((buf
.st_mode
& 0777) == 0222));
25 TEST((chmod(testfilename
, 0333) != -1));
26 TEST((stat(testfilename
, &buf
) != -1));
27 TEST(((buf
.st_mode
& 0777) == 0333));
28 TEST((chmod(testfilename
, 0444) != -1));
29 TEST((stat(testfilename
, &buf
) != -1));
30 TEST(((buf
.st_mode
& 0777) == 0444));
31 TEST((chmod(testfilename
, 0555) != -1));
32 TEST((stat(testfilename
, &buf
) != -1));
33 TEST(((buf
.st_mode
& 0777) == 0555));
34 TEST((chmod(testfilename
, 0666) != -1));
35 TEST((stat(testfilename
, &buf
) != -1));
36 TEST(((buf
.st_mode
& 0777) == 0666));
37 TEST((chmod(testfilename
, 0777) != -1));
38 TEST((stat(testfilename
, &buf
) != -1));
39 TEST(((buf
.st_mode
& 0777) == 0777));