aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_punt.py
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2020-02-07 11:30:26 +0100
committerOle Trøan <otroan@employees.org>2020-02-26 08:51:03 +0000
commit2dbee9361e74d03727a8b618ba80a5e28c006011 (patch)
tree443b6c39e99e0e46b62ef0dfd002e31bb1fa7665 /test/test_punt.py
parent8e755a16a71c55555f12381c8a12e22ae7138536 (diff)
api: improve api string safety
- Remove vl_api_from_api_string to prevent use of not nul-terminated strings. - Rename vl_api_from_api_to_vec -> vl_api_from_api_to_new_vec to imply a new vector is created. NOT nul terminated. - Add vl_api_from_api_to_new_c_string. Returns nul terminated string in a new vector. - Add vl_api_c_string_to_api_string. Convert nul terminated string to vl_api_string_t - Add vl_api_vec_to_api_string. Convert NON nul terminated vector to vl_api_string_t Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Iadd59b612c0d960a34ad0dd07a9d17f56435c6ea Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'test/test_punt.py')
-rw-r--r--test/test_punt.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_punt.py b/test/test_punt.py
index 8ebf44767f3..ecd34f6eea7 100644
--- a/test/test_punt.py
+++ b/test/test_punt.py
@@ -811,6 +811,8 @@ class TestExceptionPuntSocket(TestPuntSocket):
rs = self.vapi.punt_reason_dump()
for key in cfgs:
for r in rs:
+ print(r.reason.name)
+ print(key)
if r.reason.name == key:
cfgs[key]['id'] = r.reason.id
cfgs[key]['vpp'] = copy.deepcopy(