[LTP] [RFC PATCH v5 2/5] tst_test.sh: Warn about using "private" variable or function
Petr Vorel
pvorel@suse.cz
Fri May 25 23:57:22 CEST 2018
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/lib/tst_test.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
index 337d33ca4..de5d65039 100644
--- a/testcases/lib/tst_test.sh
+++ b/testcases/lib/tst_test.sh
@@ -260,6 +260,10 @@ tst_run()
*) tst_res TWARN "Reserved variable TST_$_tst_i used!";;
esac
done
+
+ for _tst_i in $(grep _tst_ "$TST_TEST_PATH" | sed 's/.*_tst_//; s/[="} \t\/:`].*//'); do
+ tst_res TWARN "Private variable or function _tst_$_tst_i used!"
+ done
fi
OPTIND=1
--
2.16.3
More information about the ltp
mailing list