de35cdb778
log.txt message: 17:52:59,969 API call failed, expected 0 return value instead of -13 in tap_create_v2_reply(_0=58, context=77019, retval=-13, sw_if_index=4294967295) Test was failing with log message: tap: tap0: tap_create_if: ioctl(TUNSETIFF): Operation not permitted Type: test Change-Id: I5bcd9d2b0c870ea5eef92b79314b97821399722f Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
25 lines
601 B
Python
25 lines
601 B
Python
import unittest
|
|
import os
|
|
|
|
from framework import VppTestCase, VppTestRunner
|
|
from vpp_devices import VppTAPInterface
|
|
|
|
|
|
def check_tuntap_driver_access():
|
|
return os.access("/dev/net/tun", os.R_OK and os.W_OK)
|
|
|
|
|
|
@unittest.skipIf(check_tuntap_driver_access(), "Permission denied")
|
|
class TestTAP(VppTestCase):
|
|
""" TAP Test Case """
|
|
|
|
def test_tap_add_del(self):
|
|
"""Create TAP interface"""
|
|
tap0 = VppTAPInterface(self, tap_id=0)
|
|
tap0.add_vpp_config()
|
|
self.assertTrue(tap0.query_vpp_config())
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main(testRunner=VppTestRunner)
|