-
Notifications
You must be signed in to change notification settings - Fork 0
/
testcase_neg.sh
74 lines (46 loc) · 1.34 KB
/
testcase_neg.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
# negative test case
pause(){
read -p "$*"
}
echo "invalid kpi"
./sysmon.sh -k "cpu xkpi" -m key -s wsl1
pause 'next test ...'
echo "invalid access mode"
./sysmon.sh -k cpu -m xmode -s wsl1
pause 'next test ...'
echo "1 No -k and -m needed for ping test"
./sysmon.sh -p -k cpu -m key -s localhost
pause 'next test ...'
echo "2 -s|-f needed for ping test"
./sysmon.sh -p
pause 'next test ...'
echo "3 Cannot have -s and -f at sametime"
./sysmon.sh -p -s localhost -f config/nodelist
pause 'next test ...'
echo "4 -s|-f needed for system monitor"
./sysmon.sh -k mem -m key
pause 'next test ...'
echo "5 -m needed for remote access"
./sysmon.sh -k mem -s wsl1
pause 'next test ...'
echo "6 no -m needed for localhost monitor"
./sysmon.sh -k cpu -m key -s localhost
pause 'next test ...'
echo "7 Cannot have -f with -s at sametime"
./sysmon.sh -k cpu -m key -s localhost -f config/nodelist
pause 'next test ...'
echo "8 -k needed for localhost monitor"
./sysmon.sh -s localhost
pause 'next test ...'
echo "9 -k needed for system monitor"
./sysmon.sh -s wsl1 -m pass
pause 'next test ...'
echo "10 -k and -m needed for system monitor"
./sysmon.sh -s wsl1
pause 'next test ...'
echo "11 -m or -s|-f needed for system monitor"
./sysmon.sh -k all
pause 'next test ...'
echo "12 -k or -s|-f needed for system monitor"
./sysmon.sh -m key