pytest:conditional_ace_claims: ease export of failing tests to C
commitb65ac10096be77db572526110f378a4edc38cb35
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 23 Aug 2023 03:23:29 +0000 (23 15:23 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 26 Sep 2023 23:45:35 +0000 (26 23:45 +0000)
tree601521a899165bfea1396d520e6f883a975b9952
parent30e6249d228dd2c499038e512c8065edb99c53f5
pytest:conditional_ace_claims: ease export of failing tests to C

When a test fails, this prints a little stanza like

static void test_something(void **state)
{
       INIT();
       USER_SIDS("WD", "AA");
       DEVICE_SIDS("BA", "BG");
       SD("D:(XA;;0x1f;;;AA;(! Member_of{SID(AA)}))");
       DENY_CHECK(0x10);
}

which is exactly right for copying into
libcli/security/tests/test_run_conditional_ace.c
which is much easier to iterate over with compiling and debugging.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/conditional_ace_claims.py