Skip to content

Commit

Permalink
Merge pull request autotest#5532 from yalzhang/fix_coalesece
Browse files Browse the repository at this point in the history
Update the check about coalesce
  • Loading branch information
chloerh authored May 31, 2024
2 parents a3baa54 + bb53ea1 commit ea2e9cc
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ def check_coalesce_rx_frames(tap_device, rx_frames, test):
"""
coal_params = network_base.get_ethtool_coalesce(tap_device)
LOG.debug(f'coalesce parameters from ethtool: {coal_params}')
coal_rx_frames = coal_params.get('rx-frames')
coal_rx_frames = str(coal_params.get('rx-frames')).strip()
if coal_rx_frames != rx_frames:
test.fail(f'rx-frames of {tap_device} should be {rx_frames}, '
f'not {coal_rx_frames}')
if rx_frames == '0' and coal_rx_frames == 'n/a':
LOG.debug("The expected value is 0, but got n/a, which is "
"also acceptable.")
else:
test.fail(f'rx-frames of {tap_device} should be {rx_frames}, '
f'not {coal_rx_frames}')


def run(test, params, env):
Expand Down

0 comments on commit ea2e9cc

Please sign in to comment.