Bump to version 2.0.22
[platform/upstream/acpid.git] / TESTPLAN
1 acpid Test Plan
2
3 Suggestions
4
5 - Run all these tests with valgrind to detect memory leaks.
6 - It's best to test without a window manager running (such as GNOME or KDE) as
7   they tend to handle acpi events on their own and override acpid.  To bring 
8   down X on a system that is configured with a graphical login, there's usually
9   an "init" script you can run.  As an example, with Debian/GNOME, log off of 
10   your X/GNOME session, switch to another tty (e.g. Alt-Ctrl-F1), login, and do
11   this:
12       sudo /etc/init.d/gdm stop
13   It's different if you are using upstart:
14       sudo initctl stop gdm
15   And systemd requires a different incantation:
16       [anyone care to enlighten me?]
17   LightDM in Ubuntu 11.10 (and others) doesn't seem to care about the power 
18   button.  So no need to stop it.  Just log out.
19   Now X is out of the way and you can test from the console.
20 - You can kill acpid with "sudo killall acpid".  Or if you are using upstart:
21       sudo initctl stop acpid
22   For systemd:
23       [anyone?]
24 - To make testing more convenient, you can run acpid from a shell as 
25   "acpid -ld" to get maximum logging.  Use Ctrl-C to stop acpid.
26
27 Normal Paths
28
29 * proc fs, all events
30 Start acpid against /proc/acpi/event (if it exists).
31 Test each of the following events:
32 1. Power Button
33 2. Laptop Lid Switch
34 3. Sleep Button
35 4. Laptop AC Adapter
36 5. Laptop Battery
37
38 * input layer/netlink, all events
39 Start acpid against the input layer and netlink.
40 Test each of the following events:
41 1. Power Button (tests ACPI -> input layer)
42 2. Laptop Lid Switch (tests ACPI -> input layer)
43 3. Sleep Button (tests ACPI -> input layer)
44 4. Laptop AC Adapter (tests ACPI -> netlink)
45 5. Laptop Battery (tests ACPI -> netlink)
46 6. Special Keyboard Key(s)
47
48 * input layer/netlink fallback
49 Start acpid with a bogus events file specified via the options.
50   acpid -e /proc/acpi/bogus
51 Make sure a connection is made via the input layer and netlink.
52
53 * lockfile procfs
54 Start acpid against the proc fs
55 Try some events and make sure they are coming through.
56 Create the lockfile.
57 Try some events and make sure they do not come through.
58 Remove the lockfile.
59 Try some events and make sure they are coming through.
60
61 * lockfile netlink
62 Start acpid against input layer and netlink.
63 Try some events and make sure they are coming through.
64 Create the lockfile.
65 Try some events and make sure they do not come through.
66 Remove the lockfile.
67 Try some events and make sure they are coming through.
68
69 * USB disconnect
70 Start acpid (input layer and netlink) with a second USB keyboard attached.
71 Try some events and make sure they are coming through.
72 Disconnect the second USB keyboard.
73 Make sure acpid is still running.
74 Try some events and make sure they are coming through.
75
76 * USB connect
77 Start acpid against input layer and netlink.
78 Try some events and make sure they are coming through.
79 Connect a second USB keyboard.
80 Check logging to see if acpid has found the new keyboard.
81 Try some events from the second USB keyboard and make sure they are coming 
82 through.
83
84
85 Debugging Paths
86
87 * event logging
88 Run acpid without the -l option and make sure no events are logged to syslog.
89 Run acpid with the -l option and make sure events are logged to syslog.
90
91 * debug mode
92 Run acpid with the -d option and note that it runs in the foreground and 
93 provides debugging info to the console.
94 acpid also supports up to 4 debug levels in the event handler.  Might want 
95 to try "-dddd" and see what happens.
96
97 * foreground mode
98 Run acpid with the -f option and note that it runs in the foreground.
99 Run acpid without the -f option and note that it runs in the background.
100