From: Jakub Kicinski Date: Sat, 27 Sep 2025 00:54:36 +0000 (-0700) Subject: Merge branch 'selftests-mark-auto-deferring-functions-clearly' X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1493c18fe8696bfc758a97130a485fc4e08387f5;p=users%2Fhch%2Fmisc.git Merge branch 'selftests-mark-auto-deferring-functions-clearly' Petr Machata says: ==================== selftests: Mark auto-deferring functions clearly selftests/net/lib.sh contains a suite of iproute2 wrappers that automatically schedule the corresponding cleanup through defer. The fact they do so is however not immediately obvious, one needs to know which functions are handling the deferral behind the scenes, and which expect the caller to handle cleanups themselves. A convention for these auto-deferring functions would help both writing and patch review. This patchset does so by marking these functions with an adf_ prefix. We already have a few such functions: forwarding/lib.sh has adf_mcd_start() and a few selftests add private helpers that conform to this convention. Patches #1 to #8 gradually convert individual functions, one per patch. Patch #9 renames an auto-deferring private helpers named dfr_* to adf_*. The plan is not to retro-rename all private helpers, but I happened to know about this one. Patches #10 to #12 introduce several autodefer helpers for commonly used forwarding/lib.sh functions, and opportunistically convert straightforward instances of 'action; defer counteraction' to the new helpers. Patch #13 adds some README verbiage to pitch defer and the adf_* convention. ==================== Link: https://patch.msgid.link/cover.1758821127.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski --- 1493c18fe8696bfc758a97130a485fc4e08387f5