4 desc
="mkfifo creates fifo files"
14 expect
0 mkdir
${n1} 0755
18 # POSIX: The file permission bits of the new FIFO shall be initialized from
19 # mode. The file permission bits of the mode argument shall be modified by the
20 # process' file creation mask.
21 expect
0 mkfifo ${n0} 0755
22 expect fifo
,0755 lstat
${n0} type,mode
24 expect
0 mkfifo ${n0} 0151
25 expect fifo
,0151 lstat
${n0} type,mode
27 expect
0 -U 077 mkfifo ${n0} 0151
28 expect fifo
,0100 lstat
${n0} type,mode
30 expect
0 -U 070 mkfifo ${n0} 0345
31 expect fifo
,0305 lstat
${n0} type,mode
33 expect
0 -U 0501 mkfifo ${n0} 0345
34 expect fifo
,0244 lstat
${n0} type,mode
37 # POSIX: The FIFO's user ID shall be set to the process' effective user ID.
38 # The FIFO's group ID shall be set to the group ID of the parent directory or to
39 # the effective group ID of the process.
40 expect
0 chown .
65535 65535
41 expect
0 -u 65535 -g 65535 mkfifo ${n0} 0755
42 expect
65535,65535 lstat
${n0} uid
,gid
44 expect
0 -u 65535 -g 65534 mkfifo ${n0} 0755
45 expect
"65535,6553[45]" lstat
${n0} uid
,gid
48 expect
0 -u 65534 -g 65533 mkfifo ${n0} 0755
49 expect
"65534,6553[35]" lstat
${n0} uid
,gid
52 # POSIX: Upon successful completion, mkfifo() shall mark for update the
53 # st_atime, st_ctime, and st_mtime fields of the file. Also, the st_ctime and
54 # st_mtime fields of the directory that contains the new entry shall be marked
57 time=`${fstest} stat . ctime`
59 expect
0 mkfifo ${n0} 0755
60 atime
=`${fstest} stat ${n0} atime`
61 test_check
$time -lt $atime
62 mtime
=`${fstest} stat ${n0} mtime`
63 test_check
$time -lt $mtime
64 ctime
=`${fstest} stat ${n0} ctime`
65 test_check
$time -lt $ctime
66 mtime
=`${fstest} stat . mtime`
67 test_check
$time -lt $mtime
68 ctime
=`${fstest} stat . ctime`
69 test_check
$time -lt $ctime