Re: [PATCH v2 1/8] evmtest: Regression testing integrity subsystem
From: Petr Vorel
Date: Fri Mar 22 2019 - 08:18:56 EST
Hi David,
> $ evmtest runtest example_test -e /bin/bash
> [*] Starting test: example_test
> [*] TEST: PASSED
> Example 1a: successful verbose example test output
> $ evmtest runtest example_test -e /bin/bash -v
...
> Changelog:
...
> * checkbashishms compliant
Not yet :). I noticed using
source (should be .)
== (should be =)
${BASH_SOURCE[0]} (should be $0)
$UID (should be $(id -u)
bash redirection &>> (should be >/dev/null 2>&1)
+= (should be VAR="${VAR}foo")
and bash shebang.
Could you please fix that?
...
> +++ b/evmtest/evmtest
> @@ -0,0 +1,67 @@
> +#!/bin/bash
Can we, please, use /bin/sh and not-expect bash?
Portability matters.
> +source "$EVMDIR"/files/common.sh
> +usage (){
> + echo "Usage:"
> + echo " evmtest runtest <test name> [OPTIONS]"
> + echo ""
Can be just echo. Maybe using cat might be better than many echos:
cat <<EOF
Usage:
\tevmtest runtest <test name> [OPTIONS]
...
EOF
Kind regards,
Petr