Skip to content

Commit adbcfd9

Browse files
committed
Add mcast fdb tests
1 parent d624231 commit adbcfd9

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

unittest/vslib/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ testslibsaivs_SOURCES = main_libsaivs.cpp \
2525
test_sai_vs_l2mcgroup.cpp \
2626
test_sai_vs_lag.cpp \
2727
test_sai_vs_ipmc_group.cpp \
28+
test_sai_vs_macsec.cpp \
2829
test_sai_vs_isolation_group.cpp \
30+
test_sai_vs_mcastfdb.cpp \
2931
test_sai_vs_hash.cpp \
3032
test_sai_vs_vlan.cpp \
3133
test_sai_vs_hostif.cpp \
Lines changed: 23 additions & 0 deletions
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, mcast_fdb)
10+
{
11+
sai_mcast_fdb_api_t *api = nullptr;
12+
13+
sai_api_query(SAI_API_MCAST_FDB, (void**)&api);
14+
15+
EXPECT_NE(api, nullptr);
16+
17+
sai_mcast_fdb_entry_t id;
18+
19+
EXPECT_NE(SAI_STATUS_SUCCESS, api->create_mcast_fdb_entry(&id,0,0));
20+
EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_mcast_fdb_entry(0));
21+
EXPECT_NE(SAI_STATUS_SUCCESS, api->set_mcast_fdb_entry_attribute(0,0));
22+
EXPECT_NE(SAI_STATUS_SUCCESS, api->get_mcast_fdb_entry_attribute(0,0,0));
23+
}

0 commit comments

Comments
 (0)