tests: Fix code to pass shellcheck with some errors disabled

Fix the test cases to pass shellcheck with some of the errors
disable.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
121 files changed