Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -921,13 +921,6 @@ ntp/test_ntp.py::test_ntp:
conditions:
- https://github.com/sonic-net/sonic-buildimage/issues/19425

ntp/test_ntp.py::test_ntp_long_jump_disabled:
# Due to NTP code bug, long jump will still happen after disable it.
# Set xfail flag for this test case
xfail:
strict: True
reason: "Known NTP bug"

#######################################
##### pc #####
#######################################
Expand Down
8 changes: 4 additions & 4 deletions tests/ntp/test_ntp.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def config_long_jump(duthost, enable=False):
regex = "s/NTPD_OPTS='-g'/NTPD_OPTS='-x'/"

if using_ntpsec:
duthost.command("sed -i '%s' /etc/default/ntpsec" % regex)
duthost.command("sudo sed -i '%s' /etc/default/ntpsec" % regex)
else:
duthost.command("sed -i %s /etc/default/ntp" % regex)
duthost.command("sudo sed -i %s /etc/default/ntp" % regex)
duthost.service(name='ntp', state='restarted')


Expand Down Expand Up @@ -146,8 +146,8 @@ def test_ntp_long_jump_disabled(duthosts, rand_one_dut_hostname, setup_ntp, setu

config_long_jump(duthost, enable=False)

if wait_until(720, 10, 0, check_ntp_status, duthost):
pytest.fail("NTP long jump disable failed")
pytest_assert(wait_until(720, 10, 0, check_ntp_status, duthost),
"NTP long jump disable failed")


def run_ntp(duthosts, rand_one_dut_hostname, setup_ntp):
Expand Down