Dasharo Compatibility: Battery boot block
Test cases common documentation
Test setup
- Proceed with the Generic test setup: firmware.
- Proceed with the Generic test setup: OS installer.
- Proceed with the Generic test setup: OS installation.
- Proceed with the Generic test setup: OS boot from disk.
BBB001.001 Boot blocking (charger disconnected) (Ubuntu)
Test description
This test aims to verify that booting is blocked when the battery level is below 5% with charger disconnected from the DUT.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
Test steps
- Make sure the charger is not plugged into the DUT.
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
- Open a terminal window and install
stress-ng
package by executing following command:
sudo apt install stress-ng
- Open a terminal window and run following bash script:
get_battery_level() {
battery_level=$(cat /sys/class/power_supply/BAT0/capacity)
echo "$battery_level"
}
target_battery_level=3
while true; do
current_battery_level=$(get_battery_level)
echo "Current battery level: $current_battery_level%"
if [ "$current_battery_level" -le "$target_battery_level" ]; then
echo "Battery level reached 3%. Stopping stress-ng."
break
fi
stress-ng --cpu 0 --timeout 10s
done
- After the script finished working, reboot the DUT.
Expected result
- The bash script reads current battery charge level and stresses the CPU until the battery charge level reaches below 5%. Example output:
Current battery level: 92%
stress-ng: info: [25309] setting to a 10 secs run per stressor
stress-ng: info: [25309] dispatching hogs: 16 cpu
BBB001.002 Boot blocking (charger connected) (Ubuntu)
Test description
This test aims to verify that booting is not blocked when the battery level is below 5% with charger connected to the DUT.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
Test steps
- Make sure the charger is not plugged into the DUT.
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
- Open a terminal window and install
stress-ng
package by executing following command:
sudo apt install stress-ng
- Open a terminal window and run following bash script:
get_battery_level() {
battery_level=$(cat /sys/class/power_supply/BAT0/capacity)
echo "$battery_level"
}
target_battery_level=3
while true; do
current_battery_level=$(get_battery_level)
echo "Current battery level: $current_battery_level%"
if [ "$current_battery_level" -le "$target_battery_level" ]; then
echo "Battery level reached 3%. Stopping stress-ng."
break
fi
stress-ng --cpu 0 --timeout 10s
done
- After the script finished working, plug the charger into the DUT.
- Reboot the DUT.
Expected Result
- After reboot, the warning message should not appear and the DUT should boot normally.
BBB002.001 Battery not connected warning (Firmware)
Test description
This test aims to verify whether a warning message appears when the battery is disconnected from the DUT.
Test configuration data
FIRMWARE
= Dasharo
Test setup
- Proceed with the Test cases common documentation section.
Test steps
-
Unscrew the bottom cover from the DUT.
-
Disconnect the battery (1)
-
Reattach the bottom cover and flip the DUT over.
- Plug the charger into the DUT.
- Power on the DUT.
Expected result