Skip to content

Commit d16bc95

Browse files
committed
Add l2mc tests
1 parent 3d07e59 commit d16bc95

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
@@ -21,6 +21,7 @@ testslibsaivs_SOURCES = main_libsaivs.cpp \
2121
test_sai_vs_dtel.cpp \
2222
test_sai_vs_fdb.cpp \
2323
test_sai_vs_ipmc.cpp \
24+
test_sai_vs_l2mc.cpp \
2425
test_sai_vs_ipmc_group.cpp \
2526
test_sai_vs_isolation_group.cpp \
2627
test_sai_vs_hash.cpp \

unittest/vslib/test_sai_vs_l2mc.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, l2mc)
10+
{
11+
sai_l2mc_api_t *api = nullptr;
12+
13+
sai_api_query(SAI_API_L2MC, (void**)&api);
14+
15+
EXPECT_NE(api, nullptr);
16+
17+
sai_l2mc_entry_t id ;
18+
19+
EXPECT_NE(SAI_STATUS_SUCCESS, api->create_l2mc_entry(&id,0,0));
20+
EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_l2mc_entry(0));
21+
EXPECT_NE(SAI_STATUS_SUCCESS, api->set_l2mc_entry_attribute(0,0));
22+
EXPECT_NE(SAI_STATUS_SUCCESS, api->get_l2mc_entry_attribute(0,0,0));
23+
}

0 commit comments

Comments
 (0)