diff options
| author | Stanislav Fomichev <[email protected]> | 2024-08-02 00:03:09 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-08-02 23:09:27 +0000 |
| commit | a48395f22b8c8687ceb77ae3014a0eabcd4bf688 (patch) | |
| tree | decf9725c053bbcc7dbf386721c5508eb60abf55 /tools/testing/selftests/drivers/net/hw/pp_alloc_fail.py | |
| parent | selftests: net: ksft: support marking tests as disruptive (diff) | |
| download | kernel-a48395f22b8c8687ceb77ae3014a0eabcd4bf688.tar.gz kernel-a48395f22b8c8687ceb77ae3014a0eabcd4bf688.zip | |
selftests: net: ksft: replace 95 with errno.EOPNOTSUPP
Petr suggested to use errno.EOPNOTSUPP instead of hard-coded 95
in the new test case. Adjust existing ones to match this style.
Signed-off-by: Stanislav Fomichev <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/drivers/net/hw/pp_alloc_fail.py')
| -rwxr-xr-x | tools/testing/selftests/drivers/net/hw/pp_alloc_fail.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/drivers/net/hw/pp_alloc_fail.py b/tools/testing/selftests/drivers/net/hw/pp_alloc_fail.py index 026d98976c35..05b6fbb3fcdd 100755 --- a/tools/testing/selftests/drivers/net/hw/pp_alloc_fail.py +++ b/tools/testing/selftests/drivers/net/hw/pp_alloc_fail.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0 +import errno import time import os from lib.py import ksft_run, ksft_exit, ksft_pr @@ -61,7 +62,7 @@ def test_pp_alloc(cfg, netdevnl): try: stats = get_stats() except NlError as e: - if e.nl_msg.error == -95: + if e.nl_msg.error == -errno.EOPNOTSUPP: stats = {} else: raise |
