summaryrefslogtreecommitdiff
path: root/rust/helpers/platform.c
diff options
context:
space:
mode:
authorPetr Machata <petrm@nvidia.com>2025-09-04 19:07:26 +0200
committerJakub Kicinski <kuba@kernel.org>2025-09-11 19:02:51 -0700
commitfa57032941d4b451c7264ebf3ad595bc98e3a9a9 (patch)
tree946072fc135faa6b5b2c43519ab62626a291ea43 /rust/helpers/platform.c
parented07c8f2b854e2d0c76ed95de7452fa5c0a3d4c5 (diff)
selftests: net: lib.sh: Don't defer failed commands
Usually the autodefer helpers in lib.sh are expected to be run in context where success is the expected outcome. However when using them for feature detection, failure can legitimately occur. But the failed command still schedules a cleanup, which will likely fail again. Instead, only schedule deferred cleanup when the positive command succeeds. This way of organizing the cleanup has the added benefit that now the return code from these functions reflects whether the command passed. Signed-off-by: Petr Machata <petrm@nvidia.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/af10a5bb82ea11ead978cf903550089e006d7e70.1757004393.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/platform.c')
0 files changed, 0 insertions, 0 deletions