-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
validation support for SAI_ATTR_VALUE_TYPE_JSON (#1152)
* validation support for SAI_ATTR_VALUE_TYPE_JSON * add sairedis-lib and vslib tests for generic programmable
- Loading branch information
1 parent
19ac1d5
commit b1e9c91
Showing
6 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <gtest/gtest.h> | ||
|
||
extern "C" { | ||
#include "sai.h" | ||
} | ||
|
||
#include "swss/logger.h" | ||
|
||
TEST(libsairedis, generic_programmable) | ||
{ | ||
sai_generic_programmable_api_t *api = nullptr; | ||
|
||
sai_api_query(SAI_API_GENERIC_PROGRAMMABLE, (void**)&api); | ||
|
||
EXPECT_NE(api, nullptr); | ||
|
||
sai_object_id_t obj_id; | ||
|
||
EXPECT_NE(SAI_STATUS_SUCCESS, api->create_generic_programmable(&obj_id,0,0,0)); | ||
EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_generic_programmable(0)); | ||
EXPECT_NE(SAI_STATUS_SUCCESS, api->set_generic_programmable_attribute(0,0)); | ||
EXPECT_NE(SAI_STATUS_SUCCESS, api->get_generic_programmable_attribute(0,0,0)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <gtest/gtest.h> | ||
|
||
extern "C" { | ||
#include "sai.h" | ||
} | ||
|
||
#include "swss/logger.h" | ||
|
||
TEST(libsaivs, generic_programmable) | ||
{ | ||
sai_generic_programmable_api_t *api = nullptr; | ||
|
||
sai_api_query(SAI_API_GENERIC_PROGRAMMABLE, (void**)&api); | ||
|
||
EXPECT_NE(api, nullptr); | ||
|
||
sai_object_id_t obj_id; | ||
|
||
EXPECT_NE(SAI_STATUS_SUCCESS, api->create_generic_programmable(&obj_id,0,0,0)); | ||
EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_generic_programmable(0)); | ||
EXPECT_NE(SAI_STATUS_SUCCESS, api->set_generic_programmable_attribute(0,0)); | ||
EXPECT_NE(SAI_STATUS_SUCCESS, api->get_generic_programmable_attribute(0,0,0)); | ||
} |