From c38e8baa18c6453148aa2c398c3ad0c4868c8b4e Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Thu, 22 Feb 2018 12:46:47 +1300 Subject: [PATCH 1/2] selftest: subunithelper needs to follow the subunit spec more closely In particular allow ]\n without \n]\n as used by cmocka Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett (cherry picked from commit 7d79575de8e47a0ce03e30c3ea84176be696269f) --- selftest/subunithelper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py index fab7d6f0b41..efc8bedcfcb 100644 --- a/selftest/subunithelper.py +++ b/selftest/subunithelper.py @@ -82,7 +82,8 @@ def parse_results(msg_ops, statistics, fh): if l == "": break msg_ops.control_msg(l) - if l == "]\n": + if l[-2:] == "]\n": + reason += l[:-2] terminated = True break else: -- 2.11.0 From df99e3e1736254bd058bbc8222e0d52177ab9099 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Thu, 22 Feb 2018 11:26:00 +1300 Subject: [PATCH 2/2] unittests.lib_util_modules: test module probe with "skel", not "unix" The unix module is not available as a module on some systems. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett (cherry picked from commit cb5f1f3b262467faba59b3b323e240d1351d5fc0) --- testsuite/unittests/test_lib_util_modules.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/unittests/test_lib_util_modules.c b/testsuite/unittests/test_lib_util_modules.c index c92dafd161e..ca62857d86d 100644 --- a/testsuite/unittests/test_lib_util_modules.c +++ b/testsuite/unittests/test_lib_util_modules.c @@ -26,7 +26,7 @@ static void test_samba_module_probe(void **state) { NTSTATUS status; - status = smb_probe_module("auth", "unix"); + status = smb_probe_module("auth", "skel"); assert_true(NT_STATUS_IS_OK(status)); } -- 2.11.0