diff --git a/tests/common/helpers/thermal_control_test_helper.py b/tests/common/helpers/thermal_control_test_helper.py index 9f1dab9e214..d747c1246d5 100644 --- a/tests/common/helpers/thermal_control_test_helper.py +++ b/tests/common/helpers/thermal_control_test_helper.py @@ -284,18 +284,9 @@ def restart_thermal_control_daemon(dut): output = dut.shell(find_thermalctld_pid_cmd) assert output["rc"] == 0, "Run command '{}' failed".format(find_thermalctld_pid_cmd) - # Usually there should be 2 thermalctld processes, but there is chance that - # sonic platform API might use subprocess which creates extra thermalctld process. - # For example, chassis.get_all_sfps will call sfp constructor, and sfp constructor may - # use subprocess to call ethtool to do initialization. - # So we check here thermalcltd must have at least 2 processes. - # For mellanox, it has at least two processes, but for celestica(broadcom), # it only has one thermalctld process # For kvm, there is no thermalctld process - if dut.facts["asic_type"] == "mellanox": - assert len(output["stdout_lines"] - ) >= 2, "There should be at least 2 thermalctld process" - elif dut.facts["asic_type"] == "vs": + if dut.facts["asic_type"] == "vs": assert len(output["stdout_lines"]) == 0, "There should be 0 thermalctld process" else: assert len(output["stdout_lines"] @@ -307,12 +298,8 @@ def restart_thermal_control_daemon(dut): output = dut.shell(find_thermalctld_pid_cmd) assert output["rc"] == 0, "Run command '{}' failed after restart of thermalctld on {}".format( find_thermalctld_pid_cmd, dut.hostname) - if dut.facts["asic_type"] == "mellanox": - assert len( - output["stdout_lines"]) >= 2, "There should be at least 2 thermalctld process" - else: - assert len( - output["stdout_lines"]) >= 1, "There should be at least 1 thermalctld process" + assert len( + output["stdout_lines"]) >= 1, "There should be at least 1 thermalctld process" logging.info( "thermalctld processes restarted successfully on {}".format(dut.hostname)) return