diff --git a/cmake/AgentHwTest.cmake b/cmake/AgentHwTest.cmake index 1c955415757f6..7848215696a09 100644 --- a/cmake/AgentHwTest.cmake +++ b/cmake/AgentHwTest.cmake @@ -210,8 +210,6 @@ set(hw_switch_test_srcs fboss/agent/hw/test/HwRouteTests.cpp fboss/agent/hw/test/HwTrunkTests.cpp fboss/agent/hw/test/HwVlanTests.cpp - fboss/agent/hw/test/HwAclMatchActionsTests.cpp - fboss/agent/hw/test/HwAclQualifierTests.cpp fboss/agent/hw/test/HwVerifyPfcConfigInHwTest.cpp fboss/agent/hw/test/HwAclStatTests.cpp fboss/agent/hw/test/HwPortTests.cpp diff --git a/fboss/agent/hw/test/BUCK b/fboss/agent/hw/test/BUCK index 58ddacf5482fa..7d33b26be1659 100644 --- a/fboss/agent/hw/test/BUCK +++ b/fboss/agent/hw/test/BUCK @@ -318,10 +318,8 @@ cpp_library( ) hw_test_common_srcs = [ - "HwAclMatchActionsTests.cpp", "HwVerifyPfcConfigInHwTest.cpp", "HwIngressBufferTests.cpp", - "HwAclQualifierTests.cpp", "HwAclStatTests.cpp", "HwPortTests.cpp", "HwTestFabricUtils.cpp", diff --git a/fboss/agent/hw/test/HwAclMatchActionsTests.cpp b/fboss/agent/hw/test/HwAclMatchActionsTests.cpp deleted file mode 100644 index b8ff83364c802..0000000000000 --- a/fboss/agent/hw/test/HwAclMatchActionsTests.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2004-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#include "fboss/agent/gen-cpp2/switch_config_types.h" -#include "fboss/agent/hw/test/ConfigFactory.h" -#include "fboss/agent/hw/test/HwTest.h" -#include "fboss/agent/hw/test/HwTestAclUtils.h" -#include "fboss/agent/state/SwitchState.h" -#include "fboss/agent/test/utils/QueuePerHostTestUtils.h" -#include "fboss/agent/test/utils/TrafficPolicyTestUtils.h" - -#include - -using namespace facebook::fboss; - -namespace { - -void popOneMatchToAction(cfg::SwitchConfig* config) { - config->dataPlaneTrafficPolicy()->matchToAction()->pop_back(); -} -void checkSwActionDscpValue( - std::shared_ptr state, - const std::string& aclName, - int32_t dscpValue) { - auto acl = utility::getAclEntryByName(state, aclName); - ASSERT_TRUE(acl->getAclAction()); - ASSERT_TRUE(acl->getAclAction()->cref()); - ASSERT_EQ( - acl->getAclAction() - ->cref() - ->cref() - ->cref(), - dscpValue); -} -void addSetDscpAction( - cfg::SwitchConfig* config, - const std::string& matcherName, - int32_t dscpValue) { - cfg::SetDscpMatchAction setDscpMatchAction; - *setDscpMatchAction.dscpValue() = dscpValue; - cfg::MatchAction matchAction = cfg::MatchAction(); - matchAction.setDscp() = setDscpMatchAction; - utility::addMatcher(config, matcherName, matchAction); -} -} // namespace - -namespace facebook::fboss { - -class HwAclMatchActionsTest : public HwTest { - protected: - void SetUp() override { - HwTest::SetUp(); - /* - * Native SDK does not support multi acl feature. - * So skip multi acl tests for fake bcm sdk - */ - if ((this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_FAKE) && - (FLAGS_enable_acl_table_group)) { - GTEST_SKIP(); - } - } - - cfg::SwitchConfig initialConfig() const { - auto cfg = utility::onePortPerInterfaceConfig( - getHwSwitch(), - masterLogicalPortIds(), - getAsic()->desiredLoopbackModes()); - if (FLAGS_enable_acl_table_group) { - utility::addAclTableGroup( - &cfg, cfg::AclStage::INGRESS, utility::getAclTableGroupName()); - utility::addDefaultAclTable(cfg); - } - return cfg; - } -}; - -} // namespace facebook::fboss