Skip to content

Commit b6ed3e0

Browse files
committed
Add ipcm tests
1 parent 78e8b68 commit b6ed3e0

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

unittest/vslib/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ testslibsaivs_SOURCES = main_libsaivs.cpp \
2020
test_sai_vs_debug_counter.cpp \
2121
test_sai_vs_dtel.cpp \
2222
test_sai_vs_fdb.cpp \
23+
test_sai_vs_ipmc.cpp \
2324
test_sai_vs_hash.cpp \
2425
test_sai_vs_vlan.cpp \
2526
test_sai_vs_hostif.cpp \

unittest/vslib/test_sai_vs_ipmc.cpp

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include <gtest/gtest.h>
2+
3+
extern "C" {
4+
#include "sai.h"
5+
}
6+
7+
#include "swss/logger.h"
8+
9+
TEST(libsaivs, ipmc)
10+
{
11+
sai_ipmc_api_t *api = nullptr;
12+
13+
sai_api_query(SAI_API_IPMC, (void**)&api);
14+
15+
EXPECT_NE(api, nullptr);
16+
17+
sai_ipmc_entry_t id;
18+
19+
EXPECT_NE(SAI_STATUS_SUCCESS, api->create_ipmc_entry(&id,0,0));
20+
EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_ipmc_entry(0));
21+
EXPECT_NE(SAI_STATUS_SUCCESS, api->set_ipmc_entry_attribute(0,0));
22+
EXPECT_NE(SAI_STATUS_SUCCESS, api->get_ipmc_entry_attribute(0,0,0));
23+
}

0 commit comments

Comments
 (0)