Blame TESTPLAN

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