diff --git a/syncd/AttrVersionChecker.cpp b/syncd/AttrVersionChecker.cpp deleted file mode 100644 index 320afcaf5..000000000 --- a/syncd/AttrVersionChecker.cpp +++ /dev/null @@ -1,107 +0,0 @@ -#include "AttrVersionChecker.h" - -#include "swss/logger.h" - -using namespace syncd; - -AttrVersionChecker::AttrVersionChecker(): - m_enabled(false), - m_saiApiVersion(SAI_VERSION(0,0,0)) -{ - SWSS_LOG_ENTER(); - - // empty -} - -void AttrVersionChecker::enable( - _In_ bool enable) -{ - SWSS_LOG_ENTER(); - - m_enabled = enable; -} - -void AttrVersionChecker::setSaiApiVersion( - _In_ sai_api_version_t version) -{ - SWSS_LOG_ENTER(); - - m_saiApiVersion = version; -} - -void AttrVersionChecker::reset() -{ - SWSS_LOG_ENTER(); - - m_visitedAttributes.clear(); -} - -bool AttrVersionChecker::isSufficientVersion( - _In_ const sai_attr_metadata_t *md) -{ - SWSS_LOG_ENTER(); - - if (md == nullptr) - { - SWSS_LOG_ERROR("md is NULL"); - - return false; - } - - if (!m_enabled) - { - return true; - } - - if (SAI_METADATA_HAVE_ATTR_VERSION == 0) - { - // metadata does not contain attr versions, no check will be preformed - return true; - } - - // check attr version if metadata have version defined - - if (m_saiApiVersion > md->apiversion) - { - // ok, SAI version is bigger than attribute release version - - return true; - } - - if (m_saiApiVersion < md->apiversion) - { - // skip, SAI version is not sufficient - - if (m_visitedAttributes.find(md->attridname) == m_visitedAttributes.end()) - { - m_visitedAttributes.insert(md->attridname); - - // log only once - - SWSS_LOG_WARN("SAI version %lu, not sufficient to discover %s", m_saiApiVersion, md->attridname); - } - - return false; - } - - // m_saiApiVersion == md->apiversion - - if (md->nextrelease == false) - { - // ok, SAI version is equal to attribute version - return true; - } - - // next release == true - - if (m_visitedAttributes.find(md->attridname) == m_visitedAttributes.end()) - { - m_visitedAttributes.insert(md->attridname); - - // warn only once - - SWSS_LOG_WARN("%s is ment for next release after %lu, will not discover", md->attridname, m_saiApiVersion); - } - - return false; -} diff --git a/syncd/AttrVersionChecker.h b/syncd/AttrVersionChecker.h deleted file mode 100644 index f2b65cddd..000000000 --- a/syncd/AttrVersionChecker.h +++ /dev/null @@ -1,40 +0,0 @@ -#pragma once - -extern "C" { -#include "sai.h" -#include "saimetadata.h" -} - -#include -#include - -namespace syncd -{ - class AttrVersionChecker - { - public: - - AttrVersionChecker(); - - public: - - void enable( - _In_ bool enable); - - void setSaiApiVersion( - _In_ sai_api_version_t version); - - void reset(); - - bool isSufficientVersion( - _In_ const sai_attr_metadata_t *md); - - private: - - bool m_enabled; - - sai_api_version_t m_saiApiVersion; - - std::set m_visitedAttributes; - }; -} diff --git a/syncd/CommandLineOptions.cpp b/syncd/CommandLineOptions.cpp index 59ef25106..0c25c8cad 100644 --- a/syncd/CommandLineOptions.cpp +++ b/syncd/CommandLineOptions.cpp @@ -44,9 +44,6 @@ CommandLineOptions::CommandLineOptions() #endif // SAITHRIFT - m_supportingBulkCounterGroups = ""; - - m_enableAttrVersionCheck = false; } std::string CommandLineOptions::getCommandLineString() const @@ -70,7 +67,6 @@ std::string CommandLineOptions::getCommandLineString() const ss << " BreakConfig=" << m_breakConfig; ss << " WatchdogWarnTimeSpan=" << m_watchdogWarnTimeSpan; ss << " SupportingBulkCounters=" << m_supportingBulkCounterGroups; - ss << " EnableAttrVersionCheck=" << (m_enableAttrVersionCheck ? "YES" : "NO"); #ifdef SAITHRIFT diff --git a/syncd/CommandLineOptions.h b/syncd/CommandLineOptions.h index 72982ea5e..99d0827d6 100644 --- a/syncd/CommandLineOptions.h +++ b/syncd/CommandLineOptions.h @@ -100,6 +100,5 @@ namespace syncd std::string m_supportingBulkCounterGroups; - bool m_enableAttrVersionCheck; }; } diff --git a/syncd/CommandLineOptionsParser.cpp b/syncd/CommandLineOptionsParser.cpp index 66c13e49c..d49624336 100644 --- a/syncd/CommandLineOptionsParser.cpp +++ b/syncd/CommandLineOptionsParser.cpp @@ -19,9 +19,9 @@ std::shared_ptr CommandLineOptionsParser::parseCommandLine( auto options = std::make_shared(); #ifdef SAITHRIFT - const char* const optstring = "dp:t:g:x:b:B:aw:uSUCsz:lrm:h"; + const char* const optstring = "dp:t:g:x:b:B:w:uSUCsz:lrm:h"; #else - const char* const optstring = "dp:t:g:x:b:B:aw:uSUCsz:lh"; + const char* const optstring = "dp:t:g:x:b:B:w:uSUCsz:lh"; #endif // SAITHRIFT while (true) @@ -43,7 +43,6 @@ std::shared_ptr CommandLineOptionsParser::parseCommandLine( { "breakConfig", required_argument, 0, 'b' }, { "watchdogWarnTimeSpan", optional_argument, 0, 'w' }, { "supportingBulkCounters", required_argument, 0, 'B' }, - { "enableAttrVersionCheck", no_argument, 0, 'a' }, #ifdef SAITHRIFT { "rpcserver", no_argument, 0, 'r' }, { "portmap", required_argument, 0, 'm' }, @@ -139,10 +138,6 @@ std::shared_ptr CommandLineOptionsParser::parseCommandLine( options->m_supportingBulkCounterGroups = std::string(optarg); break; - case 'a': - options->m_enableAttrVersionCheck = true; - break; - case 'h': printUsage(); exit(EXIT_SUCCESS); @@ -201,8 +196,6 @@ void CommandLineOptionsParser::printUsage() std::cout << " Watchdog time span (in microseconds) to watch for execution" << std::endl; std::cout << " -B --supportingBulkCounters" << std::endl; std::cout << " Counter groups those support bulk polling" << std::endl; - std::cout << " -a --enableAttrVersionCheck" << std::endl; - std::cout << " Enable attribute SAI version check when performing SAI discovery" << std::endl; #ifdef SAITHRIFT diff --git a/syncd/HardReiniter.cpp b/syncd/HardReiniter.cpp index 9b621f8b0..8c714eb23 100644 --- a/syncd/HardReiniter.cpp +++ b/syncd/HardReiniter.cpp @@ -13,13 +13,11 @@ HardReiniter::HardReiniter( _In_ std::shared_ptr client, _In_ std::shared_ptr translator, _In_ std::shared_ptr sai, - _In_ std::shared_ptr handler, - _In_ bool checkAttrVersion): + _In_ std::shared_ptr handler): m_vendorSai(sai), m_translator(translator), m_client(client), - m_handler(handler), - m_checkAttrVersion(checkAttrVersion) + m_handler(handler) { SWSS_LOG_ENTER(); @@ -101,8 +99,7 @@ std::map> HardReiniter::hardR m_handler, m_switchVidToRid.at(kvp.first), m_switchRidToVid.at(kvp.first), - kvp.second, - m_checkAttrVersion); + kvp.second); sr->hardReinit(); diff --git a/syncd/HardReiniter.h b/syncd/HardReiniter.h index 435f38f16..9a032d16e 100644 --- a/syncd/HardReiniter.h +++ b/syncd/HardReiniter.h @@ -27,8 +27,7 @@ namespace syncd _In_ std::shared_ptr client, _In_ std::shared_ptr translator, _In_ std::shared_ptr sai, - _In_ std::shared_ptr handler, - _In_ bool checkAttrVersion); + _In_ std::shared_ptr handler); virtual ~HardReiniter(); @@ -60,7 +59,5 @@ namespace syncd std::shared_ptr m_client; std::shared_ptr m_handler; - - bool m_checkAttrVersion; }; } diff --git a/syncd/Makefile.am b/syncd/Makefile.am index 8c8cddaf3..3c546fb74 100644 --- a/syncd/Makefile.am +++ b/syncd/Makefile.am @@ -17,7 +17,6 @@ noinst_LIBRARIES = libSyncd.a libSyncdRequestShutdown.a libMdioIpcClient.a libSyncd_a_SOURCES = \ AsicOperation.cpp \ AsicView.cpp \ - AttrVersionChecker.cpp \ BestCandidateFinder.cpp \ BreakConfig.cpp \ BreakConfigParser.cpp \ diff --git a/syncd/SaiDiscovery.cpp b/syncd/SaiDiscovery.cpp index 43e01016a..8615526bb 100644 --- a/syncd/SaiDiscovery.cpp +++ b/syncd/SaiDiscovery.cpp @@ -19,31 +19,12 @@ using namespace syncd; #define SAI_DISCOVERY_LIST_MAX_ELEMENTS 1024 SaiDiscovery::SaiDiscovery( - _In_ std::shared_ptr sai, - _In_ bool checkAttrVersion): + _In_ std::shared_ptr sai): m_sai(sai) { SWSS_LOG_ENTER(); - sai_api_version_t version = SAI_VERSION(0,0,0); - - sai_status_t status = m_sai->queryApiVersion(&version); - - if (status == SAI_STATUS_SUCCESS) - { - m_attrVersionChecker.enable(checkAttrVersion); - m_attrVersionChecker.setSaiApiVersion(version); - - SWSS_LOG_NOTICE("check attr version ENABLED, libsai api version: %lu", version); - } - else - { - m_attrVersionChecker.enable(false); - m_attrVersionChecker.setSaiApiVersion(SAI_API_VERSION); - - SWSS_LOG_WARN("failed to obtain libsai api version: %s, will discover all attributes", - sai_serialize_status(status).c_str()); - } + // empty } SaiDiscovery::~SaiDiscovery() @@ -129,11 +110,6 @@ void SaiDiscovery::discover( attr.id = md->attrid; - if (!m_attrVersionChecker.isSufficientVersion(md)) - { - continue; - } - if (md->attrvaluetype == SAI_ATTR_VALUE_TYPE_OBJECT_ID) { if (md->defaultvaluetype == SAI_DEFAULT_VALUE_TYPE_CONST) @@ -283,8 +259,6 @@ std::set SaiDiscovery::discover( m_defaultOidMap.clear(); - m_attrVersionChecker.reset(); - std::set discovered_rids; { diff --git a/syncd/SaiDiscovery.h b/syncd/SaiDiscovery.h index c677a5b87..c48372b08 100644 --- a/syncd/SaiDiscovery.h +++ b/syncd/SaiDiscovery.h @@ -2,8 +2,6 @@ #include "meta/SaiInterface.h" -#include "AttrVersionChecker.h" - #include #include #include @@ -20,8 +18,7 @@ namespace syncd public: SaiDiscovery( - _In_ std::shared_ptr sai, - _In_ bool checkAttrVersion); + _In_ std::shared_ptr sai); virtual ~SaiDiscovery(); @@ -64,7 +61,5 @@ namespace syncd std::shared_ptr m_sai; DefaultOidMap m_defaultOidMap; - - AttrVersionChecker m_attrVersionChecker; }; } diff --git a/syncd/SaiSwitch.cpp b/syncd/SaiSwitch.cpp index 4f11dba4c..fb711db4d 100644 --- a/syncd/SaiSwitch.cpp +++ b/syncd/SaiSwitch.cpp @@ -26,14 +26,12 @@ SaiSwitch::SaiSwitch( _In_ std::shared_ptr client, _In_ std::shared_ptr translator, _In_ std::shared_ptr vendorSai, - _In_ bool warmBoot, - _In_ bool checkAttrVersion): + _In_ bool warmBoot): SaiSwitchInterface(switch_vid, switch_rid), m_vendorSai(vendorSai), m_warmBoot(warmBoot), m_translator(translator), - m_client(client), - m_checkAttrVersion(checkAttrVersion) + m_client(client) { SWSS_LOG_ENTER(); @@ -663,7 +661,7 @@ void SaiSwitch::helperDiscover() { SWSS_LOG_ENTER(); - SaiDiscovery sd(m_vendorSai, m_checkAttrVersion); + SaiDiscovery sd(m_vendorSai); m_discovered_rids = sd.discover(m_switch_rid); @@ -954,7 +952,7 @@ void SaiSwitch::onPostPortCreate( { SWSS_LOG_ENTER(); - SaiDiscovery sd(m_vendorSai, m_checkAttrVersion); + SaiDiscovery sd(m_vendorSai); auto discovered = sd.discover(port_rid); diff --git a/syncd/SaiSwitch.h b/syncd/SaiSwitch.h index 4c317678a..523e1fe1d 100644 --- a/syncd/SaiSwitch.h +++ b/syncd/SaiSwitch.h @@ -34,8 +34,7 @@ namespace syncd _In_ std::shared_ptr client, _In_ std::shared_ptr translator, _In_ std::shared_ptr vendorSai, - _In_ bool warmBoot, - _In_ bool checkAttrVersion); + _In_ bool warmBoot = false); virtual ~SaiSwitch() = default; @@ -354,7 +353,5 @@ namespace syncd std::shared_ptr m_translator; std::shared_ptr m_client; - - bool m_checkAttrVersion; }; } diff --git a/syncd/SingleReiniter.cpp b/syncd/SingleReiniter.cpp index 6844d3cf7..f757ba515 100644 --- a/syncd/SingleReiniter.cpp +++ b/syncd/SingleReiniter.cpp @@ -22,16 +22,14 @@ SingleReiniter::SingleReiniter( _In_ std::shared_ptr handler, _In_ const ObjectIdMap& vidToRidMap, _In_ const ObjectIdMap& ridToVidMap, - _In_ const std::vector& asicKeys, - _In_ bool checkAttrVersion): + _In_ const std::vector& asicKeys): m_vendorSai(sai), m_vidToRidMap(vidToRidMap), m_ridToVidMap(ridToVidMap), m_asicKeys(asicKeys), m_translator(translator), m_client(client), - m_handler(handler), - m_checkAttrVersion(checkAttrVersion) + m_handler(handler) { SWSS_LOG_ENTER(); @@ -319,7 +317,7 @@ void SingleReiniter::processSwitches() * object, so when doing discover we will get full default ASIC view. */ - m_sw = std::make_shared(m_switch_vid, m_switch_rid, m_client, m_translator, m_vendorSai, false, m_checkAttrVersion); + m_sw = std::make_shared(m_switch_vid, m_switch_rid, m_client, m_translator, m_vendorSai); /* * We processed switch. We have switch vid/rid so we can process all diff --git a/syncd/SingleReiniter.h b/syncd/SingleReiniter.h index b6a27eaab..e33b26af8 100644 --- a/syncd/SingleReiniter.h +++ b/syncd/SingleReiniter.h @@ -32,8 +32,7 @@ namespace syncd _In_ std::shared_ptr handler, _In_ const ObjectIdMap& vidToRidMap, _In_ const ObjectIdMap& ridToVidMap, - _In_ const std::vector& asicKeys, - _In_ bool checkAttrVersion); + _In_ const std::vector& asicKeys); virtual ~SingleReiniter(); @@ -137,7 +136,5 @@ namespace syncd std::shared_ptr m_client; std::shared_ptr m_handler; - - bool m_checkAttrVersion; }; } diff --git a/syncd/Syncd.cpp b/syncd/Syncd.cpp index 83f6b18ba..9c2533c3a 100644 --- a/syncd/Syncd.cpp +++ b/syncd/Syncd.cpp @@ -3136,7 +3136,7 @@ sai_status_t Syncd::processOidCreate( * constructor, like getting all queues, ports, etc. */ - m_switches[switchVid] = std::make_shared(switchVid, objectRid, m_client, m_translator, m_vendorSai, false, m_commandLineOptions->m_enableAttrVersionCheck); + m_switches[switchVid] = std::make_shared(switchVid, objectRid, m_client, m_translator, m_vendorSai); m_mdioIpcServer->setSwitchId(objectRid); @@ -4353,7 +4353,7 @@ void Syncd::onSyncdStart( SWSS_LOG_THROW("performing hard reinit, but there are %zu switches defined, bug!", m_switches.size()); } - HardReiniter hr(m_client, m_translator, m_vendorSai, m_handler, m_commandLineOptions->m_enableAttrVersionCheck); + HardReiniter hr(m_client, m_translator, m_vendorSai, m_handler); m_switches = hr.hardReinit(); @@ -4455,7 +4455,7 @@ void Syncd::onSwitchCreateInInitViewMode( // make switch initialization and get all default data - m_switches[switchVid] = std::make_shared(switchVid, switchRid, m_client, m_translator, m_vendorSai, false, m_commandLineOptions->m_enableAttrVersionCheck); + m_switches[switchVid] = std::make_shared(switchVid, switchRid, m_client, m_translator, m_vendorSai); m_mdioIpcServer->setSwitchId(switchRid); @@ -4639,7 +4639,7 @@ void Syncd::performWarmRestartSingleSwitch( // perform all get operations on existing switch - auto sw = m_switches[switchVid] = std::make_shared(switchVid, switchRid, m_client, m_translator, m_vendorSai, true, m_commandLineOptions->m_enableAttrVersionCheck); + auto sw = m_switches[switchVid] = std::make_shared(switchVid, switchRid, m_client, m_translator, m_vendorSai, true); startDiagShell(switchRid); } diff --git a/tests/aspell.en.pws b/tests/aspell.en.pws index a51e8f4c6..1908c5834 100644 --- a/tests/aspell.en.pws +++ b/tests/aspell.en.pws @@ -478,4 +478,3 @@ saiproxy submodule Enqueue deque -apiversion diff --git a/tests/utils.pm b/tests/utils.pm index 34b120bf8..489e5bb5a 100644 --- a/tests/utils.pm +++ b/tests/utils.pm @@ -48,19 +48,19 @@ sub flush_redis sub start_syncd { print color('bright_blue') . "Starting syncd" . color('reset') . "\n"; - `./vssyncd -aSUu -p "$DIR/vsprofile.ini" @_ >/dev/null 2>/dev/null &`; + `./vssyncd -SUu -p "$DIR/vsprofile.ini" @_ >/dev/null 2>/dev/null &`; } sub start_syncd_bulk { print color('bright_blue') . "Starting syncd bulk" . color('reset') . "\n"; - `./vssyncd -aSUul -p "$DIR/vsprofile.ini" @_ >/dev/null 2>/dev/null &`; + `./vssyncd -SUul -p "$DIR/vsprofile.ini" @_ >/dev/null 2>/dev/null &`; } sub start_syncd_warm { print color('bright_blue') . "Starting syncd warm" . color('reset') . "\n"; - `./vssyncd -aSUu -t warm -p "$DIR/vsprofile.ini" >/dev/null 2>/dev/null &`; + `./vssyncd -SUu -t warm -p "$DIR/vsprofile.ini" >/dev/null 2>/dev/null &`; sleep 1; } @@ -68,13 +68,13 @@ sub start_syncd_warm sub sync_start_syncd { print color('bright_blue') . "Starting syncd" . color('reset') . "\n"; - `./vssyncd -s -aSUu -p "$DIR/vsprofile.ini" >/dev/null 2>/dev/null &`; + `./vssyncd -s -SUu -p "$DIR/vsprofile.ini" >/dev/null 2>/dev/null &`; } sub sync_start_syncd_warm { print color('bright_blue') . "Starting syncd warm" . color('reset') . "\n"; - `./vssyncd -s -aSUu -t warm -p "$DIR/vsprofile.ini" >/dev/null 2>/dev/null &`; + `./vssyncd -s -SUu -t warm -p "$DIR/vsprofile.ini" >/dev/null 2>/dev/null &`; sleep 1; } diff --git a/unittest/syncd/Makefile.am b/unittest/syncd/Makefile.am index 13b0a43d2..b06a3ec08 100644 --- a/unittest/syncd/Makefile.am +++ b/unittest/syncd/Makefile.am @@ -7,7 +7,6 @@ LDADD_GTEST = -L/usr/src/gtest -lgtest -lgtest_main -lgmock tests_SOURCES = main.cpp \ MockableSaiInterface.cpp \ MockHelper.cpp \ - TestAttrVersionChecker.cpp \ TestCommandLineOptions.cpp \ TestConcurrentQueue.cpp \ TestFlexCounter.cpp \ diff --git a/unittest/syncd/TestAttrVersionChecker.cpp b/unittest/syncd/TestAttrVersionChecker.cpp deleted file mode 100644 index f1bc91ab9..000000000 --- a/unittest/syncd/TestAttrVersionChecker.cpp +++ /dev/null @@ -1,132 +0,0 @@ -#include - -#include -#include -#include - -#include - -#include "AttrVersionChecker.h" -#include "swss/logger.h" - -using namespace syncd; - -TEST(AttrVersionChecker, ctr) -{ - AttrVersionChecker avc; -} - -TEST(AttrVersionChecker, enable) -{ - AttrVersionChecker avc; - - avc.enable(true); - - avc.enable(false); -} - -TEST(AttrVersionChecker, setSaiApiVersion) -{ - AttrVersionChecker avc; - - avc.setSaiApiVersion(SAI_VERSION(1,13,0)); -} - -TEST(AttrVersionChecker, reset) -{ - AttrVersionChecker avc; - - avc.reset(); -} - -#define MD(x,v,n) \ - const sai_attr_metadata_t x = {\ - .objecttype = (sai_object_type_t)SAI_OBJECT_TYPE_BRIDGE,\ - .attrid = SAI_BRIDGE_ATTR_PORT_LIST,\ - .attridname = "SAI_BRIDGE_ATTR_PORT_LIST",\ - .brief = "List of bridge ports associated to this bridge.",\ - .attrvaluetype = SAI_ATTR_VALUE_TYPE_OBJECT_LIST,\ - .flags = (sai_attr_flags_t)(SAI_ATTR_FLAGS_READ_ONLY),\ - .allowedobjecttypes = NULL,\ - .allowedobjecttypeslength = 0,\ - .allowrepetitiononlist = false,\ - .allowmixedobjecttypes = false,\ - .allowemptylist = false,\ - .allownullobjectid = false,\ - .isoidattribute = (1 > 0),\ - .defaultvaluetype = SAI_DEFAULT_VALUE_TYPE_NONE,\ - .defaultvalue = NULL,\ - .defaultvalueobjecttype = SAI_OBJECT_TYPE_NULL,\ - .defaultvalueattrid = SAI_INVALID_ATTRIBUTE_ID,\ - .storedefaultvalue = false,\ - .isenum = false,\ - .isenumlist = false,\ - .enummetadata = NULL,\ - .conditiontype = SAI_ATTR_CONDITION_TYPE_NONE,\ - .conditions = NULL,\ - .conditionslength = 0,\ - .isconditional = (0 != 0),\ - .validonlytype = SAI_ATTR_CONDITION_TYPE_NONE,\ - .validonly = NULL,\ - .validonlylength = 0,\ - .isvalidonly = (0 != 0),\ - .getsave = false,\ - .isvlan = false,\ - .isaclfield = false,\ - .isaclaction = false,\ - .isaclmask = false,\ - .ismandatoryoncreate = false,\ - .iscreateonly = false,\ - .iscreateandset = false,\ - .isreadonly = true,\ - .iskey = false,\ - .isprimitive = false,\ - .notificationtype = -1,\ - .iscallback = false,\ - .pointertype = -1,\ - .capability = NULL,\ - .capabilitylength = 0,\ - .isextensionattr = false,\ - .isresourcetype = false,\ - .isdeprecated = false,\ - .isconditionrelaxed = false,\ - .iscustom = false,\ - .apiversion = (v),\ - .nextrelease = (n),\ - };\ - - -TEST(AttrVersionChecker, isSufficientVersion) -{ - AttrVersionChecker avc; - - avc.enable(true); - EXPECT_EQ(avc.isSufficientVersion(nullptr), false); - - avc.enable(false); - avc.setSaiApiVersion(SAI_VERSION(1,10,0)); - avc.enable(true); - - MD(md,SAI_VERSION(1,9,0),false); - EXPECT_EQ(avc.isSufficientVersion(&md), true); - - MD(md1,SAI_VERSION(1,11,0),false); - EXPECT_EQ(avc.isSufficientVersion(&md1),false); - - avc.enable(false); - EXPECT_EQ(avc.isSufficientVersion(&md1),true); - - avc.enable(true); - avc.setSaiApiVersion(SAI_VERSION(1,10,0)); - EXPECT_EQ(avc.isSufficientVersion(&md1),false); - - avc.setSaiApiVersion(SAI_VERSION(1,12,0)); - EXPECT_EQ(avc.isSufficientVersion(&md1),true); - - avc.setSaiApiVersion(SAI_VERSION(1,11,0)); - EXPECT_EQ(avc.isSufficientVersion(&md1),true); - - MD(md2,SAI_VERSION(1,11,0),true); - avc.setSaiApiVersion(SAI_VERSION(1,11,0)); - EXPECT_EQ(avc.isSufficientVersion(&md2),false); -} diff --git a/unittest/syncd/TestCommandLineOptions.cpp b/unittest/syncd/TestCommandLineOptions.cpp index 0eb5aaef3..7c9088bf0 100644 --- a/unittest/syncd/TestCommandLineOptions.cpp +++ b/unittest/syncd/TestCommandLineOptions.cpp @@ -38,8 +38,6 @@ R"(Usage: syncd [-d] [-p profile] [-t type] [-u] [-S] [-U] [-C] [-s] [-z mode] [ Watchdog time span (in microseconds) to watch for execution -B --supportingBulkCounters Counter groups those support bulk polling - -a --enableAttrVersionCheck - Enable attribute SAI version check when performing SAI discovery -h --help Print out this message )"; @@ -53,7 +51,7 @@ TEST(CommandLineOptions, getCommandLineString) EXPECT_EQ(str, " EnableDiagShell=NO EnableTempView=NO DisableExitSleep=NO EnableUnittests=NO" " EnableConsistencyCheck=NO EnableSyncMode=NO RedisCommunicationMode=redis_async" " EnableSaiBulkSuport=NO StartType=cold ProfileMapFile= GlobalContext=0 ContextConfig= BreakConfig=" - " WatchdogWarnTimeSpan=30000000 SupportingBulkCounters= EnableAttrVersionCheck=NO"); + " WatchdogWarnTimeSpan=30000000 SupportingBulkCounters="); } TEST(CommandLineOptions, startTypeStringToStartType)