4 desc="mknod creates device files"
21 expect 0 mkdir ${n1} 0755
35 # Create char special with old-style numbers
36 expect 0 mknod ${n0} ${type} 0755 1 2
37 expect ${stattype},0755 lstat ${n0} type,mode
38 expect 1,2 lstat ${n0} major,minor
39 expect EEXIST mknod ${n0} ${type} 0777 3 4
44 # Create char special with new-style numbers
45 expect 0 mknod ${n0} ${type} 0755 4095 4095
46 expect ${stattype},0755 lstat ${n0} type,mode
47 expect 4095,4095 lstat ${n0} major,minor
48 expect EEXIST mknod ${n0} ${type} 0777 4000 4000
51 # mknod returns EINVAL if device's numbers are too big
52 # for 32-bit solaris !!
53 expect EINVAL mknod ${n0} ${type} 0755 4096 262144
57 # POSIX: Upon successful completion, mknod(2) shall mark for update the
58 # st_atime, st_ctime, and st_mtime fields of the file. Also, the st_ctime and
59 # st_mtime fields of the directory that contains the new entry shall be marked
62 time=`${fstest} stat . ctime`
64 expect 0 mknod ${n0} ${type} 0755 1 2
65 atime=`${fstest} stat ${n0} atime`
66 test_check $time -lt $atime
67 mtime=`${fstest} stat ${n0} mtime`
68 test_check $time -lt $mtime
69 ctime=`${fstest} stat ${n0} ctime`
70 test_check $time -lt $ctime
71 mtime=`${fstest} stat . mtime`
72 test_check $time -lt $mtime
73 ctime=`${fstest} stat . ctime`
74 test_check $time -lt $ctime