Skip to contentSkip to conversation

fs-test.sh: minor fixes

PATCH In review Stephen Warren 3 participants 5 messages Aug 11, 2015 – Aug 18, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs-test.sh: minor fixes

- Re-direct stderr into the log files, so any errors U-Boot emits are visible in the logs. This is relevant if the "reset" shell command attempts to report that it's not supported on the sandbox board.
- Fix test_fs_nonfs() to name the files it created differently for each invocation. Otherwise, the logs from different tests overwrite each-other.

---
 test/fs/fs-test.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
test/fs/fs-test.sh +3 -3
index a4fb0559625d..b88a67ca066d 100755
@@ -485,9 +485,9 @@ function test_fs_nonfs() {
 	echo "Creating files in $fs image if not already present."
 	create_files $IMAGE $MD5_FILE_FS
 
-	OUT_FILE="${OUT}.fs.${fs}.out"
+	OUT_FILE="${OUT}.$1.${fs}.out"
 	test_image $IMAGE $fs $SMALL_FILE $BIG_FILE $1 "" \
-		> ${OUT_FILE}
+		> ${OUT_FILE} 2>&1
 	check_results $OUT_FILE $MD5_FILE_FS $SMALL_FILE $BIG_FILE \
 		$WRITE_FILE
 	TOTAL_FAIL=$((TOTAL_FAIL + FAIL))
@@ -535,7 +535,7 @@ for fs in ext4 fat; do
 
 	OUT_FILE="${OUT}.sb.${fs}.out"
 	test_image $IMAGE $fs $SMALL_FILE $BIG_FILE sb `pwd`/$MOUNT_DIR \
-		> ${OUT_FILE}
+		> ${OUT_FILE} 2>&1
 	sudo umount "$MOUNT_DIR"
 	rmdir "$MOUNT_DIR"
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 fs-test.sh: minor fixes

Hi Stephen,

Small nitpick, just to be consistent (for that particular line), we could
use OUT_FILE="${OUT}.${1}.${fs}.out"

Best Regards

Quoted 41 lines · Stephen Warren

- Re-direct stderr into the log files, so any errors U-Boot emits are visible in the logs. This is relevant if the "reset" shell command attempts to report that it's not supported on the sandbox board.
- Fix test_fs_nonfs() to name the files it created differently for each invocation. Otherwise, the logs from different tests overwrite each-other.

---
 test/fs/fs-test.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
test/fs/fs-test.sh +3 -4
index a4fb0559625d..b88a67ca066d 100755
@@ -485,9 +485,9 @@ function test_fs_nonfs() {
        echo "Creating files in $fs image if not already present."
        create_files $IMAGE $MD5_FILE_FS
 
-       OUT_FILE="${OUT}.fs.${fs}.out"
+       OUT_FILE="${OUT}.$1.${fs}.out"
        test_image $IMAGE $fs $SMALL_FILE $BIG_FILE $1 "" \
-               > ${OUT_FILE}
+               > ${OUT_FILE} 2>&1
        check_results $OUT_FILE $MD5_FILE_FS $SMALL_FILE $BIG_FILE \
                $WRITE_FILE
        TOTAL_FAIL=$((TOTAL_FAIL + FAIL))
@@ -535,7 +535,7 @@ for fs in ext4 fat; do
 
        OUT_FILE="${OUT}.sb.${fs}.out"
        test_image $IMAGE $fs $SMALL_FILE $BIG_FILE sb `pwd`/$MOUNT_DIR \
-               > ${OUT_FILE}
+               > ${OUT_FILE} 2>&1
        sudo umount "$MOUNT_DIR"
        rmdir "$MOUNT_DIR"
 
--

1.9.1

#2 lore raw

PATCH 1/1 fs-test.sh: minor fixes

Quoted 4 lines · Suriyan Ramasami

Hi Stephen,

Small nitpick, just to be consistent (for that particular line), we
could use OUT_FILE="${OUT}.${1}.${fs}.out"

I thought about that, but that would be inconsistent with plain $1 being used everywhere else:-) Which option do you prefer?

Quoted 51 lines

<mailto:[email protected]>>

Best Regards

On Mon, Aug 10, 2015 at 9:45 PM, Stephen Warren <[email protected] <mailto:[email protected]>> wrote:

- Re-direct stderr into the log files, so any errors U-Boot emits are visible in the logs. This is relevant if the "reset" shell command attempts to report that it's not supported on the sandbox board.
- Fix test_fs_nonfs() to name the files it created differently for each invocation. Otherwise, the logs from different tests overwrite each-other.

<mailto:[email protected]>>
---
test/fs/fs-test.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/fs/fs-test.sh b/test/fs/fs-test.sh index a4fb0559625d..b88a67ca066d 100755
--- a/test/fs/fs-test.sh
+++ b/test/fs/fs-test.sh
@@ -485,9 +485,9 @@ function test_fs_nonfs() {
echo "Creating files in $fs image if not already present." create_files $IMAGE $MD5_FILE_FS

- OUT_FILE="${OUT}.fs.${fs}.out"
+ OUT_FILE="${OUT}.$1.${fs}.out"
test_image $IMAGE $fs $SMALL_FILE $BIG_FILE $1 "" \
- > ${OUT_FILE}
+ > ${OUT_FILE} 2>&1
check_results $OUT_FILE $MD5_FILE_FS $SMALL_FILE $BIG_FILE \
$WRITE_FILE
TOTAL_FAIL=$((TOTAL_FAIL + FAIL))
@@ -535,7 +535,7 @@ for fs in ext4 fat; do

OUT_FILE="${OUT}.sb.${fs}.out" test_image $IMAGE $fs $SMALL_FILE $BIG_FILE sb
pwd/$MOUNT_DIR \
- > ${OUT_FILE}
+ > ${OUT_FILE} 2>&1
sudo umount "$MOUNT_DIR"
rmdir "$MOUNT_DIR"

--
1.9.1

#3 lore raw

PATCH 1/1 fs-test.sh: minor fixes

Quoted 10 lines · Stephen Warren
Quoted 5 lines · Suriyan Ramasami

Hi Stephen,

Small nitpick, just to be consistent (for that particular line), we
could use OUT_FILE="${OUT}.${1}.${fs}.out"

I thought about that, but that would be inconsistent with plain $1 being

used everywhere else:-) Which option do you prefer?

Quoted 1 line

Now, that you point that out. I am OK with your version. Thanks!

Quoted 6 lines
Quoted 6 lines

<mailto:[email protected]>>

Best Regards

Quoted 7 lines
Quoted 7 lines

On Mon, Aug 10, 2015 at 9:45 PM, Stephen Warren <[email protected] <mailto:[email protected]>> wrote:

- Re-direct stderr into the log files, so any errors U-Boot emits are visible in the logs. This is relevant if the "reset" shell command attempts to report that it's not supported on the sandbox board.
- Fix test_fs_nonfs() to name the files it created differently for

each

Quoted 41 lines
Quoted 40 lines
       invocation. Otherwise, the logs from different tests overwrite
       each-other.

    Signed-off-by: Stephen Warren <[email protected]
    <mailto:[email protected]>>

    ---
      test/fs/fs-test.sh | 6 +++---
      1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/test/fs/fs-test.sh b/test/fs/fs-test.sh
    index a4fb0559625d..b88a67ca066d 100755
    --- a/test/fs/fs-test.sh
    +++ b/test/fs/fs-test.sh
    @@ -485,9 +485,9 @@ function test_fs_nonfs() {
             echo "Creating files in $fs image if not already present."
             create_files $IMAGE $MD5_FILE_FS

    -       OUT_FILE="${OUT}.fs.${fs}.out"
    +       OUT_FILE="${OUT}.$1.${fs}.out"
             test_image $IMAGE $fs $SMALL_FILE $BIG_FILE $1 "" \
    -               > ${OUT_FILE}
    +               > ${OUT_FILE} 2>&1
             check_results $OUT_FILE $MD5_FILE_FS $SMALL_FILE $BIG_FILE \
                     $WRITE_FILE
             TOTAL_FAIL=$((TOTAL_FAIL + FAIL))
    @@ -535,7 +535,7 @@ for fs in ext4 fat; do

             OUT_FILE="${OUT}.sb.${fs}.out"
             test_image $IMAGE $fs $SMALL_FILE $BIG_FILE sb
    `pwd`/$MOUNT_DIR \
    -               > ${OUT_FILE}
    +               > ${OUT_FILE} 2>&1
             sudo umount "$MOUNT_DIR"
             rmdir "$MOUNT_DIR"

    --
    1.9.1
#4 lore raw
In reply to Stephen Warren
Quoted 9 lines · Stephen Warren

- Re-direct stderr into the log files, so any errors U-Boot emits are visible in the logs. This is relevant if the "reset" shell command attempts to report that it's not supported on the sandbox board.
- Fix test_fs_nonfs() to name the files it created differently for each invocation. Otherwise, the logs from different tests overwrite each-other.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150818/4e1243eb/attachment.sig>