[systemd-devel] udev "battery level changed" events

Martin Pitt martin.pitt at ubuntu.com
Wed Oct 23 14:21:47 CEST 2013


Hey Bastien,

Bastien Nocera [2013-10-23 14:10 +0200]:
> Is there a way to reproduce those events on my system (using "udevadm
> trigger" I guess)?

With an actual installation, you can synthesize change events with
udevadm trigger, indeed. Or using some more fundamental tools, with
something like

  echo change | sudo tee /sys/class/power_supply/BAT*/uevent

upower's test suite uses umockdev which can send uevents for the
mocked devices with self.testbed.uevent(device_path, "change"), like
the test_bluetooth_mouse_reconnect() test case already does.

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


More information about the systemd-devel mailing list