tst_net.sh: Fix unintended tst_require_root call in shell new API
PATCH 1/1 tst_net.sh: Fix unintended tst_require_root call in shell new API
for cases where tst_require_root_ is called by root (by evaluating ||):/opt/ltp/testcases/bin/tst_net.sh: line 102: tst_require_root: command not found
NOTE: 4552972e5 ("tst_test.sh: Always return 0 from _tst_require_root()") was intended to fix it, but it didn't.
Fixes 8722680b6 ("tst_net.sh: Use _tst_require_root instead of TST_NEEDS_ROOT=1")
Signed-off-by Petr Vorel <[email protected]>
---
Hi,
sorry for useless 4552972e5 commit.
Kind regards,
Petr
testcases/lib/tst_net.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
testcases/lib/tst_net.sh +5 -1
@@ -99,7 +99,11 @@ tst_brk_() } tst_require_root_() { - [ -z "$TST_USE_LEGACY_API" ] && _tst_require_root || tst_require_root + if [ -z "$TST_USE_LEGACY_API" ]; then + _tst_require_root + else + tst_require_root + fi } init_ltp_netspace()
Signature · 1 line
2.22.1