From: "Pali Rohár" <pali@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH 4/6] Nokia RX-51: Update test script
Date: Sat, 31 Oct 2020 17:32:48 +0100 [thread overview]
Message-ID: <20201031163250.14866-4-pali@kernel.org> (raw)
In-Reply-To: <20201031163250.14866-1-pali@kernel.org>
Include emmc/nand suffix into bootmenu script names and fix leaking sleep
processes when asynchronously waiting for them. 'wait -n' is not provided
by /bin/sh, so run script under bash.
Signed-off-by: Pali Roh?r <pali@kernel.org>
---
test/nokia_rx51_test.sh | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/test/nokia_rx51_test.sh b/test/nokia_rx51_test.sh
index b17542b8c1..23fa935310 100755
--- a/test/nokia_rx51_test.sh
+++ b/test/nokia_rx51_test.sh
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
# SPDX-License-Identifier: GPL-2.0+
# (C) 2020 Pali Roh?r <pali@kernel.org>
@@ -157,7 +157,7 @@ setenv bootmenu_1;
setenv bootmenu_delay 1;
setenv bootdelay 1;
EOF
-./mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n bootmenu -d bootmenu_emmc bootmenu_emmc.scr
+./mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n bootmenu_emmc -d bootmenu_emmc bootmenu_emmc.scr
# Generate bootmenu for OneNAND booting
cat > bootmenu_nand << EOF
@@ -166,7 +166,7 @@ setenv bootmenu_1;
setenv bootmenu_delay 1;
setenv bootdelay 1;
EOF
-./mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n bootmenu -d bootmenu_nand bootmenu_nand.scr
+./mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n bootmenu_nand -d bootmenu_nand bootmenu_nand.scr
# Generate combined image from u-boot and Maemo fiasco kernel
dd if=kernel_2.6.28/boot/zImage-2.6.28-20103103+0m5.fiasco of=zImage-2.6.28-omap1 skip=95 bs=1
@@ -214,10 +214,11 @@ rm -f qemu_ram.log
qemu_pid=$!
tail -F qemu_ram.log &
tail_pid=$!
-{ sleep 300 || true; kill -9 $qemu_pid $tail_pid 2>/dev/null || true; } &
+sleep 300 &
sleep_pid=$!
-wait $qemu_pid || true
-kill -9 $tail_pid $sleep_pid 2>/dev/null || true
+wait -n $sleep_pid $qemu_pid || true
+kill -9 $tail_pid $sleep_pid $qemu_pid 2>/dev/null || true
+wait || true
# Run MTD image in qemu and wait for 300s if kernel from eMMC is correctly booted
rm -f qemu_emmc.log
@@ -225,10 +226,11 @@ rm -f qemu_emmc.log
qemu_pid=$!
tail -F qemu_emmc.log &
tail_pid=$!
-{ sleep 300 || true; kill -9 $qemu_pid $tail_pid 2>/dev/null || true; } &
+sleep 300 &
sleep_pid=$!
-wait $qemu_pid || true
-kill -9 $tail_pid $sleep_pid 2>/dev/null || true
+wait -n $sleep_pid $qemu_pid || true
+kill -9 $tail_pid $sleep_pid $qemu_pid 2>/dev/null || true
+wait || true
# Run MTD image in qemu and wait for 300s if kernel from OneNAND is correctly booted
rm -f qemu_nand.log
@@ -236,10 +238,11 @@ rm -f qemu_nand.log
qemu_pid=$!
tail -F qemu_nand.log &
tail_pid=$!
-{ sleep 300 || true; kill -9 $qemu_pid $tail_pid 2>/dev/null || true; } &
+sleep 300 &
sleep_pid=$!
-wait $qemu_pid || true
-kill -9 $tail_pid $sleep_pid 2>/dev/null || true
+wait -n $sleep_pid $qemu_pid || true
+kill -9 $tail_pid $sleep_pid $qemu_pid 2>/dev/null || true
+wait || true
echo
echo "============================="
--
2.20.1
next prev parent reply other threads:[~2020-10-31 16:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 16:32 [PATCH 1/6] Nokia RX-51: Remove old comments from configs/nokia_rx51.h file Pali Rohár
2020-10-31 16:32 ` [PATCH 2/6] Nokia RX-51: Fix crashing in U-Boot mmc function omap_hsmmc_stop_clock() Pali Rohár
2020-10-31 16:32 ` [PATCH 3/6] Nokia RX-51: During init disable lp5523 led instead of resetting it Pali Rohár
2020-10-31 16:32 ` Pali Rohár [this message]
2020-10-31 16:32 ` [PATCH 5/6] Nokia RX-51: Make onenand working Pali Rohár
2020-10-31 16:32 ` [PATCH 6/6] mtd: OneNAND: Set MTD type Pali Rohár
2020-11-15 10:05 ` [PATCH 1/6] Nokia RX-51: Remove old comments from configs/nokia_rx51.h file Lokesh Vutla
2020-11-15 12:06 ` Pali Rohár
2020-11-16 3:27 ` Lokesh Vutla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201031163250.14866-4-pali@kernel.org \
--to=pali@kernel.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.