Clean up some CHECK_STATUS patches

Douglas Bagnall douglas.bagnall at
Thu Jun 25 15:59:25 MDT 2015

hi Michael,

> But the same comment applies as for the other posted
> patch: The error messages should be giving extra info,
> not duplication info like "Wrong status" that the
> macro already provides, but rather _what_ it was that
> went wrong (smb2_create failed, etc).

I see your point. In practical terms that may take a while -- there
are around 900 messages to fix and my understanding of the tests (and
indeed smb2) has so far been blissfully superficial. I will revisit it
as time allows.

> Also be aware of the existence of
> torture_assert_ntstatus_ok[_goto]()

Thanks, I missed that somehow.


> Cheers - Michael
> On 2015-06-25 at 17:50 +1200, Douglas Bagnall wrote:
>> On 19/06/15 22:10, Michael Adam wrote:
>>>>    I sugget using torture_assert_ntstatus_equal_goto().
>>>>    This is more writing than CHECK...(), but it is the
>>>>    standard way. Could you do that instead?
>> While emacs and me remembered how to do it, we went through the rest of
>> the files in the source4/torture/smb2 directory and converted their
>> CHECK_STATUS macros. I left out source4/torture/smb2/lock.c, whose
>> CHECK_* macros are already defined in terms of torture_assert_*.
>> cheers,
>> Douglas
>> >From 2028e48af12b181d95a441c70634816354c2b5f4 Mon Sep 17 00:00:00 2001
>> From: Douglas Bagnall <douglas.bagnall at>
>> Date: Thu, 25 Jun 2015 12:17:28 +1200
>> Subject: [PATCH 01/14] Replace CHECK_STATUS macro in util.c
>> Signed-off-by: Douglas Bagnall <douglas.bagnall at>
>> ---

More information about the samba-technical mailing list