summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSachin Prabhu <sprabhu@redhat.com>2020-06-25 18:02:28 +0100
committerStefan Metzmacher <metze@samba.org>2020-07-07 10:30:40 +0000
commit32f05b05ac9b39cd205daf0a9b93821f93636a5d (patch)
tree23fef010ac83578e0b63b58b025b52088c3d437c
parent8902eb82d981e07812134285e199b47b22acd815 (diff)
downloadsamba-32f05b05ac9b39cd205daf0a9b93821f93636a5d.tar.gz
s4:torture/local: Add new test to check smbtorture --fullname
Add new always pass test to test smbtorture --fullname. Since we test the printing of the fullname of the test, the test is placed at the bottom of several levels of test suites. test : local.smbtorture.level1.level2.level3.always_pass Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--source4/torture/local/local.c1
-rw-r--r--source4/torture/local/smbtorture_fullname.c31
-rw-r--r--source4/torture/local/wscript_build3
3 files changed, 34 insertions, 1 deletions
diff --git a/source4/torture/local/local.c b/source4/torture/local/local.c
index 913daa39fbe..a3186788524 100644
--- a/source4/torture/local/local.c
+++ b/source4/torture/local/local.c
@@ -81,6 +81,7 @@
torture_local_util_str_escape,
torture_local_tfork,
torture_local_mdspkt,
+ torture_local_smbtorture,
NULL
};
diff --git a/source4/torture/local/smbtorture_fullname.c b/source4/torture/local/smbtorture_fullname.c
new file mode 100644
index 00000000000..875b3cff0e6
--- /dev/null
+++ b/source4/torture/local/smbtorture_fullname.c
@@ -0,0 +1,31 @@
+#include "includes.h"
+#include "torture/smbtorture.h"
+#include "torture/local/proto.h"
+
+static bool test_smbtorture_always_pass(struct torture_context *tctx)
+{
+ return true;
+}
+
+struct torture_suite *torture_local_smbtorture(TALLOC_CTX *ctx)
+{
+ struct torture_suite *suite = torture_suite_create(ctx, "smbtorture");
+ struct torture_suite *suite_level1 = torture_suite_create(ctx,
+ "level1");
+ struct torture_suite *suite_level2 = torture_suite_create(ctx,
+ "level2");
+ struct torture_suite *suite_level3 = torture_suite_create(ctx,
+ "level3");
+
+ torture_suite_add_suite(suite_level2, suite_level3);
+ torture_suite_add_suite(suite_level1, suite_level2);
+ torture_suite_add_suite(suite, suite_level1);
+
+ torture_suite_add_simple_test(suite_level3, "always_pass",
+ test_smbtorture_always_pass);
+
+ suite->description = talloc_strdup(suite,
+ "smbtorture multilevel always pass test.");
+
+ return suite;
+}
diff --git a/source4/torture/local/wscript_build b/source4/torture/local/wscript_build
index 654b3f9c271..38b6c8f4b6e 100644
--- a/source4/torture/local/wscript_build
+++ b/source4/torture/local/wscript_build
@@ -28,7 +28,8 @@ TORTURE_LOCAL_SOURCE = '''../../../lib/util/charset/tests/iconv.c
verif_trailer.c
nss_tests.c
mdspkt.c
- fsrvp_state.c'''
+ fsrvp_state.c
+ smbtorture_fullname.c'''
TORTURE_LOCAL_DEPS = 'RPC_NDR_ECHO TDR LIBCLI_SMB MESSAGING iconv POPT_CREDENTIALS TORTURE_AUTH TORTURE_UTIL TORTURE_NDR TORTURE_LIBCRYPTO share torture_registry %s ldb samdb replace-test RPC_FSS_STATE util_str_escape' % provision