acl-plugin: fix acl plugin test failing sporadically (VPP-898) 09/7409/2
authorAndrew Yourtchenko <ayourtch@gmail.com>
Mon, 3 Jul 2017 14:25:37 +0000 (16:25 +0200)
committerNeale Ranns <nranns@cisco.com>
Tue, 4 Jul 2017 08:57:54 +0000 (08:57 +0000)
commit130a75384f139f64a5fcf3d357a1fdc769503738
treec7443c53deb29230afe649e5430de09751d3dd3a
parent7c0aecc9e36f7565cdac6a725843081cd5b5f608
acl-plugin: fix acl plugin test failing sporadically (VPP-898)

The "acl_plugin" tests has one of the tests sporadically fail with the following traceback:

r.reply.decode().rstrip('\x00') UnicodeDecodeError: 'ascii' codec can't decode byte
0xd8 in position 20666: ordinal not in range(128)

This occurs in the newly added "show acl-plugin table" debug CLI.
This CLI has only the numeric outputs, so the conclusion is that it is
the incorrect termination (trailing zero) that might be most probably
causing it. The other acl-plugins show commands also
lack the zero-termination termination, so fix all of them.
The particularity of this command vs. the other acl-plugin debug CLIs
is that the accumulator is freed and allocated multiple times,
this might explain the issue is not seen with them.

Change-Id: I87b5c0d6152fbebcae9c7d0ce97155c1ae6666db
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit be055bd719559fc79d8a4c06479497c4c0bfae93)
src/plugins/acl/acl.c