Closed joshschmelzle closed 2 years ago
Any tests that read from /boot/config.txt should be robust enough to verify if a particular line of interest is also a comment.
/boot/config.txt
For example in fan_test.py::test_gpio_fan_conf we currently assert "gpio-fan" is in config.txt, but do not check if the line is commented out.
config.txt
So, this should fail, but instead passes:
cat /boot/config.txt | grep fan #dtoverlay=gpio-fan,gpiopin=26,temp=60000
Fixed in 6f8844c. Example logic used:
>>> foo = "#dtoverlay=gpio-fan,gpiopin=26,temp=60000" >>> sliced = foo.split('#')[0] >>> sliced ''
Actually fixed in c4da614.
Any tests that read from
/boot/config.txt
should be robust enough to verify if a particular line of interest is also a comment.For example in fan_test.py::test_gpio_fan_conf we currently assert "gpio-fan" is in
config.txt
, but do not check if the line is commented out.So, this should fail, but instead passes: