Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 473
blob52c147ecbad96a545e42242b860249f9b259ec8d
1 #!/bin/sh
2 # PCP QA Test No. 473
3 # multi-thread - fetch and profile services for contented contexts
5 # Copyright (c) 2011 Ken McDonell. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 _get_libpcp_config
17 $multi_threaded || _notrun "No libpcp threading support"
19 status=0 # success is the default!
20 $sudo rm -f $tmp.* /tmp/func?.out $seq.full
21 trap "rm -f $tmp.* /tmp/func?.out; exit \$status" 0 1 2 3 15
23 # real QA test starts here
24 echo "Only one context ..."
25 src/multithread7 localhost
26 cat /tmp/func?.out | LC_COLLATE=POSIX sort | uniq -c | sed -e 's/ */ /g'
28 echo
29 echo "Two contexts, same host, different fd's ..."
30 src/multithread7 `hostname` localhost
31 cat /tmp/func?.out | LC_COLLATE=POSIX sort | uniq -c | sed -e 's/ */ /g'
33 echo
34 echo "Two contexts, same host, same fd's ..."
35 src/multithread7 `hostname` `hostname`
36 cat /tmp/func?.out | LC_COLLATE=POSIX sort | uniq -c | sed -e 's/ */ /g'
38 echo
39 echo "Three contexts, same host, different fd's ..."
40 src/multithread7 `hostname` localhost 127.0.0.1
41 cat /tmp/func?.out | LC_COLLATE=POSIX sort | uniq -c | sed -e 's/ */ /g'
43 echo
44 echo "Three contexts, same host, same fd's ..."
45 src/multithread7 `hostname` `hostname` `hostname`
46 cat /tmp/func?.out | LC_COLLATE=POSIX sort | uniq -c | sed -e 's/ */ /g'
48 # success, all done
49 exit