Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tc-tests: Update tc police action tests for tc buffer size rounding fixes.

Before tc's recent change to fix rounding errors, several tests which
specified a burst size of "1m" would translate back to being 1048574
bytes (2b less than 1Mb). sprint_size prints this as "1024Kb".

With the tc fix, the burst size is instead correctly reported as
1048576 bytes (precisely 1Mb), which sprint_size prints as "1Mb".

This updates the expected output in the tests' matchPattern values
to accept either the old or the new output.

Signed-off-by: Jonathan Lennox <jonathan.lennox@8x8.com>
Link: https://patch.msgid.link/20250312174804.313107-1-jonathan.lennox@8x8.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Jonathan Lennox and committed by
Paolo Abeni
756f88ff d3c58b65

+5 -5
+5 -5
tools/testing/selftests/tc-testing/tc-tests/actions/police.json
··· 689 689 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m continue index 1", 690 690 "expExitCode": "0", 691 691 "verifyCmd": "$TC actions get action police index 1", 692 - "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action continue", 692 + "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst (1024Kb|1Mb) mtu 2Kb action continue", 693 693 "matchCount": "1", 694 694 "teardown": [ 695 695 "$TC actions flush action police" ··· 716 716 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m drop index 1", 717 717 "expExitCode": "0", 718 718 "verifyCmd": "$TC actions ls action police", 719 - "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action drop", 719 + "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst (1024Kb|1Mb) mtu 2Kb action drop", 720 720 "matchCount": "1", 721 721 "teardown": [ 722 722 "$TC actions flush action police" ··· 743 743 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m ok index 1", 744 744 "expExitCode": "0", 745 745 "verifyCmd": "$TC actions ls action police", 746 - "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action pass", 746 + "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst (1024Kb|1Mb) mtu 2Kb action pass", 747 747 "matchCount": "1", 748 748 "teardown": [ 749 749 "$TC actions flush action police" ··· 770 770 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m reclassify index 1", 771 771 "expExitCode": "0", 772 772 "verifyCmd": "$TC actions get action police index 1", 773 - "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action reclassify", 773 + "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst (1024Kb|1Mb) mtu 2Kb action reclassify", 774 774 "matchCount": "1", 775 775 "teardown": [ 776 776 "$TC actions flush action police" ··· 797 797 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m pipe index 1", 798 798 "expExitCode": "0", 799 799 "verifyCmd": "$TC actions ls action police", 800 - "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action pipe", 800 + "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst (1024Kb|1Mb) mtu 2Kb action pipe", 801 801 "matchCount": "1", 802 802 "teardown": [ 803 803 "$TC actions flush action police"