Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed command /usr/bin/thermalctld to /usr/local/bin/thermalctld in platform test #3178

Merged
merged 3 commits into from
May 12, 2021

Conversation

andriyz-nv
Copy link
Contributor

Description of PR

Fixed command /usr/bin/thermalctld to /usr/local/bin/thermalctld
The file path was changed in bellow pull request, but tests in
sonic-mgmt were not updated, after that PR was merged
sonic-net/sonic-buildimage#6176

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • [x ] Test case(new/improvement)

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Executed test, test passed without
_fan_log_supported = {'stderr_lines': [u'grep: /usr/bin/thermalctld: No such file or directory'], u...: [], u'start': u'2021-03-17 21:37:36.289661', u'msg': u'non-zero return code'}

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

The file path was changed in bellow pull request, but tests in
sonic-mgmt were not updated, after that PR was merged
sonic-net/sonic-buildimage#6176
@@ -439,7 +439,7 @@ def test_thermal_control_fan_status(duthosts, rand_one_dut_hostname, mocker_fact
single_fan_mocker = mocker_factory(duthost, 'SingleFanMocker')
time.sleep(THERMAL_CONTROL_TEST_WAIT_TIME)

_fan_log_supported = duthost.command('docker exec pmon grep -E "{}" /usr/bin/thermalctld'\
_fan_log_supported = duthost.command('docker exec pmon grep -E "{}" /usr/local/bin/thermalctld'\
Copy link
Contributor

@jleveque jleveque Mar 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching and fixing! However, these tests are expected to run on older versions of SONiC, before the path was changed. Thus I suggest something like the following:

        if "201811" in duthost.os_version or "201911" in duthost.os_version:
            THERMALCTLD_PATH = '/usr/bin/thermalctld'
        else:
            THERMALCTLD_PATH = '/usr/local/bin/thermalctld'

        _fan_log_supported = duthost.command('docker exec pmon grep -E "{}" {}'
                .format(LOG_EXPECT_INSUFFICIENT_FAN_NUM_RE, THERMALCTLD_PATH), module_ignore_errors=True)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jleveque
Can you please review new

@wangxin
Copy link
Collaborator

wangxin commented Apr 9, 2021

@andriyz-nv, Can you address the review comments?

Copy link
Contributor Author

@andriyz-nv andriyz-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jleveque I fixed according to your comments

@andriyz-nv
Copy link
Contributor Author

@wangxin can you please review?

@wangxin wangxin merged commit 5e841a1 into sonic-net:master May 12, 2021
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
…latform test (sonic-net#3178)

The file path was changed in bellow pull request, but tests in
sonic-mgmt were not updated, after that PR was merged
sonic-net/sonic-buildimage#6176
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants