]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - tools/regression/usr.bin/lastcomm/values.sh
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / tools / regression / usr.bin / lastcomm / values.sh
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 ACCT=acct
7 RESULTS=acct.`uname -m`.tar.gz
8 TMPDIR=$$.tmp
9
10 run()
11 {
12         /usr/bin/time -l -o $1.time "$@"
13 }
14
15 echo Redirecting accounting.
16
17 mkdir $TMPDIR
18 cd $TMPDIR
19
20 :>$ACCT
21 accton $ACCT
22
23 echo Running commands. This should not take more than 30s.
24
25 # User time
26 run awk 'BEGIN {for (i = 0; i < 1000000; i++) cos(.3)}' /dev/null
27 run egrep '(.)(.)(.)(.)(.)(.)(.)(.)(.)\9\8\7\6\5\4\3\2\1' /usr/share/dict/words
28
29 # System time
30 run find /usr/src -name xyzzy
31
32 # Elapsed time
33 run sleep 3
34
35 # IO
36 run dd if=/dev/zero bs=512 count=4096 of=zero 2>/dev/null
37
38 # Memory
39 run diff /usr/share/dict/words /dev/null >/dev/null
40
41 # AC_COMM_LEN - 1
42 ln /usr/bin/true 123456789012345
43 run ./123456789012345
44
45 # AC_COMM_LEN
46 ln /usr/bin/true 1234567890123456
47 run ./1234567890123456
48
49 # AC_COMM_LEN + 1
50 ln /usr/bin/true 12345678901234567
51 run ./12345678901234567
52
53 # Flags: core, fork, signal
54 echo 'main(){volatile int s; fork(); s = *(int *)0;}' >core.c
55 cc -o core core.c
56 echo Generating segmentation fault.
57 ./core
58
59 echo Turning off redirected accounting.
60
61 accton
62
63 echo Packing the results.
64
65 sa -u $ACCT >sa.u
66 lastcomm -cesuS -f $ACCT >lastcomm.cesuS
67 tar -cf - acct sa.u lastcomm.cesuS *.time |
68 gzip -c |
69 uuencode $RESULTS >../$RESULTS.uue
70
71 echo Cleaning up.
72 cd ..
73 rm -rf $TMPDIR
74
75 echo "Done!  Please send your reply, enclosing the file $RESULTS.uue"
76 echo If your system runs with accounting enabled you probably need to run:
77 echo accton /var/account/acct