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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Samba - samba-technical mailing list
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.


Thanks
- Jamie

s3-selftest-largefile.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Samba - samba-technical mailing list
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 <[hidden email]>

Can I get a second Team reviewer ?


> From 12d8bf9760a7ed4a9b5a4a84ef61d8e9a5292177 Mon Sep 17 00:00:00 2001
> From: Jamie McClymont <[hidden email]>
> 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 <[hidden email]>
> ---
>  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
>


Reply | Threaded
Open this post in threaded view
|

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

Samba - samba-technical mailing list
On Thu, 2017-12-07 at 12:51 -0800, Jeremy Allison via samba-technical
wrote:

> 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 <[hidden email]>
>
> Can I get a second Team reviewer ?

Reviewed-by: Andrew Bartlett <[hidden email]>

Thanks!

Andrew Bartlett
--
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba