diff options
| author | Peter Seiderer <[email protected]> | 2025-02-19 08:45:25 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-02-21 01:24:56 +0000 |
| commit | 1c3bc2c325f89e21f52af4a5c940ed1d89e05229 (patch) | |
| tree | 68c81cc90379a485bf3ce6466f6889c93b64f993 /tools/testing/selftests/net/lib/py/utils.py | |
| parent | net: pktgen: fix 'rate 0' error handling (return -EINVAL) (diff) | |
| download | kernel-1c3bc2c325f89e21f52af4a5c940ed1d89e05229.tar.gz kernel-1c3bc2c325f89e21f52af4a5c940ed1d89e05229.zip | |
net: pktgen: fix 'ratep 0' error handling (return -EINVAL)
Given an invalid 'ratep' command e.g. 'ratep 0' the return value is '1',
leading to the following misleading output:
- the good case
$ echo "ratep 100" > /proc/net/pktgen/lo\@0
$ grep "Result:" /proc/net/pktgen/lo\@0
Result: OK: ratep=100
- the bad case (before the patch)
$ echo "ratep 0" > /proc/net/pktgen/lo\@0"
-bash: echo: write error: Invalid argument
$ grep "Result:" /proc/net/pktgen/lo\@0
Result: No such parameter "atep"
- with patch applied
$ echo "ratep 0" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Invalid argument
$ grep "Result:" /proc/net/pktgen/lo\@0
Result: Idle
Signed-off-by: Peter Seiderer <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions
