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

Kenny Dinh kdinh at peaxy.net
Tue Apr 28 19:29:05 MDT 2015


Jeremy,

Using the patch you attached, and running ./bin/smbtorture against SAMBA4
server.  After sending SUPERSEDE create, io.ntcreatex.out.create_action
contains 0x0. However when running the test as "make test
TESTS=samba4.raw.open", I received 0x3 as the value of
io.ntcreatex.out.create_action.  That failed the "make test"

+
+ CHECK_VAL(io.ntcreatex.out.create_action, FILE_WAS_SUPERSEDED);
+

I don't understand what is the expectation.  I'm not sure how to make the
test case work for both ./bin/smbtorture and "make test".



On Tue, Apr 28, 2015 at 5:23 PM, Kenny Dinh <kdinh at peaxy.net> wrote:

> 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