diff mbox series

[RFC,3/9] testcases: file: Add TST_NEEDS_CMDS on readelf

Message ID 20180423094639.14612-4-mylene.josserand@bootlin.com
State Accepted
Delegated to: Cyril Hrubis
Headers show
Series testcases: small improvements with TCONF | expand

Commit Message

Mylène Josserand April 23, 2018, 9:46 a.m. UTC
This test is using "readelf" binary that can be
unavailable on the system.
Instead of failing, it should return a TCONF.

This is what this commit is doing by adding "readelf"
in TST_NEEDS_CMDS macro.

Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com>
---
 testcases/commands/file/file01.sh | 2 ++
 1 file changed, 2 insertions(+)

Comments

Petr Vorel May 16, 2018, 9:34 a.m. UTC | #1
Hi Mylène,

> This test is using "readelf" binary that can be
> unavailable on the system.
> Instead of failing, it should return a TCONF.

> This is what this commit is doing by adding "readelf"
> in TST_NEEDS_CMDS macro.

> Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com>
> ---
>  testcases/commands/file/file01.sh | 2 ++
>  1 file changed, 2 insertions(+)

> diff --git a/testcases/commands/file/file01.sh b/testcases/commands/file/file01.sh
> index e04b32e86..b72760e9f 100755
> --- a/testcases/commands/file/file01.sh
> +++ b/testcases/commands/file/file01.sh
> @@ -28,6 +28,8 @@ TST_CNT=20
>  TST_SETUP=setup
>  TST_TESTFUNC=do_test
>  TST_NEEDS_TMPDIR=1
> +TST_NEEDS_CMDS="readelf"
> +
>  . tst_test.sh

>  setup()

Pushed, thanks!


Kind regards,
Petr
diff mbox series

Patch

diff --git a/testcases/commands/file/file01.sh b/testcases/commands/file/file01.sh
index e04b32e86..b72760e9f 100755
--- a/testcases/commands/file/file01.sh
+++ b/testcases/commands/file/file01.sh
@@ -28,6 +28,8 @@  TST_CNT=20
 TST_SETUP=setup
 TST_TESTFUNC=do_test
 TST_NEEDS_TMPDIR=1
+TST_NEEDS_CMDS="readelf"
+
 . tst_test.sh
 
 setup()