diff options
author | Karol Latecki <karolx.latecki@intel.com> | 2016-10-27 12:07:33 -0400 |
---|---|---|
committer | Karol Latecki <karolx.latecki@intel.com> | 2017-01-19 16:52:23 +0100 |
commit | 759bedcea5d15c6d1e2ffcc574f6a7e9333eea28 (patch) | |
tree | c2a35402c333bd7def9a6ef91388952e01dd4221 /test/gtest/test_tle_udp_dev.h | |
parent | 116a24859ada50e7904092fd4f886493c322a8c7 (diff) |
tldk test: Update tle_dev unit tests
Added new unit tests for add_dev and del_dev.
Also updated previous tests which were missing cleaning up of devices
in cases where they were actually created.
Change-Id: I6d91cac54b34d4419147c125b7a13b780e1cc001
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
Diffstat (limited to 'test/gtest/test_tle_udp_dev.h')
-rw-r--r-- | test/gtest/test_tle_udp_dev.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/gtest/test_tle_udp_dev.h b/test/gtest/test_tle_udp_dev.h index 3ecc5c7..02f544d 100644 --- a/test/gtest/test_tle_udp_dev.h +++ b/test/gtest/test_tle_udp_dev.h @@ -16,14 +16,19 @@ #ifndef TEST_TLE_UDP_DEV_H_ #define TEST_TLE_UDP_DEV_H_ +#include <algorithm> #include <arpa/inet.h> #include <gtest/gtest.h> + #include <rte_errno.h> + #include <tle_udp_impl.h> #define RX_NO_OFFLOAD 0 #define TX_NO_OFFLOAD 0 +using namespace std; + class udp_dev : public ::testing::Test { public: @@ -31,6 +36,7 @@ public: struct tle_udp_dev *dev; struct tle_udp_ctx_param prm; struct tle_udp_dev_param dev_prm; + vector<tle_udp_dev*> devs; virtual void SetUp(void) { @@ -56,6 +62,9 @@ public: virtual void TearDown(void) { + for(auto d : devs) { + tle_udp_del_dev(d); + } tle_udp_destroy(ctx); } }; |