[PATCH] s3-selftest: fix creation of large file

Jeremy Allison jra at samba.org
Thu Dec 7 20:51:29 UTC 2017


On Wed, Dec 06, 2017 at 10:42:30AM +1300, Jamie McClymont via samba-technical wrote:
> Hi everyone
> 
> I noticed something funny looking through the st directory...
> 
>     ~/samba$ file st/largefile
>     st/largefile: very short file
> 
> This patch fixes the creation of a large sparse file as a test fixture
> for smbclient.


Oh, good catch ! Reviewed-by: Jeremy Allison <jra at samba.org>

Can I get a second Team reviewer ?


> From 12d8bf9760a7ed4a9b5a4a84ef61d8e9a5292177 Mon Sep 17 00:00:00 2001
> From: Jamie McClymont <jamiemcclymont at catalyst.net.nz>
> Date: Tue, 5 Dec 2017 14:51:07 +1300
> Subject: [PATCH] s3-selftest: fix creation of large file
> 
> The dd command was skipping the first 20MB of /dev/zero then writing only one,
> while indending to create a 20MB sparse file.
> 
> Signed-off-by: Jamie McClymont <jamiemcclymont at catalyst.net.nz>
> ---
>  source3/script/tests/test_smbclient_large_file.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/source3/script/tests/test_smbclient_large_file.sh b/source3/script/tests/test_smbclient_large_file.sh
> index 0aee7af..23a2ffd 100755
> --- a/source3/script/tests/test_smbclient_large_file.sh
> +++ b/source3/script/tests/test_smbclient_large_file.sh
> @@ -49,7 +49,7 @@ EOF
>  }
>  
>  rm -f $PREFIX/largefile
> -dd if=/dev/zero of=$PREFIX/largefile skip=$((20*1024*1024)) count=1 bs=1
> +dd if=/dev/zero of=$PREFIX/largefile seek=$((20*1024*1024)) count=1 bs=1
>  
>  incdir=`dirname $0`/../../../testprogs/blackbox
>  . $incdir/subunit.sh
> -- 
> 2.7.4
> 




More information about the samba-technical mailing list