Fix CDP failure in make test 28/16428/2
authorLijian.Zhang <Lijian.Zhang@arm.com>
Mon, 10 Dec 2018 10:08:02 +0000 (02:08 -0800)
committerDamjan Marion <dmarion@me.com>
Wed, 12 Dec 2018 00:35:27 +0000 (00:35 +0000)
commitca7f53a17150a4cc8f4e53eb9c5e8a667c7cbc03
treed29783adc475e0d61036a8c127f74bf81c6a7f50
parent0bcad32b3870f9998fa1393418081cdda685272f
Fix CDP failure in make test

Once the hostname is longer than 15 bytes,
the name of device in the output of show cdp command will be truncated,
and CDP test case will fail with below message.

==============================================================================
FAIL: test_send_cdp_packet (test_cdp.TestCDP)
------------------------------------------------------------------------------
Traceback (most recent call last):
File "vpp/test/test_cdp.py", line 92, in test_send_cdp_packet
    "CDP received invalid device id")
File "vpp/test/framework.py", line 804, in assert_equal
    self.assertEqual(real_value, expected_value, msg)
AssertionError: Invalid CDP received invalid device id: net-x86-supermi does not match expected value net-x86-supermicro-02

Change-Id: Ia32b92c6cd1bb6070adcee3ec45e38399ec382a7
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
src/plugins/cdp/cdp_input.c
test/test_cdp.py