diff --git a/tests/misc/printf-surprise b/tests/misc/printf-surprise index dd3c332bb..3336f12a5 100755 --- a/tests/misc/printf-surprise +++ b/tests/misc/printf-surprise @@ -61,9 +61,14 @@ exit=$? # Map this longer, and rarer, diagnostic to the common one. # printf: cannot perform formatted output: Cannot allocate memory" \ sed 's/cannot perform .*/write error/' err-msg > k && mv k err-msg -err_msg=$(cat err-msg) +err_msg=$(cat err-msg|tr '\n' :) + +# By some bug, on Solaris 11 (5.11 snv_86), err_msg ends up +# containing '1> fifo:printf: write error:'. Recognize that, too. + case $err_msg in - "$prog: write error") diagnostic=y ;; + "$prog: write error:") diagnostic=y ;; + "1> fifo:$prog: write error:") diagnostic=y ;; '') diagnostic=n ;; *) diagnostic=unexpected ;; esac