Status: | Merged |
---|---|
Merged at revision: | 178 |
Proposed branch: | lp:~bregma/geis/lp-891731 |
Merge into: | lp:geis |
Diff against target: |
602 lines (+511/-12) 5 files modified
libutouch-geis/backend/xcb/geis_xcb_backend_token.c (+28/-12) testsuite/geis2/lp891731.py (+209/-0) testsuite/geis2/test_device1.events (+210/-0) testsuite/geis2/test_device1.prop (+32/-0) testsuite/geis2/test_device2.prop (+32/-0) |
To merge this branch: | bzr merge lp:~bregma/geis/lp-891731 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chase Douglas (community) | Approve | ||
Jussi Pakkanen (community) | Approve | ||
Review via email: mp+84542@code.launchpad.net |
This proposal supersedes a proposal from 2011-11-25.
Commit message
Description of the change
Properly handles the case of no matching devices in a filter (LP: #891731).
Includes a semi-automatic test case testsuite/
This merge request provides the same fix code but an entirely new test driver program. there is no need for touch hardware on the test system but a working X server is required.
Chase Douglas (chasedouglas) wrote : Posted in a previous version of this proposal | # |
Stephen M. Webb (bregma) wrote : Posted in a previous version of this proposal | # |
Added test case documentation (in the source code for the test case).
Chase Douglas (chasedouglas) wrote : Posted in a previous version of this proposal | # |
The comment is good. I didn't really understand what the test was doing until now.
I think the test case would be easier to run if it did the following:
1. If a direct touch device is found, print a message like "SKIP (Reason: Touchscreen device must not be present)", then exit.
2. If an indirect touch device also is not found, print a message like "SKIP (Reason: Indirect touch device must be present)", then exit.
3. Prompt the user with something like: "Place two touches on an attached multitouch device. An error will be printed if the test fails. If no message is printed, the test passed."
For extra kudos, you could detect the devices, and if one class is present and the other is missing you could then do the subscription for the missing class. This would allow testing on a tablet, for example.
Jussi Pakkanen (jpakkane) wrote : | # |
Looks good. The only change I would consider is naming match_count into something like matched_devices or matched_
Chase Douglas (chasedouglas) wrote : | # |
This comment gave me a hard time:
# need to guarabtee there is a device we can feed events to
I figured it out after a few seconds :). Otherwise it looks good!
Preview Diff
1 | === modified file 'libutouch-geis/backend/xcb/geis_xcb_backend_token.c' | |||
2 | --- libutouch-geis/backend/xcb/geis_xcb_backend_token.c 2011-10-17 16:52:22 +0000 | |||
3 | +++ libutouch-geis/backend/xcb/geis_xcb_backend_token.c 2011-12-06 01:12:23 +0000 | |||
4 | @@ -38,6 +38,9 @@ | |||
5 | 38 | /* The maximum nuimber of regions supported. */ | 38 | /* The maximum nuimber of regions supported. */ |
6 | 39 | #define MAX_NUM_WINDOWS 10 | 39 | #define MAX_NUM_WINDOWS 10 |
7 | 40 | 40 | ||
8 | 41 | /* A special device_id to indicate "no devices" */ | ||
9 | 42 | #define GEIS_XCB_NO_DEVICES ((uint16_t)(-1)) | ||
10 | 43 | |||
11 | 41 | 44 | ||
12 | 42 | struct XcbBackendToken | 45 | struct XcbBackendToken |
13 | 43 | { | 46 | { |
14 | @@ -291,19 +294,19 @@ | |||
15 | 291 | _token_select_xcb_events(XcbBackendToken token) | 294 | _token_select_xcb_events(XcbBackendToken token) |
16 | 292 | { | 295 | { |
17 | 293 | GeisStatus status = GEIS_STATUS_UNKNOWN_ERROR; | 296 | GeisStatus status = GEIS_STATUS_UNKNOWN_ERROR; |
22 | 294 | int dev; | 297 | for (int dev = 0; dev < token->device_count; ++dev) |
19 | 295 | int win; | ||
20 | 296 | |||
21 | 297 | for (dev = 0; dev < token->device_count; ++dev) | ||
23 | 298 | { | 298 | { |
25 | 299 | for (win = 0; win < token->window_count; ++win) | 299 | if (token->devices[dev] != GEIS_XCB_NO_DEVICES) |
26 | 300 | { | 300 | { |
33 | 301 | geis_debug("window_id=0x%08x device_id=%d", | 301 | for (int win = 0; win < token->window_count; ++win) |
34 | 302 | token->windows[win], token->devices[dev]); | 302 | { |
35 | 303 | geis_xcb_backend_select_events(token->be, | 303 | geis_debug("window_id=0x%08x device_id=%d", |
36 | 304 | token->devices[dev], | 304 | token->windows[win], token->devices[dev]); |
37 | 305 | token->windows[win]); | 305 | geis_xcb_backend_select_events(token->be, |
38 | 306 | status = GEIS_STATUS_SUCCESS; | 306 | token->devices[dev], |
39 | 307 | token->windows[win]); | ||
40 | 308 | status = GEIS_STATUS_SUCCESS; | ||
41 | 309 | } | ||
42 | 307 | } | 310 | } |
43 | 308 | } | 311 | } |
44 | 309 | return status; | 312 | return status; |
45 | @@ -410,6 +413,7 @@ | |||
46 | 410 | GeisStatus status = GEIS_STATUS_UNKNOWN_ERROR; | 413 | GeisStatus status = GEIS_STATUS_UNKNOWN_ERROR; |
47 | 411 | XcbBackendToken t = _xcb_token_from_geis_token(token); | 414 | XcbBackendToken t = _xcb_token_from_geis_token(token); |
48 | 412 | Geis geis = geis_xcb_backend_geis(t->be); | 415 | Geis geis = geis_xcb_backend_geis(t->be); |
49 | 416 | GeisSize match_count = 0; | ||
50 | 413 | 417 | ||
51 | 414 | if (0 == strcmp(name, GEIS_DEVICE_ATTRIBUTE_NAME) | 418 | if (0 == strcmp(name, GEIS_DEVICE_ATTRIBUTE_NAME) |
52 | 415 | && op == GEIS_FILTER_OP_EQ) | 419 | && op == GEIS_FILTER_OP_EQ) |
53 | @@ -425,6 +429,7 @@ | |||
54 | 425 | if (0 == strcmp(geis_device_name(device), device_name)) | 429 | if (0 == strcmp(geis_device_name(device), device_name)) |
55 | 426 | { | 430 | { |
56 | 427 | status = _token_add_device_id(t, geis_device_id(device)); | 431 | status = _token_add_device_id(t, geis_device_id(device)); |
57 | 432 | ++match_count; | ||
58 | 428 | } | 433 | } |
59 | 429 | } | 434 | } |
60 | 430 | } | 435 | } |
61 | @@ -434,6 +439,7 @@ | |||
62 | 434 | GeisInteger device_id = *(GeisInteger*)value; | 439 | GeisInteger device_id = *(GeisInteger*)value; |
63 | 435 | geis_debug("attr name=\"%s\" value=%d", name, device_id); | 440 | geis_debug("attr name=\"%s\" value=%d", name, device_id); |
64 | 436 | status = _token_add_device_id(t, device_id); | 441 | status = _token_add_device_id(t, device_id); |
65 | 442 | ++match_count; | ||
66 | 437 | } | 443 | } |
67 | 438 | else if (0 == strcmp(name, GEIS_DEVICE_ATTRIBUTE_DIRECT_TOUCH) | 444 | else if (0 == strcmp(name, GEIS_DEVICE_ATTRIBUTE_DIRECT_TOUCH) |
68 | 439 | && op == GEIS_FILTER_OP_EQ) | 445 | && op == GEIS_FILTER_OP_EQ) |
69 | @@ -456,6 +462,7 @@ | |||
70 | 456 | if (geis_attr_value_to_boolean(attr) == is_direct) | 462 | if (geis_attr_value_to_boolean(attr) == is_direct) |
71 | 457 | { | 463 | { |
72 | 458 | status = _token_add_device_id(t, geis_device_id(device)); | 464 | status = _token_add_device_id(t, geis_device_id(device)); |
73 | 465 | ++match_count; | ||
74 | 459 | } | 466 | } |
75 | 460 | break; | 467 | break; |
76 | 461 | } | 468 | } |
77 | @@ -483,12 +490,21 @@ | |||
78 | 483 | if (geis_attr_value_to_boolean(attr) == is_independent) | 490 | if (geis_attr_value_to_boolean(attr) == is_independent) |
79 | 484 | { | 491 | { |
80 | 485 | status = _token_add_device_id(t, geis_device_id(device)); | 492 | status = _token_add_device_id(t, geis_device_id(device)); |
81 | 493 | ++match_count; | ||
82 | 486 | } | 494 | } |
83 | 487 | break; | 495 | break; |
84 | 488 | } | 496 | } |
85 | 489 | } | 497 | } |
86 | 490 | } | 498 | } |
88 | 491 | } | 499 | |
89 | 500 | } | ||
90 | 501 | |||
91 | 502 | /* special case of no matching devices */ | ||
92 | 503 | if (match_count == 0) | ||
93 | 504 | { | ||
94 | 505 | status = _token_add_device_id(t, GEIS_XCB_NO_DEVICES); | ||
95 | 506 | } | ||
96 | 507 | |||
97 | 492 | return status; | 508 | return status; |
98 | 493 | } | 509 | } |
99 | 494 | 510 | ||
100 | 495 | 511 | ||
101 | === added file 'testsuite/geis2/lp891731.py' | |||
102 | --- testsuite/geis2/lp891731.py 1970-01-01 00:00:00 +0000 | |||
103 | +++ testsuite/geis2/lp891731.py 2011-12-06 01:12:23 +0000 | |||
104 | @@ -0,0 +1,209 @@ | |||
105 | 1 | #!/usr/bin/python | ||
106 | 2 | # | ||
107 | 3 | # When a device filter term is added to a subscription and there is no device | ||
108 | 4 | # present to match the filter, the term causes ALL devices to be selected | ||
109 | 5 | # instead of NONE. This is the reverse to how filters should work. | ||
110 | 6 | # | ||
111 | 7 | # The error occurred when filtering on any of GEIS_DEVICE_ATTRIBUTE_NAME, | ||
112 | 8 | # GEIS_DEVICE_ATTRIBUTE_DIRECT_TOUCH, or GEIS_DEVICE_ATTRIBUTE_INDEPENDENT_TOUCH | ||
113 | 9 | # attributes. | ||
114 | 10 | # | ||
115 | 11 | # Here's how the test works. There are two devices: device1 is the device on | ||
116 | 12 | # which all input is actaully occurring. We have subscribed to device2 by name | ||
117 | 13 | # but not device1, so we shouldn;t be seeing any gesture events coming in. If | ||
118 | 14 | # we do, the bug has obtained and we fail. If we don't and the timer goes off, | ||
119 | 15 | # assume success. | ||
120 | 16 | # | ||
121 | 17 | # Just to assure everything is working, there's an option to subscribe to | ||
122 | 18 | # device1 as well, in which case we should see events only on device1. | ||
123 | 19 | # | ||
124 | 20 | # Because this test tool talks to kernel input devices (through evdev), it must | ||
125 | 21 | # be run as root. | ||
126 | 22 | # | ||
127 | 23 | |||
128 | 24 | # | ||
129 | 25 | # Copyright 2011 Canonical Ltd. | ||
130 | 26 | # | ||
131 | 27 | # This program is free software: you can redistribute it and/or modify it | ||
132 | 28 | # under the terms of the GNU General Public License version 3, as published | ||
133 | 29 | # by the Free Software Foundation. | ||
134 | 30 | # | ||
135 | 31 | # This program is distributed in the hope that it will be useful, but | ||
136 | 32 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
137 | 33 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
138 | 34 | # PURPOSE. See the GNU General Public License for more details. | ||
139 | 35 | # | ||
140 | 36 | # You should have received a copy of the GNU General Public License along | ||
141 | 37 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
142 | 38 | # | ||
143 | 39 | |||
144 | 40 | import argparse | ||
145 | 41 | import evemu | ||
146 | 42 | import geis | ||
147 | 43 | import glib | ||
148 | 44 | import os | ||
149 | 45 | import sys | ||
150 | 46 | |||
151 | 47 | |||
152 | 48 | class Tester(object): | ||
153 | 49 | |||
154 | 50 | def __init__(self, args): | ||
155 | 51 | super(Tester, self).__init__() | ||
156 | 52 | self._args = args | ||
157 | 53 | self._has_filter = False | ||
158 | 54 | self._device_1_id = 0 | ||
159 | 55 | |||
160 | 56 | # need to guarabtee there is a device we can feed events to | ||
161 | 57 | self._device1 = evemu.Device(self._find_data_file("test_device1.prop")) | ||
162 | 58 | device2 = evemu.Device(self._find_data_file("test_device2.prop")) | ||
163 | 59 | self._device_2_name = device2.name | ||
164 | 60 | |||
165 | 61 | # need a geis instance | ||
166 | 62 | self._geis = geis.Geis(geis.GEIS_INIT_TRACK_DEVICES) | ||
167 | 63 | self._sub = geis.Subscription(self._geis) | ||
168 | 64 | |||
169 | 65 | |||
170 | 66 | def _find_data_file(self, filename): | ||
171 | 67 | f = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), filename) | ||
172 | 68 | return open(f) | ||
173 | 69 | |||
174 | 70 | def get_fd(self): | ||
175 | 71 | return self._geis.get_configuration(geis.GEIS_CONFIGURATION_FD) | ||
176 | 72 | |||
177 | 73 | |||
178 | 74 | def create_subscriptions(self): | ||
179 | 75 | """ | ||
180 | 76 | Creates a filter to allow only gesture events from device2. | ||
181 | 77 | """ | ||
182 | 78 | print "create_subscriptions" | ||
183 | 79 | filt = geis.Filter(self._geis, "lp-891731") | ||
184 | 80 | filt.add_term(geis.GEIS_FILTER_DEVICE, | ||
185 | 81 | (geis.GEIS_DEVICE_ATTRIBUTE_NAME, | ||
186 | 82 | geis.GEIS_FILTER_OP_EQ, | ||
187 | 83 | self._device_2_name)) | ||
188 | 84 | self._sub.add_filter(filt) | ||
189 | 85 | self._has_filter = True | ||
190 | 86 | print ".. self._args.force=%s" % self._args.force | ||
191 | 87 | if self._args.force: | ||
192 | 88 | filt = geis.Filter(self._geis, "force") | ||
193 | 89 | filt.add_term(geis.GEIS_FILTER_DEVICE, | ||
194 | 90 | (geis.GEIS_DEVICE_ATTRIBUTE_NAME, | ||
195 | 91 | geis.GEIS_FILTER_OP_EQ, | ||
196 | 92 | self._device1.name)) | ||
197 | 93 | self._sub.add_filter(filt) | ||
198 | 94 | |||
199 | 95 | |||
200 | 96 | def do_init_complete(self, event): | ||
201 | 97 | """ | ||
202 | 98 | Creates a subscription ONLY on the second device and generates input | ||
203 | 99 | ONLY from the first device. | ||
204 | 100 | """ | ||
205 | 101 | print "do_init_complete" | ||
206 | 102 | self.create_subscriptions() | ||
207 | 103 | self._sub.activate() | ||
208 | 104 | self._device1.play(self._find_data_file("test_device1.events")) | ||
209 | 105 | |||
210 | 106 | |||
211 | 107 | def do_device_available(self, event): | ||
212 | 108 | """ | ||
213 | 109 | Verifies and remembers the two devices as their reported. | ||
214 | 110 | """ | ||
215 | 111 | device = event.attrs()[geis.GEIS_EVENT_ATTRIBUTE_DEVICE] | ||
216 | 112 | print "do_device_available: %s" % device.name() | ||
217 | 113 | if device.name() == self._device1.name: | ||
218 | 114 | self._device_1_id = device.id() | ||
219 | 115 | print ".. device id = %s" % self._device_1_id | ||
220 | 116 | |||
221 | 117 | def do_gesture_event(self, event): | ||
222 | 118 | print "do_gesture_event" | ||
223 | 119 | if not (self._device_1_id > 0 and self._has_filter): | ||
224 | 120 | print "devices and filter not set up before other events received." | ||
225 | 121 | sys.exit(1) | ||
226 | 122 | if self._args.dry_run: | ||
227 | 123 | return | ||
228 | 124 | groupset = event.attrs()[geis.GEIS_EVENT_ATTRIBUTE_GROUPSET] | ||
229 | 125 | if self._args.force: | ||
230 | 126 | for group in groupset: | ||
231 | 127 | for frame in group: | ||
232 | 128 | for (k, v) in frame.attrs().iteritems(): | ||
233 | 129 | if (k == geis.GEIS_GESTURE_ATTRIBUTE_DEVICE_ID | ||
234 | 130 | and v != self._device_1_id): | ||
235 | 131 | print "test fail: incorrect device ID, expected %d got %d" % (self._device_1_id, v) | ||
236 | 132 | sys.exit(1) | ||
237 | 133 | print "test successful (forced)" | ||
238 | 134 | sys.exit(0) | ||
239 | 135 | print "test failed: unsubscribed events received" | ||
240 | 136 | sys.exit(1) | ||
241 | 137 | |||
242 | 138 | |||
243 | 139 | def do_other_event(self, event): | ||
244 | 140 | print "do_other_event" | ||
245 | 141 | |||
246 | 142 | |||
247 | 143 | def dispatch_events(self): | ||
248 | 144 | """ Performs GEIS event loop processing. """ | ||
249 | 145 | print "Tester.dispatch_events" | ||
250 | 146 | geis_event_action = { | ||
251 | 147 | geis.GEIS_EVENT_INIT_COMPLETE: self.do_init_complete.im_func, | ||
252 | 148 | geis.GEIS_EVENT_GESTURE_BEGIN: self.do_gesture_event.im_func, | ||
253 | 149 | geis.GEIS_EVENT_GESTURE_UPDATE: self.do_gesture_event.im_func, | ||
254 | 150 | geis.GEIS_EVENT_GESTURE_END: self.do_gesture_event.im_func, | ||
255 | 151 | geis.GEIS_EVENT_DEVICE_AVAILABLE: self.do_device_available.im_func, | ||
256 | 152 | } | ||
257 | 153 | |||
258 | 154 | status = self._geis.dispatch_events() | ||
259 | 155 | while status == geis.GEIS_STATUS_CONTINUE: | ||
260 | 156 | status = self._geis.dispatch_events() | ||
261 | 157 | |||
262 | 158 | try: | ||
263 | 159 | while True: | ||
264 | 160 | event = self._geis.next_event() | ||
265 | 161 | geis_event_action.get(event.type(), | ||
266 | 162 | self.do_other_event.im_func)(self, event) | ||
267 | 163 | except geis.NoMoreEvents: | ||
268 | 164 | pass | ||
269 | 165 | return True | ||
270 | 166 | |||
271 | 167 | |||
272 | 168 | def dispatch_test_events(fd, condition, g): | ||
273 | 169 | print "dispatch_test_events" | ||
274 | 170 | return g.dispatch_events() | ||
275 | 171 | |||
276 | 172 | |||
277 | 173 | def test_timeout(): | ||
278 | 174 | print "timed out, assuming success" | ||
279 | 175 | exit(0) | ||
280 | 176 | |||
281 | 177 | |||
282 | 178 | class Options(argparse.ArgumentParser): | ||
283 | 179 | |||
284 | 180 | def __init__(self): | ||
285 | 181 | super(Options, self).__init__(description='test case for LP:891731') | ||
286 | 182 | self.add_argument('-d', '--dry-run', action='store_true', dest='dry_run', | ||
287 | 183 | help='force the test to bypass by subscribing to no input source') | ||
288 | 184 | self.add_argument('-f', '--force', action='store_true', dest='force', | ||
289 | 185 | help='force the test to pass by subscribing to the input source') | ||
290 | 186 | self.add_argument('-t', '--timeout', action='store', default='5000', | ||
291 | 187 | dest='timeout', type=int, | ||
292 | 188 | help='milliseconds to wait before ending test') | ||
293 | 189 | |||
294 | 190 | if __name__ == '__main__': | ||
295 | 191 | try: | ||
296 | 192 | options = Options() | ||
297 | 193 | args = options.parse_args() | ||
298 | 194 | |||
299 | 195 | tester = Tester(args) | ||
300 | 196 | ml = glib.MainLoop() | ||
301 | 197 | glib.timeout_add(args.timeout, test_timeout) | ||
302 | 198 | glib.io_add_watch(tester.get_fd(), | ||
303 | 199 | glib.IO_IN, | ||
304 | 200 | dispatch_test_events, | ||
305 | 201 | tester) | ||
306 | 202 | ml.run() | ||
307 | 203 | |||
308 | 204 | except KeyboardInterrupt: | ||
309 | 205 | pass | ||
310 | 206 | |||
311 | 207 | except argparse.ArgumentError as ex: | ||
312 | 208 | print ex | ||
313 | 209 | sys,exit(1) | ||
314 | 0 | 210 | ||
315 | === added file 'testsuite/geis2/test_device1.events' | |||
316 | --- testsuite/geis2/test_device1.events 1970-01-01 00:00:00 +0000 | |||
317 | +++ testsuite/geis2/test_device1.events 2011-12-06 01:12:23 +0000 | |||
318 | @@ -0,0 +1,210 @@ | |||
319 | 1 | E: 1323109478.604936 0003 0039 52 | ||
320 | 2 | E: 1323109478.604938 0003 0035 3367 | ||
321 | 3 | E: 1323109478.604939 0003 0036 2268 | ||
322 | 4 | E: 1323109478.604942 0003 0000 3367 | ||
323 | 5 | E: 1323109478.604943 0003 0001 2268 | ||
324 | 6 | E: 1323109478.604944 0003 0018 9 | ||
325 | 7 | E: 1323109478.604944 0003 001c 13 | ||
326 | 8 | E: 1323109478.604945 0001 0145 1 | ||
327 | 9 | E: 1323109478.604947 0000 0000 0 | ||
328 | 10 | E: 1323109478.629818 0003 0035 3363 | ||
329 | 11 | E: 1323109478.629822 0003 0000 3363 | ||
330 | 12 | E: 1323109478.629825 0003 001c 12 | ||
331 | 13 | E: 1323109478.629827 0000 0000 0 | ||
332 | 14 | E: 1323109478.641338 0003 0035 3373 | ||
333 | 15 | E: 1323109478.641340 0003 0036 2187 | ||
334 | 16 | E: 1323109478.641343 0003 0000 3373 | ||
335 | 17 | E: 1323109478.641343 0003 0001 2187 | ||
336 | 18 | E: 1323109478.641344 0003 0018 10 | ||
337 | 19 | E: 1323109478.641345 0003 001c 14 | ||
338 | 20 | E: 1323109478.641347 0000 0000 0 | ||
339 | 21 | E: 1323109478.653409 0003 0018 11 | ||
340 | 22 | E: 1323109478.653411 0003 001c 12 | ||
341 | 23 | E: 1323109478.653413 0000 0000 0 | ||
342 | 24 | E: 1323109478.665509 0003 0035 3389 | ||
343 | 25 | E: 1323109478.665510 0003 0036 2151 | ||
344 | 26 | E: 1323109478.665513 0003 0000 3389 | ||
345 | 27 | E: 1323109478.665514 0003 0001 2151 | ||
346 | 28 | E: 1323109478.665514 0003 0018 12 | ||
347 | 29 | E: 1323109478.665517 0000 0000 0 | ||
348 | 30 | E: 1323109478.676566 0003 0035 3406 | ||
349 | 31 | E: 1323109478.676568 0003 0036 2106 | ||
350 | 32 | E: 1323109478.676571 0003 0000 3406 | ||
351 | 33 | E: 1323109478.676572 0003 0001 2106 | ||
352 | 34 | E: 1323109478.676573 0003 0018 15 | ||
353 | 35 | E: 1323109478.676573 0003 001c 11 | ||
354 | 36 | E: 1323109478.676575 0000 0000 0 | ||
355 | 37 | E: 1323109478.688397 0003 0035 3413 | ||
356 | 38 | E: 1323109478.688398 0003 0036 2055 | ||
357 | 39 | E: 1323109478.688399 0003 0000 3413 | ||
358 | 40 | E: 1323109478.688400 0003 0001 2055 | ||
359 | 41 | E: 1323109478.688400 0003 0018 19 | ||
360 | 42 | E: 1323109478.688401 0003 001c 10 | ||
361 | 43 | E: 1323109478.688402 0000 0000 0 | ||
362 | 44 | E: 1323109478.701637 0003 0035 3432 | ||
363 | 45 | E: 1323109478.701639 0003 0036 2013 | ||
364 | 46 | E: 1323109478.701641 0003 0000 3432 | ||
365 | 47 | E: 1323109478.701642 0003 0001 2013 | ||
366 | 48 | E: 1323109478.701643 0003 0018 27 | ||
367 | 49 | E: 1323109478.701644 0003 001c 8 | ||
368 | 50 | E: 1323109478.701646 0000 0000 0 | ||
369 | 51 | E: 1323109478.724960 0003 0035 2458 | ||
370 | 52 | E: 1323109478.724961 0003 0036 3190 | ||
371 | 53 | E: 1323109478.724962 0003 002f 1 | ||
372 | 54 | E: 1323109478.724962 0003 0039 53 | ||
373 | 55 | E: 1323109478.724962 0003 0035 3424 | ||
374 | 56 | E: 1323109478.724962 0003 0036 1977 | ||
375 | 57 | E: 1323109478.724963 0001 014a 1 | ||
376 | 58 | E: 1323109478.724963 0003 0000 3424 | ||
377 | 59 | E: 1323109478.724964 0003 0001 1977 | ||
378 | 60 | E: 1323109478.724964 0003 0018 42 | ||
379 | 61 | E: 1323109478.724965 0003 001c 5 | ||
380 | 62 | E: 1323109478.724965 0001 0145 0 | ||
381 | 63 | E: 1323109478.724966 0001 014d 1 | ||
382 | 64 | E: 1323109478.724966 0000 0000 0 | ||
383 | 65 | E: 1323109478.748390 0003 002f 0 | ||
384 | 66 | E: 1323109478.748391 0003 0035 2380 | ||
385 | 67 | E: 1323109478.748391 0003 0036 3220 | ||
386 | 68 | E: 1323109478.748394 0003 002f 1 | ||
387 | 69 | E: 1323109478.748394 0003 0035 3416 | ||
388 | 70 | E: 1323109478.748394 0003 0036 1961 | ||
389 | 71 | E: 1323109478.748396 0003 0000 3416 | ||
390 | 72 | E: 1323109478.748396 0003 0001 1961 | ||
391 | 73 | E: 1323109478.748397 0003 0018 49 | ||
392 | 74 | E: 1323109478.748400 0000 0000 0 | ||
393 | 75 | E: 1323109478.772694 0003 002f 0 | ||
394 | 76 | E: 1323109478.772695 0003 0035 2372 | ||
395 | 77 | E: 1323109478.772695 0003 0036 3212 | ||
396 | 78 | E: 1323109478.772696 0003 002f 1 | ||
397 | 79 | E: 1323109478.772696 0003 0035 3412 | ||
398 | 80 | E: 1323109478.772697 0003 0036 1953 | ||
399 | 81 | E: 1323109478.772698 0003 0000 3412 | ||
400 | 82 | E: 1323109478.772699 0003 0001 1953 | ||
401 | 83 | E: 1323109478.772699 0003 0018 51 | ||
402 | 84 | E: 1323109478.772701 0000 0000 0 | ||
403 | 85 | E: 1323109478.797052 0003 002f 0 | ||
404 | 86 | E: 1323109478.797053 0003 0035 2402 | ||
405 | 87 | E: 1323109478.797054 0003 0036 3216 | ||
406 | 88 | E: 1323109478.797058 0003 002f 1 | ||
407 | 89 | E: 1323109478.797059 0003 0035 3415 | ||
408 | 90 | E: 1323109478.797060 0003 0036 1956 | ||
409 | 91 | E: 1323109478.797066 0003 0000 3415 | ||
410 | 92 | E: 1323109478.797066 0003 0001 1956 | ||
411 | 93 | E: 1323109478.797067 0003 0018 53 | ||
412 | 94 | E: 1323109478.797069 0000 0000 0 | ||
413 | 95 | E: 1323109478.821436 0003 002f 0 | ||
414 | 96 | E: 1323109478.821437 0003 0035 2472 | ||
415 | 97 | E: 1323109478.821438 0003 0036 3192 | ||
416 | 98 | E: 1323109478.821443 0003 002f 1 | ||
417 | 99 | E: 1323109478.821443 0003 0035 3506 | ||
418 | 100 | E: 1323109478.821444 0003 0036 1986 | ||
419 | 101 | E: 1323109478.821450 0003 0000 3506 | ||
420 | 102 | E: 1323109478.821451 0003 0001 1986 | ||
421 | 103 | E: 1323109478.821451 0003 0018 54 | ||
422 | 104 | E: 1323109478.821454 0000 0000 0 | ||
423 | 105 | E: 1323109478.845271 0003 002f 0 | ||
424 | 106 | E: 1323109478.845272 0003 0035 2592 | ||
425 | 107 | E: 1323109478.845272 0003 0036 3196 | ||
426 | 108 | E: 1323109478.845273 0003 002f 1 | ||
427 | 109 | E: 1323109478.845273 0003 0035 3675 | ||
428 | 110 | E: 1323109478.845274 0003 0036 2012 | ||
429 | 111 | E: 1323109478.845275 0003 0000 3675 | ||
430 | 112 | E: 1323109478.845275 0003 0001 2012 | ||
431 | 113 | E: 1323109478.845275 0003 0018 55 | ||
432 | 114 | E: 1323109478.845277 0000 0000 0 | ||
433 | 115 | E: 1323109478.870003 0003 002f 0 | ||
434 | 116 | E: 1323109478.870004 0003 0035 2816 | ||
435 | 117 | E: 1323109478.870005 0003 0036 3178 | ||
436 | 118 | E: 1323109478.870008 0003 002f 1 | ||
437 | 119 | E: 1323109478.870008 0003 0035 3866 | ||
438 | 120 | E: 1323109478.870009 0003 0036 2030 | ||
439 | 121 | E: 1323109478.870010 0003 0000 3866 | ||
440 | 122 | E: 1323109478.870011 0003 0001 2030 | ||
441 | 123 | E: 1323109478.870012 0003 0018 56 | ||
442 | 124 | E: 1323109478.870015 0000 0000 0 | ||
443 | 125 | E: 1323109478.893759 0003 002f 0 | ||
444 | 126 | E: 1323109478.893760 0003 0035 2994 | ||
445 | 127 | E: 1323109478.893760 0003 0036 3166 | ||
446 | 128 | E: 1323109478.893763 0003 002f 1 | ||
447 | 129 | E: 1323109478.893763 0003 0035 4069 | ||
448 | 130 | E: 1323109478.893764 0003 0036 2019 | ||
449 | 131 | E: 1323109478.893766 0003 0000 4069 | ||
450 | 132 | E: 1323109478.893767 0003 0001 2019 | ||
451 | 133 | E: 1323109478.893771 0000 0000 0 | ||
452 | 134 | E: 1323109478.918183 0003 002f 0 | ||
453 | 135 | E: 1323109478.918183 0003 0035 3162 | ||
454 | 136 | E: 1323109478.918184 0003 0036 3132 | ||
455 | 137 | E: 1323109478.918187 0003 002f 1 | ||
456 | 138 | E: 1323109478.918187 0003 0035 4214 | ||
457 | 139 | E: 1323109478.918188 0003 0036 2006 | ||
458 | 140 | E: 1323109478.918190 0003 0000 4214 | ||
459 | 141 | E: 1323109478.918190 0003 0001 2006 | ||
460 | 142 | E: 1323109478.918194 0000 0000 0 | ||
461 | 143 | E: 1323109478.941450 0003 002f 0 | ||
462 | 144 | E: 1323109478.941451 0003 0035 3250 | ||
463 | 145 | E: 1323109478.941452 0003 0036 3124 | ||
464 | 146 | E: 1323109478.941456 0003 002f 1 | ||
465 | 147 | E: 1323109478.941456 0003 0035 4282 | ||
466 | 148 | E: 1323109478.941457 0003 0036 1974 | ||
467 | 149 | E: 1323109478.941460 0003 0000 4282 | ||
468 | 150 | E: 1323109478.941461 0003 0001 1974 | ||
469 | 151 | E: 1323109478.941467 0000 0000 0 | ||
470 | 152 | E: 1323109478.966043 0003 002f 0 | ||
471 | 153 | E: 1323109478.966044 0003 0035 3274 | ||
472 | 154 | E: 1323109478.966045 0003 0036 3132 | ||
473 | 155 | E: 1323109478.966048 0003 002f 1 | ||
474 | 156 | E: 1323109478.966048 0003 0035 4296 | ||
475 | 157 | E: 1323109478.966049 0003 0036 1973 | ||
476 | 158 | E: 1323109478.966050 0003 0000 4296 | ||
477 | 159 | E: 1323109478.966051 0003 0001 1973 | ||
478 | 160 | E: 1323109478.966055 0000 0000 0 | ||
479 | 161 | E: 1323109478.990133 0003 002f 0 | ||
480 | 162 | E: 1323109478.990134 0003 0035 3282 | ||
481 | 163 | E: 1323109478.990135 0003 0036 3180 | ||
482 | 164 | E: 1323109478.990138 0003 002f 1 | ||
483 | 165 | E: 1323109478.990138 0003 0035 4299 | ||
484 | 166 | E: 1323109478.990138 0003 0036 1992 | ||
485 | 167 | E: 1323109478.990140 0003 0000 4299 | ||
486 | 168 | E: 1323109478.990141 0003 0001 1992 | ||
487 | 169 | E: 1323109478.990145 0000 0000 0 | ||
488 | 170 | E: 1323109479.014380 0003 002f 0 | ||
489 | 171 | E: 1323109479.014381 0003 0035 3270 | ||
490 | 172 | E: 1323109479.014382 0003 0036 3264 | ||
491 | 173 | E: 1323109479.014385 0003 002f 1 | ||
492 | 174 | E: 1323109479.014385 0003 0035 4142 | ||
493 | 175 | E: 1323109479.014386 0003 0036 3230 | ||
494 | 176 | E: 1323109479.014388 0001 014a 0 | ||
495 | 177 | E: 1323109479.014389 0003 0000 4142 | ||
496 | 178 | E: 1323109479.014390 0003 0001 3230 | ||
497 | 179 | E: 1323109479.014391 0003 0018 17 | ||
498 | 180 | E: 1323109479.014395 0000 0000 0 | ||
499 | 181 | E: 1323109479.026385 0003 002f 0 | ||
500 | 182 | E: 1323109479.026386 0003 0035 3326 | ||
501 | 183 | E: 1323109479.026387 0003 0036 3086 | ||
502 | 184 | E: 1323109479.026388 0003 002f 1 | ||
503 | 185 | E: 1323109479.026388 0003 0039 -1 | ||
504 | 186 | E: 1323109479.026390 0003 0000 3326 | ||
505 | 187 | E: 1323109479.026391 0003 0001 3086 | ||
506 | 188 | E: 1323109479.026392 0003 0018 7 | ||
507 | 189 | E: 1323109479.026393 0003 001c 15 | ||
508 | 190 | E: 1323109479.026394 0001 0145 1 | ||
509 | 191 | E: 1323109479.026395 0001 014d 0 | ||
510 | 192 | E: 1323109479.026396 0000 0000 0 | ||
511 | 193 | E: 1323109479.038191 0003 002f 0 | ||
512 | 194 | E: 1323109479.038192 0003 0035 3446 | ||
513 | 195 | E: 1323109479.038197 0003 0000 3446 | ||
514 | 196 | E: 1323109479.038199 0003 0018 4 | ||
515 | 197 | E: 1323109479.038206 0000 0000 0 | ||
516 | 198 | E: 1323109479.050230 0003 0039 -1 | ||
517 | 199 | E: 1323109479.050234 0003 0018 2 | ||
518 | 200 | E: 1323109479.050235 0003 001c 0 | ||
519 | 201 | E: 1323109479.050236 0001 0145 0 | ||
520 | 202 | E: 1323109479.050237 0000 0000 0 | ||
521 | 203 | E: 1323109479.075276 0003 0018 1 | ||
522 | 204 | E: 1323109479.075278 0000 0000 0 | ||
523 | 205 | E: 1323109479.099762 0003 0018 0 | ||
524 | 206 | E: 1323109479.099764 0000 0000 0 | ||
525 | 207 | E: 1323109479.654050 0003 0018 1 | ||
526 | 208 | E: 1323109479.654052 0000 0000 0 | ||
527 | 209 | E: 1323109479.689390 0003 0018 0 | ||
528 | 210 | E: 1323109479.689391 0000 0000 0 | ||
529 | 0 | 211 | ||
530 | === added file 'testsuite/geis2/test_device1.prop' | |||
531 | --- testsuite/geis2/test_device1.prop 1970-01-01 00:00:00 +0000 | |||
532 | +++ testsuite/geis2/test_device1.prop 2011-12-06 01:12:23 +0000 | |||
533 | @@ -0,0 +1,32 @@ | |||
534 | 1 | N: Test Device1 | ||
535 | 2 | I: 0011 0002 0007 01b1 | ||
536 | 3 | P: 09 00 00 00 00 00 00 00 | ||
537 | 4 | B: 00 0b 00 00 00 00 00 00 00 | ||
538 | 5 | B: 01 00 00 00 00 00 00 00 00 | ||
539 | 6 | B: 01 00 00 00 00 00 00 00 00 | ||
540 | 7 | B: 01 00 00 00 00 00 00 00 00 | ||
541 | 8 | B: 01 00 00 00 00 00 00 00 00 | ||
542 | 9 | B: 01 00 00 03 00 00 00 00 00 | ||
543 | 10 | B: 01 20 64 00 00 00 00 00 00 | ||
544 | 11 | B: 01 00 00 00 00 00 00 00 00 | ||
545 | 12 | B: 01 00 00 00 00 00 00 00 00 | ||
546 | 13 | B: 01 00 00 00 00 00 00 00 00 | ||
547 | 14 | B: 01 00 00 00 00 00 00 00 00 | ||
548 | 15 | B: 01 00 00 00 00 00 00 00 00 | ||
549 | 16 | B: 01 00 00 00 00 00 00 00 00 | ||
550 | 17 | B: 02 00 00 00 00 00 00 00 00 | ||
551 | 18 | B: 03 03 00 00 11 00 80 60 02 | ||
552 | 19 | B: 04 00 00 00 00 00 00 00 00 | ||
553 | 20 | B: 05 00 00 00 00 00 00 00 00 | ||
554 | 21 | B: 11 00 00 00 00 00 00 00 00 | ||
555 | 22 | B: 12 00 00 00 00 00 00 00 00 | ||
556 | 23 | B: 15 00 00 00 00 00 00 00 00 | ||
557 | 24 | B: 15 00 00 00 00 00 00 00 00 | ||
558 | 25 | A: 00 1472 5888 0 0 | ||
559 | 26 | A: 01 1408 4820 0 0 | ||
560 | 27 | A: 18 0 255 0 0 | ||
561 | 28 | A: 1c 0 15 0 0 | ||
562 | 29 | A: 2f 0 1 0 0 | ||
563 | 30 | A: 35 1472 5888 0 0 | ||
564 | 31 | A: 36 1408 4820 0 0 | ||
565 | 32 | A: 39 0 65535 0 0 | ||
566 | 0 | 33 | ||
567 | === added file 'testsuite/geis2/test_device2.prop' | |||
568 | --- testsuite/geis2/test_device2.prop 1970-01-01 00:00:00 +0000 | |||
569 | +++ testsuite/geis2/test_device2.prop 2011-12-06 01:12:23 +0000 | |||
570 | @@ -0,0 +1,32 @@ | |||
571 | 1 | N: Test Device2 | ||
572 | 2 | I: 0011 0002 0007 01b1 | ||
573 | 3 | P: 09 00 00 00 00 00 00 00 | ||
574 | 4 | B: 00 0b 00 00 00 00 00 00 00 | ||
575 | 5 | B: 01 00 00 00 00 00 00 00 00 | ||
576 | 6 | B: 01 00 00 00 00 00 00 00 00 | ||
577 | 7 | B: 01 00 00 00 00 00 00 00 00 | ||
578 | 8 | B: 01 00 00 00 00 00 00 00 00 | ||
579 | 9 | B: 01 00 00 03 00 00 00 00 00 | ||
580 | 10 | B: 01 20 64 00 00 00 00 00 00 | ||
581 | 11 | B: 01 00 00 00 00 00 00 00 00 | ||
582 | 12 | B: 01 00 00 00 00 00 00 00 00 | ||
583 | 13 | B: 01 00 00 00 00 00 00 00 00 | ||
584 | 14 | B: 01 00 00 00 00 00 00 00 00 | ||
585 | 15 | B: 01 00 00 00 00 00 00 00 00 | ||
586 | 16 | B: 01 00 00 00 00 00 00 00 00 | ||
587 | 17 | B: 02 00 00 00 00 00 00 00 00 | ||
588 | 18 | B: 03 03 00 00 11 00 80 60 02 | ||
589 | 19 | B: 04 00 00 00 00 00 00 00 00 | ||
590 | 20 | B: 05 00 00 00 00 00 00 00 00 | ||
591 | 21 | B: 11 00 00 00 00 00 00 00 00 | ||
592 | 22 | B: 12 00 00 00 00 00 00 00 00 | ||
593 | 23 | B: 15 00 00 00 00 00 00 00 00 | ||
594 | 24 | B: 15 00 00 00 00 00 00 00 00 | ||
595 | 25 | A: 00 1472 5888 0 0 | ||
596 | 26 | A: 01 1408 4820 0 0 | ||
597 | 27 | A: 18 0 255 0 0 | ||
598 | 28 | A: 1c 0 15 0 0 | ||
599 | 29 | A: 2f 0 1 0 0 | ||
600 | 30 | A: 35 1472 5888 0 0 | ||
601 | 31 | A: 36 1408 4820 0 0 | ||
602 | 32 | A: 39 0 65535 0 0 |
It's not the cleanest fix, but it gets the job done. I'm assuming Stephen has tried to think of cleaner fixes, so this is probably the easiest we can do without a big overhaul of some piece.
I think the code and testcase are fine, but the testcase needs documentation. Any manual testcase needs to have a description of the required environment, how to run the test, and expected results.