summaryrefslogtreecommitdiff
path: root/lib/torture
Commit message (Collapse)AuthorAgeFilesLines
* lib/torture: fix tctx arg usage in torture_assert_nttime_equal() macroRalph Boehme2022-12-091-1/+1
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: add torture_assertf()Douglas Bagnall2022-06-171-0/+14
| | | | | | | | | | Often we go 'torture_assert(tctx, expr, talloc_asprintf(tctx, "foo %s", foo));' which is just a pain. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15040 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/torture: fix subunit names of nested suitesStefan Metzmacher2020-07-072-2/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | E.g. passing 'smb2.multichannel.generic' to smbtorture results in - interface_info - num_channels While passing 'smb2.multichannel' to smbtorture results in: - generic.interface_info - genetic.num_channels - oplocks.test1 ... - leases.test1 ... Before we got this: - interface_info - num_channels - test1 ... - test1 That made it impossible to add knownfail entries for leases.test1 vs. oplocks.test1 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* lib/torture: add back links to the parent objectsStefan Metzmacher2020-07-072-0/+7
| | | | | | | This makes would allow the full name of a test to be constructed if needed in future. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* lib/torture: make torture_subunit_test_name() publicStefan Metzmacher2020-07-073-18/+16
| | | | | | This makes it easier to modify. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* lib/torture: protect torture_assert[_goto]() with a do { } while(0) blockStefan Metzmacher2019-09-101-4/+6
| | | | | | | | | | This hopefully fixes a lot of coverity defects like: Control flow issues (DEADCODE) Execution cannot reach this statement: ";". Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib:torture: add torture_assert_u32_[not_]equal[_goto] macrosRalph Boehme2019-08-081-0/+48
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: add torture_assert_errno_equal_goto()Ralph Boehme2019-08-071-0/+12
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib:torture: Fix string comparison macros where we directly pass NULLAndreas Schneider2019-05-081-3/+5
| | | | | | | | | See e.g. lib/util/tests/strlist.c +177 Found by GCC 9. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib:torture: Fix size type in torture macroAndreas Schneider2019-05-011-4/+4
| | | | | | | | Found by csbuild. https://gitlab.com/samba-team/devel/samba/-/jobs/204481431 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: consistently produce high-res UTC timeJamie McClymont2018-03-221-2/+2
| | | | | | | | | | | | | | | Currently some subunit reporters throughout the codebase provide low-res time, meaning timestamps jump back and forth in the subunit file. Also, some subunit reporters produce UTC timestamps while others produce local time. UTC was chosen as the standard for this commit since all of the timestamps end with a Z (= Zulu = UTC). Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Mar 22 13:26:44 CET 2018 on sn-devel-144
* s4/torture: make --unclist active with smb2 testcasesPeter Somogyi2017-08-301-0/+2
| | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12985 Signed-off-by: Peter Somogyi <psomogyi@hu.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Aug 30 00:16:51 CEST 2017 on sn-devel-144
* lib/torture: add two more ndr assert macrosRalph Boehme2017-05-171-0/+12
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=12787 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* torture: add torture_assert_mem_not_equal_goto()Uri Simchoni2017-03-261-0/+10
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12715 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* lib/torture: add torture_assert_mem_equal_gotoRalph Boehme2017-03-021-0/+10
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* lib:torture: Make variables constAndreas Schneider2016-11-201-4/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-torture: add new torture_assert_krb5_error_equal macro.Günther Deschner2016-07-231-0/+8
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture: show the first differing byte and a dump in ↵Günther Deschner2016-07-201-0/+36
| | | | | | | | | torture_assert_data_blob_equal(). Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* lib/torture: add torture_assert_u64_not_equal_goto macroGünther Deschner2016-03-221-0/+12
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dlist: remove unneeded type argument from DLIST_ADD_END()Michael Adam2016-02-061-7/+7
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Rename 'errors' to 'samba-errors' and make it public.Jelmer Vernooij2016-01-131-1/+1
| | | | | | | | | | | This is necessary because it has public headers. Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk> Reviewed-By: Andrew Bartlett <abartlet@samba.org> Reviewed-By: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Wed Jan 13 07:47:04 CET 2016 on sn-devel-144
* Make libtorture private, for now.Jelmer Vernooij2016-01-132-18/+5
| | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@jelmer.uk> Reviewed-By: Andrew Bartlett <abartlet@samba.org> Reviewed-By: Stefan Metzmacher <metze@samba.org>
* lib/torture: add torture_assert_hresult_{equal,ok} macros.Günther Deschner2015-07-311-0/+11
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/torture: be more verbose about ndr failures.Günther Deschner2015-07-031-1/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-torture: move torture_assert_sid_equal() out of ndr headers.Günther Deschner2015-07-031-0/+10
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: add torture_assert_not_null[_goto]Michael Adam2015-03-301-0/+21
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* torture: add torture_assert_int_not_equal_gotoMichael Adam2015-03-301-0/+11
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* Inline outputting of subunit in libtorture.Jelmer Vernooij2015-03-062-7/+24
| | | | | | Change-Id: I2c7045c530183a6961cb253540579312c2767330 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture: NULL out after talloc_freeGarming Sam2014-12-301-0/+1
| | | | | | | | | | This appeared as a segmentation fault in rpc.spoolss.printer. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Dec 30 02:49:01 CET 2014 on sn-devel-104
* torture: add torture_assert_u64_not_equal()Michael Adam2014-10-031-0/+11
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* torture: add torture_assert_int_not_equalMichael Adam2014-10-031-0/+10
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* torture: fix whitespace/tab mixup in internal_torture_run_test()Michael Adam2014-09-081-22/+22
| | | | | | | | | | No diff visible with "git show|diff -w". Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Mon Sep 8 04:21:52 CEST 2014 on sn-devel-104
* pkgconfig: Do not hardcode library version numbers in pc files.Günther Deschner2013-08-221-1/+1
| | | | | | | | | | | | | | We control version numbers via 'vnum' from the wscript_build files for all other libraries. In case of libndr we already reported a wrong 0.0.1 version via pkgconfig while in fact the library is versioned as 0.0.2. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Kai Blin <kai@samba.org> Autobuild-User(master): Kai Blin <kai@samba.org> Autobuild-Date(master): Thu Aug 22 20:48:44 CEST 2013 on sn-devel-104
* libtorture: factor out simple ui backendGregor Beck2012-09-213-1/+87
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* libtorture: Improve suggestion to mention torture_assert_*() rather thanJelmer Vernooij2012-05-031-1/+1
| | | | torture_result().
* torture: Suggest torture_fail() / torture_result().Jelmer Vernooij2012-05-031-1/+2
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Thu May 3 15:31:06 CEST 2012 on sn-devel-104
* torture: add torture_assert_guid_equal() macro.Günther Deschner2011-11-031-0/+10
| | | | Guenther
* libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbolAndrew Bartlett2011-06-201-2/+2
| | | | | | | | | | | | The two error tables need to be combined, but for now seperate the names. (As the common parts of the tree now use the _common function, errmap_unix.c must be included in the s3 autoconf build). Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
* s4:smbtorture do not leave output directory aroundChristian Ambach2011-02-211-0/+1
| | | | | | | | | | | | | | | | | | | calling smbtorture with no or invalid arguments left the temporary output directory around this patches removes the dead-end exit from usage and makes the logic go on until the final cleanup state is reached output directory will still be left around when test times out or testcases itself force an exit also make sure that the directory itself is deleted, not just the objects in it Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Feb 21 11:35:30 CET 2011 on sn-devel-104
* s4-torture: not having an output dir is not a fatal errorAndrew Tridgell2011-02-101-1/+3
| | | | | | | just return NT_STATUS_OK, as nothing to cleanup Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4-smbtorture: add torture_assert_nttime_equal macro.Günther Deschner2010-12-221-1/+7
| | | | Guenther
* s4-smbtorture: add torture_assert_strn_equal macro.Günther Deschner2010-12-171-0/+10
| | | | Guenther
* s4-pkgconfig: add @LIB_RPATH@ to our link flagsAndrew Tridgell2010-12-081-1/+1
| | | | | | | | this is only set when rpath is used on install. It ensures that applications that link against Samba libraries get the rpath right Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Dec 8 12:46:00 CET 2010 on sn-devel-104
* lib/torture: add torture_assert_u64_equal_goto()Stefan Metzmacher2010-12-041-0/+13
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Sat Dec 4 12:55:44 CET 2010 on sn-devel-104
* s4: Remove the old perl/m4/make/mk-based build system.Jelmer Vernooij2010-10-311-17/+0
| | | | | | | | The new waf-based build system now has all the same functionality, and the old build system has been broken for quite some time. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
* waf: Remove lib prefix from libraries manually.Jelmer Vernooij2010-10-261-1/+1
|
* s4: Drop duplicate 'lib' prefix for private libraries.Jelmer Vernooij2010-10-261-1/+1
|
* s4: Rename LIBSAMBA-* to libsamba-*Jelmer Vernooij2010-10-241-1/+1
|
* s4-torture: fixed uninitialised variable errorAndrew Tridgell2010-10-131-1/+1
| | | | ret is uninitialised if the directory is empty
* torture: Add debug on what we are removingMatthieu Patou2010-10-111-0/+1
|