[SCM] Samba Shared Repository - branch master updated- release-4-0-0alpha8-349-g5334b79
Steven Danneman
steven.danneman at isilon.com
Fri Sep 4 19:36:38 MDT 2009
Hey Metze,
I've finally had some time to get back to the SMB2 torture tests I was working on a few months ago.
I've modified the original smb2/dir.c test, to use the more standard torture style that you suggested. The main problem with the torture_assert_*() macros, is that they return immediately, not allowing the test to do cleanup. I thought of many ways around this problem, including wrapping the torture_assert_*() macros in their own static functions within dir.c or implementing the setup/teardown functions per-test in the smb2 torture code. I felt there were issues with both of those approaches, extra junk code in each test file for the first, and an inability to create a per-test talloc context for the latter.
So I finally settled on defining new torture_assert_*_goto() macros, that jump to a label instead of returning immediately.
I've attached a patch that show my implementation and usage of a few such macros. I wanted to get your buyoff on this idea before committing. Can you give a quick code review and tell me what you think?
Thanks,
Steven
> -----Original Message-----
> From: Stefan (metze) Metzmacher [mailto:metze at samba.org]
> Sent: Wednesday, July 15, 2009 10:32 PM
> To: samba-technical at lists.samba.org
> Cc: Steven Danneman; samba-cvs at samba.org
> Subject: Re: [SCM] Samba Shared Repository - branch master updated-
> release-4-0-0alpha8-349-g5334b79
>
> Hey Steven,
>
> >> No one at Isilon is working on SMB2 server side implementation
> currently, but we are front loading a lot of test work so there will be
> a reasonable set of correctness tests already available when new code
> is written.
> >>
> >> Right now we're working on porting most of the RAW SMB tests to
> SMB2, including open, streams, share modes, acls, brl, and change
> notify. All of our testing has been against a W2K8 server, though I'll
> include a W2K8R2 server as well.
> >>
> >> Sorry, I made some last minute changes before pushing this patch and
> didn't re-run them. I'll be more careful next time. Though, several
> of the tests will fail against current HEAD because the features aren't
> implemented yet. Is it acceptable for the "make test TESTS=smb2" to
> fail for a bit?
> >
> > Not without corresponding notations in the
> > source{3,4}/selftest/knownfail files.
>
> Yes, please make sure you use torture_comment() instead of printf() and
> all torture_assert* functions instead of just returning false in a
> test. Then make test reports them as failures instead of errors and
> it's easy to mark them as known failures. This makes sure that the
> server doesn't crash when the test runs against it.
>
> metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s4-torture-smb2-Fix-several-small-bugs-and-style-iss.patch
Type: application/octet-stream
Size: 33500 bytes
Desc: 0001-s4-torture-smb2-Fix-several-small-bugs-and-style-iss.patch
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090904/5ee9a7a6/attachment.obj>
More information about the samba-technical
mailing list