public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH v5 2/5] tst_test.sh: Warn about using "private" variable or function
Date: Thu, 31 May 2018 07:55:51 +0200	[thread overview]
Message-ID: <20180531055551.GA3369@x230> (raw)
In-Reply-To: <9c849736-05c7-5725-f436-3c252988784a@oracle.com>

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

  reply	other threads:[~2018-05-31  5:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 21:57 [LTP] [RFC PATCH v5 0/5] tst_test.sh: Add TST_TEST_DATA and TST_TEST_DATA_IFS + cleanup Petr Vorel
2018-05-25 21:57 ` [LTP] [RFC PATCH v5 1/5] tst_test.sh: Hide "private" variables with "_tst_" prefix Petr Vorel
2018-05-25 21:57 ` [LTP] [RFC PATCH v5 2/5] tst_test.sh: Warn about using "private" variable or function Petr Vorel
2018-05-30 15:47   ` Alexey Kodanev
2018-05-31  5:55     ` Petr Vorel [this message]
2018-05-25 21:57 ` [LTP] [RFC PATCH v5 3/5] tst_test.sh: Filter out commented out lines from warnings Petr Vorel
2018-05-25 21:57 ` [LTP] [RFC PATCH v5 4/5] tst_test.sh: s/resm/res/ Petr Vorel
2018-05-25 21:57 ` [LTP] [RFC PATCH v5 5/5] tst_test.sh: Add TST_TEST_DATA and TST_TEST_DATA_IFS Petr Vorel
2018-05-30 15:54   ` Alexey Kodanev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180531055551.GA3369@x230 \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox