[PATCH] avoid k suffix in dd count operand in sftp-resume test

Damien Miller djm at mindrot.org
Wed Apr 1 16:52:06 AEDT 2026


merged - thanks again

On Tue, 31 Mar 2026, Michael Forney wrote:

> Not all dd implementations support this. POSIX only specifies
> suffixes for block size operands.
> 
> Instead, just use 1024k to avoid the special case. This also removes
> an incorrect redirection operator that appeared in the 1m case.
> ---
>  regress/sftp-resume.sh | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/regress/sftp-resume.sh b/regress/sftp-resume.sh
> index f4fe8f928..4ab0f1d68 100644
> --- a/regress/sftp-resume.sh
> +++ b/regress/sftp-resume.sh
> @@ -10,7 +10,7 @@ increase_datafile_size 1200
>  
>  for cmd in put get; do
>      verbose "$tid: ${cmd}"
> -    for size in 0 1 1k 1m size-1 same; do
> +    for size in 0 1 1k 1024k size-1 same; do
>  	trace "$tid: test ${cmd} ${size}"
>  	rm -rf ${COPY}.1 ${COPY}.2
>  	cp ${DATA} ${COPY}.1
> @@ -24,8 +24,6 @@ for cmd in put get; do
>  		;;
>  	same)	cp ${DATA} ${COPY}.2
>  		;;
> -	1m)	dd if=${COPY}.1 of=${COPY}.2 bs=1k count=1k >/dev/null 2<&1
> -		;;
>  	*)	dd if=${COPY}.1 of=${COPY}.2 bs=${size} count=1 >/dev/null 2>&1
>  		;;
>  	esac
> -- 
> 2.49.0
> 
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
> 


More information about the openssh-unix-dev mailing list