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