[Skiboot] [PATCH 1/2] test/hello_world: Fix some corner cases in test script

Joel Stanley joel at jms.id.au
Thu Dec 18 11:56:04 AEDT 2014

The test for expect would always return true. This change makes it do
the correct thing in the presence and absence of expect on my Ubuntu

Also, skip the test if the user has KERNEL set. With this set skiboot
contains an embedded kernel, and will load that before falling back to
our hello_world test kernel, causing all kinds of confusion.

Signed-off-by: Joel Stanley <joel at jms.id.au>
 test/hello_world/run_hello_world.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/hello_world/run_hello_world.sh b/test/hello_world/run_hello_world.sh
index dcb79a8..f72c402 100755
--- a/test/hello_world/run_hello_world.sh
+++ b/test/hello_world/run_hello_world.sh
@@ -14,7 +14,12 @@ if [ ! -x "$MAMBO_PATH/$MAMBO_BINARY" ]; then
     exit 0;
-if [ ! -x `which expect` ]; then
+if [ -n "$KERNEL" ]; then
+    echo 'Please rebuild skiboot without KERNEL set. Skipping hello_world test';
+    exit 0;
+if [ ! `command -v expect` ]; then
     echo 'Could not find expect binary. Skipping hello_world test';
     exit 0;

More information about the Skiboot mailing list