2 use test::helper qw($_real $_point);
10 ok(!(system("touch reg" )>>8),"create normal file");
11 ok(!(system("mkfifo fifo" )>>8),"create fifo");
14 ok(-e "reg" ,"normal file exists");
15 ok(-e "fifo","fifo exists");
16 ok(-f "reg" ,"normal file is normal file");
17 ok(-p "fifo","fifo is fifo");
20 skip('Need root to mknod devices', 8) unless ($UID == 0);
23 ok(!(system("mknod chr c 2 3")>>8),"create chrdev");
24 ok(!(system("mknod blk b 2 3")>>8),"create blkdev");
27 ok(-e "chr" ,"chrdev exists");
28 ok(-e "blk" ,"blkdev exists");
30 skip('mknod() is just pretend under fakeroot(1)', 4)
31 if exists $ENV{FAKEROOTKEY};
33 ok(-c "chr" ,"chrdev is chrdev");
34 ok(-b "blk" ,"blkdev is blkdev");
37 is($stat[6],3+(2<<8),"chrdev has right major,minor");
39 is($stat[6],3+(2<<8),"blkdev has right major,minor");
43 ok(-e "reg" ,"normal file exists");
44 ok(-e "fifo","fifo exists");
45 ok(-f "reg" ,"normal file is normal file");
46 ok(-p "fifo","fifo is fifo");
49 skip('Need root to mknod devices', 6) unless ($UID == 0);
51 ok(-e "chr" ,"chrdev exists");
52 ok(-e "blk" ,"blkdev exists");
53 ok(-c "chr" ,"chrdev is chrdev");
54 ok(-b "blk" ,"blkdev is blkdev");
57 is($stat[6],3+(2<<8),"chrdev has right major,minor");
59 is($stat[6],3+(2<<8),"blkdev has right major,minor");
62 map { unlink } qw(reg chr blk fifo);