From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] new shell library
Date: Wed, 12 Oct 2016 10:54:44 -0400 (EDT) [thread overview]
Message-ID: <1527497475.514457.1476284084454.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20161012131726.GC24231@rei.lan>
----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it
> Sent: Wednesday, 12 October, 2016 3:17:26 PM
> Subject: Re: [LTP] new shell library
>
> Hi!
> > What about greping the test source as in [2] instead? Because that way
> > we can print error if the test source touches any of the internally used
> > variables as well. For instance if it tries to do anything with
> > TST_PASS/TST_FAIL/...
True.
>
> What about this one:
>
> https://github.com/metan-ucw/ltp/commit/445e3ae253bdd11f18ec12ccc74fe99eb582eeb6
Looks OK, chances of someone making MYTST_VARIABLE is quite small,
and we can always improve that regex if needed.
Couple notes:
- these seem to be missing: TST_DEVICE, TST_MODPATH, TST_CHECKPOINT_*, TST_NEEDS_CHECKPOINTS
- doc page mentions "TST_NEEDS_CMD" and "TST_NEEDS_CMDS", the latter looks like typo.
Regards,
Jan
>
> $ cat d.sh
>
> #!/bin/sh
> TST_ID="test"
> TST_TESTFUNC=do_test
> . tst_test.sh
>
> do_test()
> {
> tst_res TPASS "Passed"
>
> TST_FOO=1
>
> echo "$TST_PASS"
> }
>
> tst_run
>
> # PATH is set to contain both path to tst_test.sh and d.sh
> $ ./d.sh
> test 1 TWARN : Reserved variable TST_FOO used!
> test 1 TWARN : Reserved variable TST_PASS used!
> test 1 TPASS : Passed
> 1
>
> Summary:
> passed 1
> failed 0
> skipped 0
> warnings 2
>
> --
> Cyril Hrubis
> chrubis@suse.cz
>
next prev parent reply other threads:[~2016-10-12 14:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-03 14:58 [LTP] new shell library Cyril Hrubis
2016-10-04 8:23 ` Jan Stancek
2016-10-04 8:45 ` Cyril Hrubis
2016-10-04 9:02 ` Jan Stancek
2016-10-04 9:35 ` Cyril Hrubis
2016-10-04 9:54 ` Jan Stancek
2016-10-04 11:50 ` Cyril Hrubis
2016-10-12 10:08 ` Cyril Hrubis
2016-10-12 10:32 ` Jan Stancek
2016-10-12 12:36 ` Cyril Hrubis
2016-10-12 13:17 ` Cyril Hrubis
2016-10-12 14:54 ` Jan Stancek [this message]
2016-10-12 15:06 ` Cyril Hrubis
2016-10-13 15:43 ` Cyril Hrubis
2016-10-27 14:58 ` Cyril Hrubis
2016-10-31 10:03 ` Jan Stancek
2016-10-31 10:39 ` Cyril Hrubis
2016-11-14 13:12 ` Cyril Hrubis
2016-11-22 6:50 ` Cyril Hrubis
2016-11-22 7:54 ` Jan Stancek
2016-11-22 8:02 ` Cyril Hrubis
2016-11-22 10:47 ` Jan Stancek
2016-11-22 11:21 ` Cyril Hrubis
-- strict thread matches above, loose matches on Subject: below --
2016-11-22 12:20 Jan Stancek
2016-11-22 13:27 ` Cyril Hrubis
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=1527497475.514457.1476284084454.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.