3 # pmnscomp -f /dev/null et al, #690735
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 _notrun
"pmnscomp retired in PCP 3.6"
18 status
=1 # failure is the default!
19 trap "cd $here; rm -rf $tmp; exit \$status" 0 1 2 3 15
23 if [ -r $1 -o -w $1 -o -x $1 ] ; then
24 # filter ls -ld output
25 #-rwxr-xr-x 1 kenmcd ptg 2386 Apr 29 04:52 570
26 #drwxrwxr-x 13 kenmcd ptg 52736 Apr 29 04:33 .
27 #crw-rw-rw- 1 root sys 1, 2 Apr 29 04:57 /dev/null
28 #Cannot access nofile: No such file or directory
29 LC_TIME
=POSIX
ls -ld $1 \
31 -e 's/-rw-r--r--\./-rw-r--r--/' \
32 -e 's/crw-rw-rw-\./crw-rw-rw-/' \
33 -e 's/drwxr-xr-x\./drwxr-xr-x/' \
35 NF == 9 && /^-/ { print $1,"...",$5,"...",$9; next }
36 NF == 9 && /^d/ { print $1,"...",$9; next }
37 NF == 10 && /^[cb]/ { print $1,"...",$10; next }
40 echo "Cannot access $1: No such file or directory"
51 cat >pmns
<<End-of-File
62 # real QA test starts here
65 echo "dir is writeable, output file does not exist"
67 pmnscomp
-n pmns
-f root.bin
72 echo "dir is writeable, output file exists and is writeable"
75 pmnscomp
-n pmns
-f root.bin
80 echo "dir is writeable, output file exists and is non-writeable"
83 pmnscomp
-n pmns
-f root.bin
88 echo "dir is writeable, output file exists but is hidden"
92 pmnscomp
-n pmns
-f hide
/root.bin
98 echo "dir is writeable, output \"file\" is /dev/null"
99 pmnscomp
-n pmns
-f /dev
/null
103 echo "dir is writeable, output \"file\" is a directory"
106 pmnscomp
-n pmns
-f mydir
110 echo "dir is non-writeable, output file does not exist"
113 pmnscomp
-n pmns
-f root.bin
119 echo "dir is non-writeable, output file exists and is writeable"
123 pmnscomp
-n pmns
-f root.bin
129 echo "dir does not exist"
130 pmnscomp
-n pmns
-f no
/such
/path
/root.bin
131 _ls no
/such
/path
/root.bin
134 echo "some options errors"
135 pmnscomp
-n pmns
-v 3 -f root.bin
2|
sed -e 's/0 or 1/0, 1 or 2/g'
140 echo "duplicate PMIDs in pmns"
141 sed -e 's/2/1/g' pmns
>pmns.dup
142 pmnscomp
-n pmns.dup
-f root.bin
145 echo "and again with -d"
146 pmnscomp
-n pmns.dup
-f -d root.bin