|
Packit |
a94d48 |
acpid Test Plan
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
Suggestions
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
- Run all these tests with valgrind to detect memory leaks.
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
- It's best to test without a window manager running (such as GNOME or KDE) as
|
|
Packit |
a94d48 |
they tend to handle acpi events on their own and override acpid. To bring
|
|
Packit |
a94d48 |
down X on a system that is configured with a graphical login, there's usually
|
|
Packit |
a94d48 |
an "init" script you can run. As an example, with Debian/GNOME, log off of
|
|
Packit |
a94d48 |
your X/GNOME session, switch to another tty (e.g. Alt-Ctrl-F1), login, and do
|
|
Packit |
a94d48 |
this:
|
|
Packit |
a94d48 |
sudo /etc/init.d/gdm stop
|
|
Packit |
a94d48 |
It's different if you are using upstart:
|
|
Packit |
a94d48 |
sudo initctl stop gdm
|
|
Packit |
a94d48 |
And systemd requires a different incantation:
|
|
Packit |
a94d48 |
sudo systemctl stop gdm
|
|
Packit |
a94d48 |
LightDM in Ubuntu 11.10 (and others) doesn't seem to care about the power
|
|
Packit |
a94d48 |
button. So no need to stop it. Just log out.
|
|
Packit |
a94d48 |
Now X is out of the way and you can test from the console.
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
- You can kill acpid with "sudo killall acpid". Or if you are using upstart:
|
|
Packit |
a94d48 |
sudo initctl stop acpid
|
|
Packit |
a94d48 |
For systemd:
|
|
Packit |
a94d48 |
sudo systemctl stop acpid acpid.socket
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
- To make testing more convenient, you can run acpid from a shell as
|
|
Packit |
a94d48 |
"acpid -fld" to get maximum logging. Use Ctrl-C to stop acpid.
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
Normal Paths
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
* proc fs, all events
|
|
Packit |
a94d48 |
Start acpid against /proc/acpi/event (if it exists).
|
|
Packit |
a94d48 |
Test each of the following events:
|
|
Packit |
a94d48 |
1. Power Button
|
|
Packit |
a94d48 |
2. Laptop Lid Switch
|
|
Packit |
a94d48 |
3. Sleep Button
|
|
Packit |
a94d48 |
4. Laptop AC Adapter
|
|
Packit |
a94d48 |
5. Laptop Battery
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
* input layer/netlink, all events
|
|
Packit |
a94d48 |
Start acpid against the input layer and netlink.
|
|
Packit |
a94d48 |
Test each of the following events:
|
|
Packit |
a94d48 |
1. Power Button (tests ACPI -> input layer)
|
|
Packit |
a94d48 |
2. Laptop Lid Switch (tests ACPI -> input layer)
|
|
Packit |
a94d48 |
3. Sleep Button (tests ACPI -> input layer)
|
|
Packit |
a94d48 |
4. Laptop AC Adapter (tests ACPI -> netlink)
|
|
Packit |
a94d48 |
5. Laptop Battery (tests ACPI -> netlink)
|
|
Packit |
a94d48 |
6. Special Keyboard Key(s)
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
* input layer/netlink fallback
|
|
Packit |
a94d48 |
Start acpid with a bogus events file specified via the options.
|
|
Packit |
a94d48 |
acpid -e /proc/acpi/bogus
|
|
Packit |
a94d48 |
Make sure a connection is made via the input layer and netlink.
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
* lockfile procfs
|
|
Packit |
a94d48 |
Start acpid against the proc fs
|
|
Packit |
a94d48 |
Try some events and make sure they are coming through.
|
|
Packit |
a94d48 |
Create the lockfile.
|
|
Packit |
a94d48 |
Try some events and make sure they do not come through.
|
|
Packit |
a94d48 |
Remove the lockfile.
|
|
Packit |
a94d48 |
Try some events and make sure they are coming through.
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
* lockfile netlink
|
|
Packit |
a94d48 |
Start acpid against input layer and netlink.
|
|
Packit |
a94d48 |
Try some events and make sure they are coming through.
|
|
Packit |
a94d48 |
Create the lockfile.
|
|
Packit |
a94d48 |
Try some events and make sure they do not come through.
|
|
Packit |
a94d48 |
Remove the lockfile.
|
|
Packit |
a94d48 |
Try some events and make sure they are coming through.
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
* USB disconnect
|
|
Packit |
a94d48 |
Start acpid (input layer and netlink) with a second USB keyboard attached.
|
|
Packit |
a94d48 |
Try some events and make sure they are coming through.
|
|
Packit |
a94d48 |
Disconnect the second USB keyboard.
|
|
Packit |
a94d48 |
Make sure acpid is still running.
|
|
Packit |
a94d48 |
Try some events and make sure they are coming through.
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
* USB connect
|
|
Packit |
a94d48 |
Start acpid against input layer and netlink.
|
|
Packit |
a94d48 |
Try some events and make sure they are coming through.
|
|
Packit |
a94d48 |
Connect a second USB keyboard.
|
|
Packit |
a94d48 |
Check logging to see if acpid has found the new keyboard.
|
|
Packit |
a94d48 |
Try some events from the second USB keyboard and make sure they are coming
|
|
Packit |
a94d48 |
through.
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
Debugging Paths
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
* event logging
|
|
Packit |
a94d48 |
Run acpid without the -l option and make sure no events are logged to syslog.
|
|
Packit |
a94d48 |
Run acpid with the -l option and make sure events are logged to syslog.
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
* debug mode
|
|
Packit |
a94d48 |
Run acpid with the -fd option and note that it runs in the foreground and
|
|
Packit |
a94d48 |
provides debugging info to the console.
|
|
Packit |
a94d48 |
acpid also supports up to 4 debug levels in the event handler. Might want
|
|
Packit |
a94d48 |
to try "-fdddd" and see what happens.
|
|
Packit |
a94d48 |
|
|
Packit |
a94d48 |
* foreground mode
|
|
Packit |
a94d48 |
Run acpid with the -f option and note that it runs in the foreground.
|
|
Packit |
a94d48 |
Run acpid without the -f option and note that it runs in the background.
|
|
Packit |
a94d48 |
|