diff options
author | Bastien Nocera <hadess@hadess.net> | 2017-09-08 17:54:48 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-09-08 17:59:42 +0200 |
commit | fb9f19c3b53c51a614ca8d2d2806f2cd9ff29e4d (patch) | |
tree | 98243bf85913323da85411fd3178948f0e34e7aa /src | |
parent | fa38e1c4040f5e48cd6b56aa838b4ac617e1e1a8 (diff) |
linux: Add test for crash when battery has funky name
https://bugs.freedesktop.org/show_bug.cgi?id=93095
Diffstat (limited to 'src')
-rwxr-xr-x | src/linux/integration-test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/linux/integration-test b/src/linux/integration-test index 76bf516..0d2064e 100755 --- a/src/linux/integration-test +++ b/src/linux/integration-test @@ -620,6 +620,22 @@ class Tests(dbusmock.DBusTestCase): self.assertEqual(self.get_dbus_display_property('WarningLevel'), UP_DEVICE_LEVEL_CRITICAL) self.stop_daemon() + def test_battery_broken_name(self): + '''Battery with funky kernel name''' + + self.testbed.add_device('power_supply', 'bq24735@5-0009', None, + ['type', 'Battery', + 'present', '1', + 'status', 'unknown', + 'energy_full', '60000000', + 'energy_full_design', '80000000', + 'energy_now', '48000000', + 'voltage_now', '12000000'], []) + + self.start_daemon() + self.assertEqual(self.get_dbus_display_property('IsPresent'), True) + self.stop_daemon() + def test_ups_no_ac(self): '''UPS properties without AC''' |