blob: 0705d69cf17ffb28160e4f3b0dd99d04011e4c94 [file] [log] [blame]
Max70c7d412017-02-24 13:59:14 +01001Checking ctrl types...
Neels Hofmeyr7c1ec8c2017-03-02 14:32:52 +01002ctrl type 0 is (unknown) -> 0 OK
Max70c7d412017-02-24 13:59:14 +01003ctrl type 1 is GET -> 1 OK
4ctrl type 2 is SET -> 2 OK
5ctrl type 3 is GET_REPLY -> 3 OK
6ctrl type 4 is SET_REPLY -> 4 OK
7ctrl type 5 is TRAP -> 5 OK
8ctrl type 6 is ERROR -> 6 OK
9ctrl type 64 is unknown 0x40 [PARSE FAILED]
Neels Hofmeyr83aee832017-12-16 05:38:37 +010010test: 'GET 1 variable'
11parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +020012type = 'GET'
Neels Hofmeyr505c9652017-09-26 15:24:58 +020013id = '1'
14variable = 'variable'
Neels Hofmeyr0ab6eca2017-12-16 01:03:37 +010015value = '(null)'
16reply = '(null)'
Neels Hofmeyr83aee832017-12-16 05:38:37 +010017handling:
18replied: 'ERROR 1 Command not found'
Neels Hofmeyr505c9652017-09-26 15:24:58 +020019ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +010020test: 'GET 1 variable\n'
21parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +020022type = 'GET'
Neels Hofmeyr505c9652017-09-26 15:24:58 +020023id = '1'
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020024variable = 'variable'
Neels Hofmeyr0ab6eca2017-12-16 01:03:37 +010025value = '(null)'
26reply = '(null)'
Neels Hofmeyr83aee832017-12-16 05:38:37 +010027handling:
28replied: 'ERROR 1 Command not found'
Neels Hofmeyr505c9652017-09-26 15:24:58 +020029ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +010030test: 'GET 1 var\ni\nable'
31parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +020032type = 'ERROR' (parse failure)
Neels Hofmeyr505c9652017-09-26 15:24:58 +020033id = '1'
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020034reply = 'GET with trailing characters'
Neels Hofmeyr83aee832017-12-16 05:38:37 +010035handling:
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020036replied: 'ERROR 1 GET with trailing characters'
Neels Hofmeyr505c9652017-09-26 15:24:58 +020037ok
Neels Hofmeyr1b8b1522017-12-15 20:41:28 +010038test: 'GET 1 var\ti\table'
39parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +020040type = 'ERROR' (parse failure)
Neels Hofmeyr1b8b1522017-12-15 20:41:28 +010041id = '1'
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020042reply = 'GET variable contains invalid characters'
Neels Hofmeyr1b8b1522017-12-15 20:41:28 +010043handling:
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020044replied: 'ERROR 1 GET variable contains invalid characters'
Neels Hofmeyr1b8b1522017-12-15 20:41:28 +010045ok
46test: 'GET 1 var\ri\rable'
47parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +020048type = 'ERROR' (parse failure)
Neels Hofmeyr1b8b1522017-12-15 20:41:28 +010049id = '1'
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020050reply = 'GET variable contains invalid characters'
Neels Hofmeyr1b8b1522017-12-15 20:41:28 +010051handling:
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020052replied: 'ERROR 1 GET variable contains invalid characters'
Neels Hofmeyr1b8b1522017-12-15 20:41:28 +010053ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +010054test: 'GET 1 variable value'
55parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +020056type = 'ERROR' (parse failure)
Neels Hofmeyr505c9652017-09-26 15:24:58 +020057id = '1'
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020058reply = 'GET with trailing characters'
Neels Hofmeyr83aee832017-12-16 05:38:37 +010059handling:
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020060replied: 'ERROR 1 GET with trailing characters'
Neels Hofmeyr505c9652017-09-26 15:24:58 +020061ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +010062test: 'GET 1 variable value\n'
63parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +020064type = 'ERROR' (parse failure)
Neels Hofmeyr505c9652017-09-26 15:24:58 +020065id = '1'
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020066reply = 'GET with trailing characters'
Neels Hofmeyr83aee832017-12-16 05:38:37 +010067handling:
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020068replied: 'ERROR 1 GET with trailing characters'
Neels Hofmeyr505c9652017-09-26 15:24:58 +020069ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +010070test: 'GET 1 variable multiple value tokens'
71parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +020072type = 'ERROR' (parse failure)
Neels Hofmeyr505c9652017-09-26 15:24:58 +020073id = '1'
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020074reply = 'GET with trailing characters'
Neels Hofmeyr83aee832017-12-16 05:38:37 +010075handling:
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020076replied: 'ERROR 1 GET with trailing characters'
Neels Hofmeyr505c9652017-09-26 15:24:58 +020077ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +010078test: 'GET 1 variable multiple value tokens\n'
79parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +020080type = 'ERROR' (parse failure)
Neels Hofmeyr505c9652017-09-26 15:24:58 +020081id = '1'
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020082reply = 'GET with trailing characters'
Neels Hofmeyr83aee832017-12-16 05:38:37 +010083handling:
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +020084replied: 'ERROR 1 GET with trailing characters'
Neels Hofmeyr505c9652017-09-26 15:24:58 +020085ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +010086test: 'SET 1 variable value'
87parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +020088type = 'SET'
Neels Hofmeyr505c9652017-09-26 15:24:58 +020089id = '1'
90variable = 'variable'
91value = 'value'
Neels Hofmeyr0ab6eca2017-12-16 01:03:37 +010092reply = '(null)'
Neels Hofmeyr83aee832017-12-16 05:38:37 +010093handling:
94replied: 'ERROR 1 Command not found'
Neels Hofmeyr505c9652017-09-26 15:24:58 +020095ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +010096test: 'SET 1 variable value\n'
97parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +020098type = 'SET'
Neels Hofmeyr505c9652017-09-26 15:24:58 +020099id = '1'
100variable = 'variable'
101value = 'value'
Neels Hofmeyr0ab6eca2017-12-16 01:03:37 +0100102reply = '(null)'
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100103handling:
104replied: 'ERROR 1 Command not found'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200105ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100106test: 'SET weird_id variable value'
107parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +0200108type = 'ERROR' (parse failure)
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +0200109id = 'err'
110reply = 'Invalid message ID number'
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100111handling:
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +0200112replied: 'ERROR err Invalid message ID number'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200113ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100114test: 'SET weird_id variable value\n'
115parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +0200116type = 'ERROR' (parse failure)
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +0200117id = 'err'
118reply = 'Invalid message ID number'
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100119handling:
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +0200120replied: 'ERROR err Invalid message ID number'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200121ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100122test: 'SET 1 variable multiple value tokens'
123parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +0200124type = 'SET'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200125id = '1'
126variable = 'variable'
127value = 'multiple value tokens'
Neels Hofmeyr0ab6eca2017-12-16 01:03:37 +0100128reply = '(null)'
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100129handling:
130replied: 'ERROR 1 Command not found'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200131ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100132test: 'SET 1 variable multiple value tokens\n'
133parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +0200134type = 'SET'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200135id = '1'
136variable = 'variable'
137value = 'multiple value tokens'
Neels Hofmeyr0ab6eca2017-12-16 01:03:37 +0100138reply = '(null)'
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100139handling:
140replied: 'ERROR 1 Command not found'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200141ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100142test: 'SET 1 variable value_with_trailing_spaces '
143parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +0200144type = 'SET'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200145id = '1'
146variable = 'variable'
147value = 'value_with_trailing_spaces '
Neels Hofmeyr0ab6eca2017-12-16 01:03:37 +0100148reply = '(null)'
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100149handling:
150replied: 'ERROR 1 Command not found'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200151ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100152test: 'SET 1 variable value_with_trailing_spaces \n'
153parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +0200154type = 'SET'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200155id = '1'
156variable = 'variable'
157value = 'value_with_trailing_spaces '
Neels Hofmeyr0ab6eca2017-12-16 01:03:37 +0100158reply = '(null)'
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100159handling:
160replied: 'ERROR 1 Command not found'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200161ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100162test: 'SET \n special_char_id value'
163parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +0200164type = 'ERROR' (parse failure)
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +0200165id = 'err'
166reply = 'Invalid message ID number'
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100167handling:
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +0200168replied: 'ERROR err Invalid message ID number'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200169ok
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100170test: 'SET \t special_char_id value'
171parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +0200172type = 'ERROR' (parse failure)
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +0200173id = 'err'
174reply = 'Invalid message ID number'
Neels Hofmeyr83aee832017-12-16 05:38:37 +0100175handling:
Neels Hofmeyr3da9aa62017-09-26 14:21:44 +0200176replied: 'ERROR err Invalid message ID number'
Neels Hofmeyr505c9652017-09-26 15:24:58 +0200177ok
Neels Hofmeyr6769ad62017-12-16 04:01:54 +0100178test: 'GET_REPLY 1 variable OK'
179parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +0200180type = 'GET_REPLY'
Neels Hofmeyr6769ad62017-12-16 04:01:54 +0100181id = '1'
182variable = 'variable'
183value = '(null)'
184reply = 'OK'
185handling:
Neels Hofmeyr6769ad62017-12-16 04:01:54 +0100186ok
187test: 'SET_REPLY 1 variable OK'
188parsing:
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +0200189type = 'SET_REPLY'
Neels Hofmeyr6769ad62017-12-16 04:01:54 +0100190id = '1'
191variable = 'variable'
192value = '(null)'
193reply = 'OK'
194handling:
Neels Hofmeyr6769ad62017-12-16 04:01:54 +0100195ok
Pau Espin Pedrolb885ef82018-07-12 19:29:23 +0200196test: 'ERROR 1 some error message'
197parsing:
198type = 'ERROR' (error received)
199id = '1'
200reply = 'some error message'
201handling:
202ok
203test: 'ERROR err some error message'
204parsing:
205type = 'ERROR' (error received)
206id = 'err'
207reply = 'some error message'
208handling:
209ok
Neels Hofmeyr6882b802018-04-05 02:14:12 +0200210
211test_deferred_cmd
212get_test_defer called
213ctrl_handle_msg() returned 0
Neels Hofmeyrcdbc9af2018-04-03 16:51:49 +0200214invoking ctrl_test_defer_cb() asynchronously
215ctrl_test_defer_cb called
Neels Hofmeyr6882b802018-04-05 02:14:12 +0200216success