Incorrect file size returned in the Respond of "FILE_SUPERSEDE Create"

Kenny Dinh kdinh at peaxy.net
Tue Apr 28 18:23:45 MDT 2015


That works for me. Thank you, Jeremy!

Previously I was running the test as "make test TESTS=samba4.raw.open".
That seems to be running a loopback test.  I couldn't see the error running
the test this way.  Maybe, I missed some required configuration.

After a little more searching, I was able to build smbtorture separately
and ran the ./bin/smbtorture which give me much better response in term of
watching the packets.



On Tue, Apr 28, 2015 at 5:11 PM, Jeremy Allison <jra at samba.org> wrote:

> On Tue, Apr 28, 2015 at 03:11:00PM -0700, Kenny Dinh wrote:
> > The patch looks good to me.
> >
> >
> > I have been trying to verify the test case I wrote in
> source4/torture/raw/
> > open.c.
> >
> > I have been following direction from https://wiki.samba.org/index.php/
> > Writing_Torture_Tests .
> >
> > It wasn't clear if torture test in source3 or source4 should be updated.
> > Attached is my version of of smbtorture, I tried to run my test but I'm
> not
> > hitting the error using the un-patched code.  The file size returned
> seems to
> > be 0 on open supersede.  There are other parameters in the create
> operation
> > that I trying to play around to trigger the error case.
>
> OK, I've gotten the following test to run and expose the error on
> an unpatched Samba, and run successfully against Win2K12r2 and a
> patched Samba.
>
> I had to make a change:
>
> +       CHECK_VAL(io.ntcreatex.out.create_action, FILE_WAS_SUPERSEDED);
>
> you were checking for NTCREATEX_ACTION_TRUNCATED, which is not
> correct in the SUPERSEDED case. Plus I also needed to add
> the old s4 ntfs server to the knownfail lists as it doesn't
> pass this new test (helps 'make test' work correctly :-).
>
> Let me know if this works for you and I'll get it submitted
> to master !
>
> Cheers,
>
>         Jeremy.
>


More information about the samba-technical mailing list