WLAN-Pi / wlanpi-hwtest

hwtest drives a suite of tests to determine diagnostic health for WLAN Pi Pro hardware.
Other
1 stars 0 forks source link

test_fan_detected still passes even if disabled #31

Closed jolla closed 2 years ago

jolla commented 2 years ago

Even if fan is not enabled in /boot/config.txt test still passes

../../opt/wlanpi-hwtest/lib/python3.9/site-packages/hwtest/automated/fan_test.py::test_gpio_fan_mod PASSED
../../opt/wlanpi-hwtest/lib/python3.9/site-packages/hwtest/automated/fan_test.py::test_gpio_fan_conf PASSED
../../opt/wlanpi-hwtest/lib/python3.9/site-packages/hwtest/automated/fan_test.py::test_fan_detected PASSED
jolla commented 2 years ago

Not sure what changed, but I just re-ran the test and now 2 of the 3 failed

../../opt/wlanpi-hwtest/lib/python3.9/site-packages/hwtest/automated/fan_test.py::test_gpio_fan_mod FAILED
../../opt/wlanpi-hwtest/lib/python3.9/site-packages/hwtest/automated/fan_test.py::test_gpio_fan_conf PASSED
../../opt/wlanpi-hwtest/lib/python3.9/site-packages/hwtest/automated/fan_test.py::test_fan_detected FAILED
___________________________________________________________________________________________ test_gpio_fan_mod ____________________________________________________________________________________________

    def test_gpio_fan_mod():
        """
        Test command:
            lsmod | grep gpio_fan

        Results:
            True - gpio_fan module detected in lsmod
            False - not detected
        """

>       assert is_module_present("gpio_fan") is True
E       AssertionError: assert False is True
E        +  where False = is_module_present('gpio_fan')

/opt/wlanpi-hwtest/lib/python3.9/site-packages/hwtest/automated/fan_test.py:14: AssertionError
___________________________________________________________________________________________ test_fan_detected ____________________________________________________________________________________________

    def test_fan_detected():
        """
        Test command: sensors

        Output:
            gpio_fan-isa-0000
            Adapter: ISA adapter
            fan1:        5000 RPM  (min =    0 RPM, max = 5000 RPM)

        Expects 1:
            True - gpio_fan-isa-0000 in response
            False - did not find gpio_fan-isa-0000 in response

        Expects 2)
            True - fan0 or fan1 in the output
            False - fan0 or fan1 NOT in output

        Depends:
            sudo apt install lm-sensors
        """

        resp = run_command(["sensors"])

>       assert "gpio_fan-isa-0000" in resp
E       AssertionError: assert 'gpio_fan-isa-0000' in 'bq27546_0-virtual-0\nAdapter: Virtual device\ntemp1:        -39.1°C  \n\niwlwifi_1-virtual-0\nAdapter: Virtual device...-0\nAdapter: Virtual device\ntemp1:        +40.0°C  \n\nrpi_volt-isa-0000\nAdapter: ISA adapter\nin0:              N/A'

/opt/wlanpi-hwtest/lib/python3.9/site-packages/hwtest/automated/fan_test.py:55: AssertionError
joshschmelzle commented 2 years ago

Reboot problem is related to #9

Test robustness work will be done in #32