Message ID | 20210224084800.34528-2-po-hsu.lin@canonical.com |
---|---|
State | New |
Headers | show |
Series | selftests/powerpc: Make the test check in eeh-basic.sh posix compliant | expand |
On 24.02.21 09:48, Po-Hsu Lin wrote: > BugLink: https://bugs.launchpad.net/bugs/1909428 > > The == operand is a bash extension, thus this will fail on Ubuntu > with: > ./eeh-basic.sh: 89: test: 2: unexpected operator > > As the /bin/sh on Ubuntu is pointed to DASH. > > Use -eq to fix this posix compatibility issue. > > Fixes: 996f9e0f93f162 ("selftests/powerpc: Fix eeh-basic.sh exit codes") > Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com> > Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com> > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> > Link: https://lore.kernel.org/r/20201228043459.14281-1-po-hsu.lin@canonical.com Hi Sam, Can you please resend with the additional information on the provenance block: "(cherry-picket/backported from...)" and your s-o-b (this is needed again for the ML submission)? Thanks, Kleber > --- > tools/testing/selftests/powerpc/eeh/eeh-basic.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/powerpc/eeh/eeh-basic.sh b/tools/testing/selftests/powerpc/eeh/eeh-basic.sh > index cf001a2c6942..7c2cb04569da 100755 > --- a/tools/testing/selftests/powerpc/eeh/eeh-basic.sh > +++ b/tools/testing/selftests/powerpc/eeh/eeh-basic.sh > @@ -81,5 +81,5 @@ echo "$failed devices failed to recover ($dev_count tested)" > lspci | diff -u $pre_lspci - > rm -f $pre_lspci > > -test "$failed" == 0 > +test "$failed" -eq 0 > exit $? >
diff --git a/tools/testing/selftests/powerpc/eeh/eeh-basic.sh b/tools/testing/selftests/powerpc/eeh/eeh-basic.sh index cf001a2c6942..7c2cb04569da 100755 --- a/tools/testing/selftests/powerpc/eeh/eeh-basic.sh +++ b/tools/testing/selftests/powerpc/eeh/eeh-basic.sh @@ -81,5 +81,5 @@ echo "$failed devices failed to recover ($dev_count tested)" lspci | diff -u $pre_lspci - rm -f $pre_lspci -test "$failed" == 0 +test "$failed" -eq 0 exit $?