summaryrefslogtreecommitdiffstats
path: root/tests/ctrl/ctrl_test.ok
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-12-16 05:38:37 +0100
committerHarald Welte <laforge@gnumonks.org>2017-12-18 23:05:50 +0000
commit83aee83ec6a9d3d5e4f9251221c9639028d3da89 (patch)
treeb157a2e53a363347611b64c016624be2131481e3 /tests/ctrl/ctrl_test.ok
parentd53d2169442fd43ed1538c3970c6e7cb6096f20a (diff)
ctrl_test: expand to test message handling and detect mem leaks
Subsequent patches that tighten CTRL input validation will make the results more interesting. Change-Id: Idd4cc7d193db1a7d761f72ed33ed46eea450a78f
Diffstat (limited to 'tests/ctrl/ctrl_test.ok')
-rw-r--r--tests/ctrl/ctrl_test.ok85
1 files changed, 68 insertions, 17 deletions
diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok
index 5775eb22..edf97ead 100644
--- a/tests/ctrl/ctrl_test.ok
+++ b/tests/ctrl/ctrl_test.ok
@@ -7,105 +7,156 @@ ctrl type 4 is SET_REPLY -> 4 OK
ctrl type 5 is TRAP -> 5 OK
ctrl type 6 is ERROR -> 6 OK
ctrl type 64 is unknown 0x40 [PARSE FAILED]
-test parsing: 'GET 1 variable'
+test: 'GET 1 variable'
+parsing:
id = '1'
variable = 'variable'
value = '(null)'
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'GET 1 variable\n'
+test: 'GET 1 variable\n'
+parsing:
id = '1'
variable = 'variable\n'
value = '(null)'
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'GET 1 var\ni\nable'
+test: 'GET 1 var\ni\nable'
+parsing:
id = '1'
variable = 'var\ni\nable'
value = '(null)'
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'GET 1 variable value'
+test: 'GET 1 variable value'
+parsing:
id = '1'
variable = 'variable'
value = '(null)'
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'GET 1 variable value\n'
+test: 'GET 1 variable value\n'
+parsing:
id = '1'
variable = 'variable'
value = '(null)'
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'GET 1 variable multiple value tokens'
+test: 'GET 1 variable multiple value tokens'
+parsing:
id = '1'
variable = 'variable'
value = '(null)'
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'GET 1 variable multiple value tokens\n'
+test: 'GET 1 variable multiple value tokens\n'
+parsing:
id = '1'
variable = 'variable'
value = '(null)'
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'SET 1 variable value'
+test: 'SET 1 variable value'
+parsing:
id = '1'
variable = 'variable'
value = 'value'
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'SET 1 variable value\n'
+test: 'SET 1 variable value\n'
+parsing:
id = '1'
variable = 'variable'
value = 'value'
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'SET weird_id variable value'
+test: 'SET weird_id variable value'
+parsing:
id = 'weird_id'
variable = 'variable'
value = 'value'
reply = '(null)'
+handling:
+replied: 'ERROR weird_id Command not found'
ok
-test parsing: 'SET weird_id variable value\n'
+test: 'SET weird_id variable value\n'
+parsing:
id = 'weird_id'
variable = 'variable'
value = 'value'
reply = '(null)'
+handling:
+replied: 'ERROR weird_id Command not found'
ok
-test parsing: 'SET 1 variable multiple value tokens'
+test: 'SET 1 variable multiple value tokens'
+parsing:
id = '1'
variable = 'variable'
value = 'multiple value tokens'
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'SET 1 variable multiple value tokens\n'
+test: 'SET 1 variable multiple value tokens\n'
+parsing:
id = '1'
variable = 'variable'
value = 'multiple value tokens'
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'SET 1 variable value_with_trailing_spaces '
+test: 'SET 1 variable value_with_trailing_spaces '
+parsing:
id = '1'
variable = 'variable'
value = 'value_with_trailing_spaces '
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'SET 1 variable value_with_trailing_spaces \n'
+test: 'SET 1 variable value_with_trailing_spaces \n'
+parsing:
id = '1'
variable = 'variable'
value = 'value_with_trailing_spaces '
reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
ok
-test parsing: 'SET \n special_char_id value'
+test: 'SET \n special_char_id value'
+parsing:
id = '\n'
variable = 'special_char_id'
value = 'value'
reply = '(null)'
+handling:
+replied: 'ERROR \n Command not found'
ok
-test parsing: 'SET \t special_char_id value'
+test: 'SET \t special_char_id value'
+parsing:
id = '\t'
variable = 'special_char_id'
value = 'value'
reply = '(null)'
+handling:
+replied: 'ERROR \t Command not found'
ok