Message ID | 20180525215725.7218-3-pvorel@suse.cz |
---|---|
State | Superseded |
Delegated to: | Cyril Hrubis |
Headers | show |
Series | tst_test.sh: Add TST_TEST_DATA and TST_TEST_DATA_IFS + cleanup | expand |
On 26.05.2018 00:57, Petr Vorel wrote: > 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!" Hi Petr, For example "do_virt_dev_tst_01()" function name in the test, it is also a private function name? > + done > fi > > OPTIND=1 >
Hi Alexey, ... > > + 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!" > Hi Petr, > For example "do_virt_dev_tst_01()" function name in the test, it is > also a private function name? No, the goal was to separate library names (e.g. anything in tst_test.sh) from test itself. I.e. we can use any name in test, just avoid using namespace _tst_ (or TST_ except doing the setup itself. Kind regards, Petr
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
Signed-off-by: Petr Vorel <pvorel@suse.cz> --- testcases/lib/tst_test.sh | 4 ++++ 1 file changed, 4 insertions(+)