summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/dev/sysmon/t_swsensor.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/netbsd-tests/dev/sysmon/t_swsensor.sh')
-rwxr-xr-xcontrib/netbsd-tests/dev/sysmon/t_swsensor.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/netbsd-tests/dev/sysmon/t_swsensor.sh b/contrib/netbsd-tests/dev/sysmon/t_swsensor.sh
index 5b54431..7f98c1a 100755
--- a/contrib/netbsd-tests/dev/sysmon/t_swsensor.sh
+++ b/contrib/netbsd-tests/dev/sysmon/t_swsensor.sh
@@ -1,4 +1,4 @@
-# $NetBSD: t_swsensor.sh,v 1.7 2013/04/14 16:07:46 martin Exp $
+# $NetBSD: t_swsensor.sh,v 1.9 2015/04/23 23:23:28 pgoyette Exp $
get_sensor_info() {
rump.envstat -x | \
@@ -6,7 +6,13 @@ get_sensor_info() {
}
get_sensor_key() {
- get_sensor_info | grep -A1 $1 | grep integer | sed -e 's;<[/a-z]*>;;g'
+ local v
+ v=$(get_sensor_info | grep -A1 $1 | grep integer | \
+ sed -e 's;<[/a-z]*>;;g')
+ if [ -z "$v" ] ; then
+ v="key_$1_not_found"
+ fi
+ echo $v
}
get_powerd_event_count() {
@@ -60,7 +66,7 @@ start_rump() {
common_head() {
atf_set descr "$1"
- atf_set timeout 60
+ atf_set timeout 120
atf_set require.progs rump.powerd rump.envstat rump.modload \
rump.halt rump.sysctl rump_server \
sed grep awk \
OpenPOWER on IntegriCloud