Project

General

Profile

Bug #12025

zfs test zpool_initialize_verify_initialized fails

Added by Jason King 9 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
tests
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:

Description

The zpool_initialize_verify_initialized test fails with an error similar to:

13:33:56.69 /opt/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_verify_initialized: line 81: : cannot open

Line 81 is (with preceding lines for context):

spacemaps=0
bs=512
while read -r sm; do
        typeset offset="$(echo $sm | cut -d ' ' -f1)" 
        typeset size="$(echo $sm | cut -d ' ' -f2)" 

        spacemaps=$((spacemaps + 1))
        offset=$(((4 * 1024 * 1024) + 16#$offset))
        out=$(dd if=$SMALLFILE skip=$(($offset / $bs)) \
            count=$(($size / $bs)) bs=$bs 2>/dev/null | od -t x8 -Ad)
        echo "$out" | log_must egrep "$PATTERN|\*|$size" 
done <<< "$(zdb -p $TESTDIR -Pme $TESTPOOL | egrep 'spacemap[ ]+0 ' | \

I believe '<<<' is a bash-ism and not supporting in ksh (which these run under normally). I suspect the fix is to rewrite the test to avoid bash-isms.

Also available in: Atom PDF