Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/dev/sysmon tests/dev/sysmon: Query bits of data, not b...



details:   https://anonhg.NetBSD.org/src/rev/4c23ad5623e5
branches:  trunk
changeset: 983907:4c23ad5623e5
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Jun 13 14:45:36 2021 +0000

description:
tests/dev/sysmon: Query bits of data, not bits of entropy.

Fixes PR kern/47661.

diffstat:

 tests/dev/sysmon/t_swsensor.sh |  9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diffs (53 lines):

diff -r 28e940fe89f5 -r 4c23ad5623e5 tests/dev/sysmon/t_swsensor.sh
--- a/tests/dev/sysmon/t_swsensor.sh    Sun Jun 13 14:02:46 2021 +0000
+++ b/tests/dev/sysmon/t_swsensor.sh    Sun Jun 13 14:45:36 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_swsensor.sh,v 1.11 2020/03/21 04:50:21 pgoyette Exp $
+# $NetBSD: t_swsensor.sh,v 1.12 2021/06/13 14:45:36 riastradh Exp $
 
 get_sensor_info() {
        rump.envstat -x | \
@@ -24,7 +24,7 @@
            RUMP_SERVER=unix://t_swsensor_socket        \
            LD_PRELOAD=/usr/lib/librumphijack.so          rndctl -l | \
        grep "swsensor-sensor" | \
-       awk '{print $2}'
+       awk '{print $3}'
 }
 
 check_powerd_event() {
@@ -296,19 +296,16 @@
        sleep 5
        new_rnd_bits=$( get_rnd_bits_count )
        if [ $new_rnd_bits -le $rnd_bits ] ; then
-               atf_expect_fail "PR kern/47661"
                atf_fail "14a: entropy bits did not increase after polling"
        fi
        rnd_bits=$new_rnd_bits
        sleep 5
        new_rnd_bits=$( get_rnd_bits_count )
        if [ $new_rnd_bits -gt $rnd_bits ] ; then
-               atf_expect_fail "PR kern/47661"
                atf_fail "14b: entropy bits increased after poll with no value change"
        fi
 
        # Step 15 - make sure entropy collected when device is interrogated
-       # 
        rump.envstat -c env0.conf
        rump.sysctl -w hw.swsensor.cur_value=$3
        get_sensor_key cur-value
@@ -317,14 +314,12 @@
        get_sensor_key cur-value
        new_rnd_bits=$( get_rnd_bits_count )
        if [ $new_rnd_bits -le $rnd_bits ] ; then
-               atf_expect_fail "PR kern/47661"
                atf_fail "15a: entropy bits did not increase after interrogation"
        fi
        rnd_bits=$new_rnd_bits
        get_sensor_key cur-value
        new_rnd_bits=$( get_rnd_bits_count )
        if [ $new_rnd_bits -gt $rnd_bits ] ; then
-               atf_expect_fail "PR kern/47661"
                atf_fail "15b: entropy bits increased after interrogation with no value change"
        fi
 }



Home | Main Index | Thread Index | Old Index