generic/397: be compatible with ignored SIGPIPE
[xfstests-dev.git] / tests / generic / 397
index 7077d0483a952c01cf7436e9167deaf26f6bf750..ba92089135ef18d6535d9142f0deba7480050481 100755 (executable)
@@ -69,7 +69,7 @@ for dir in $SCRATCH_MNT/edir $SCRATCH_MNT/ref_dir; do
        touch $dir/empty > /dev/null
        $XFS_IO_PROG -t -f -c "pwrite 0 4k" $dir/a > /dev/null
        $XFS_IO_PROG -t -f -c "pwrite 0 33k" $dir/abcdefghijklmnopqrstuvwxyz > /dev/null
-       maxname=$(yes | head -255 | tr -d '\n') # 255 character filename
+       maxname=$(head -c 255 /dev/zero | tr '\0' y) # 255 character filename
        $XFS_IO_PROG -t -f -c "pwrite 0 1k" $dir/$maxname > /dev/null
        ln -s a $dir/symlink
        ln -s abcdefghijklmnopqrstuvwxyz $dir/symlink2