1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

72 Commits

Author SHA1 Message Date
Andreas Schneider
e8a2c2fe4e selftest: Fix setting environ for plansmbtorture4testsuite()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-08-03 09:28:38 +00:00
Andreas Schneider
48289b6964 selftest: Add support for setting ENV variables in plantestsuite()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-07-28 06:23:37 +00:00
Andreas Schneider
3db299e586 selftest: Add support for setting ENV variables in plansmbtorture4testsuite()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-07-28 06:23:37 +00:00
Andreas Schneider
18976a9568 selftest: Re-format long lines in selftesthelpers.py
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-07-28 06:23:37 +00:00
Douglas Bagnall
aecb2b779b python: remove all 'from __future__ import print_function'
This made Python 2's print behave like Python 3's print().

In some cases, where we had:

   from __future__ import print_function
   """Intended module documentation..."""

this will have the side effect of making the intended module documentation
work as the actual module documentation (i.e. becoming __doc__), because
it is once again the first statement in the module.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-28 03:43:34 +00:00
Volker Lendecke
b113a3bbcd torture: Show sddl_decode() failure for "GWFX" access mask
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-04-20 23:19:28 +00:00
Björn Baumbach
3e9f0e9725 selftest: add option to pass args to tests to planpythontestsuite()
The logic is basically a copy from planoldpythontestsuite().

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Björn Baumbach <bb@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-12-17 13:59:38 +00:00
Volker Lendecke
9653a10738 libsmbclient: Put it back to a known, well-working state
For adapting unix extensions in our client libraries, we need a fresh start
with additional APIs. We can't change existing application behaviour.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-03-10 21:25:33 +00:00
Volker Lendecke
ac65874ef4 selftest: Factor out smbtorture4testsuite_cmdarray()
This will be used in the libsmbclient tests soon

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-02-27 18:07:29 +00:00
Volker Lendecke
e4f399126e selftest: Assemble smbtorture arguments as a list
I'm planning to mess with libsmbclient tests calling into
smbtorture4. For this it will be much more convenient to have the
arguments available as a higher-level data structure than just a
string.

Checked by "diff" on the testlist before and after -- no change.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-02-27 18:07:29 +00:00
Andreas Schneider
6106b8a053 selftest: Add smbstatus to testhelper
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13793

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-03-27 13:31:27 +00:00
Andrew Bartlett
6a6a178b3c selftest: Remove obsolete py3_compatible=True markers
All our tests now run in python3.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-03-21 04:06:15 +00:00
Andrew Bartlett
beda359bdd selftest: Remove support for running multiple tests against python versions in a single run
The extra_python support was added to aid the python3 transition

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-03-21 04:06:15 +00:00
Jeremy Allison
7b21b4c1f5 s3: tests: Add regression test for smbd crash on share force group change with existing connection.
Mark as known fail for now.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13690

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-01-25 13:20:23 +01:00
Noel Power
e3c37bbad4 selftest: don't hardcode '.python3' for extra-python tests
Instead of hardcoding '.python3' we now hardcode the extra python
exe (which will be python2 for a default python3 build)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-12-10 10:38:25 +01:00
Douglas Bagnall
1cf142c30a selftesthelpers: fix py3 tests with extra_path
If a test was supplied with extra_path, a PYTHONPATH= env variable was
prepended to the args list, but the py3_compatible clause assumed the
first args element was /usr/bin/python.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <noel.power@suse.com>
2018-11-02 03:48:52 +01:00
Noel Power
e538217930 PY3: In a pure PY3 build filter-subunit was getting called without 'python'
tests were getting called with "| ${src}/selftest/filter-subunit" which
resulted in filter-subunit getting execve'd without a calling python. This
resulted in /usr/bin/python (default python) getting called and subsequent
imports failing.
2018-10-23 05:50:24 +02:00
Noel Power
a0851c5fdc PY3: wrap filter calls with list where list is expected
filter in PY2 returns list in PY3 it returns an iterator

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-09-16 06:16:20 +02:00
Noel Power
dc9117e418 PY3: ensure output of subprocess.Popen is decoded
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-09-16 06:16:20 +02:00
Joe Guo
9f5bbcc10a PEP8: fix E713: test for membership should be 'not in'
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24 07:49:31 +02:00
Joe Guo
115f2a71b8 PEP8: fix E305: expected 2 blank lines after class or function definition, found 1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24 07:49:30 +02:00
Joe Guo
211c9a5f85 PEP8: fix E302: expected 2 blank lines, found 1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24 07:49:29 +02:00
Joe Guo
484ce0634b PEP8: fix E123: closing bracket does not match indentation of opening bracket's line
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24 07:49:26 +02:00
Noel Power
40e7d57999 selftest: convert print func to be py2/py3 compatible
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-03-23 07:28:24 +01:00
Andrew Bartlett
1116ee1c5c selftest: Actually run python3 tests during the selftest
These previously only ran if the develper was using EXTRA_PYTHON in their
OS environment

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat May 20 02:26:33 CEST 2017 on sn-devel-144
2017-05-20 02:26:33 +02:00
Lumir Balhar
4ebd877ec0 python: selftest: Add possibility to run old Python test suites with Python 3
Add possibility to execute old Python test suites with Python 3
and enable tests with Python 3 of ported samba.gensec module.

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2017-03-10 07:31:12 +01:00
Stefan Metzmacher
a5db045f98 selftest/selftesthelpers.py: let plantestsuite() use the env name in the test name
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-01-10 13:54:17 +01:00
Lumir Balhar
8f8b0fd12a python: selftesthelpers: Add possibility for planning tests for
'extra_python' (Python 3).

This change allows us to mark modules which are Python 3 compatible
with the keyword argument `py3_compatible`. Then, if building with
Python 3 is configured using --extra-python, `planpythontestsuite`
will plan an extra Python test for each marked module.

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:21 +01:00
Uri Simchoni
099c6f3252 seltest: add test for "ignore system acls" in vfs_acl_xattr.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11806

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-24 03:06:16 +01:00
Uri Simchoni
9c67ff461d selftest: test access based share enum parameter
BUG: https://bugzilla.samba.org/show_bug.cgi?id=8093

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Mar  2 23:51:56 CET 2016 on sn-devel-144
2016-03-02 23:51:55 +01:00
Christian Ambach
6ceba4def6 selftest: add a helper for the smbget binary
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-02-26 11:31:33 +01:00
Uri Simchoni
f71761c47a selftest: add disk-free and quota tests based on fake_dfq VFS module
These tests use the vfs_fake_dfq module to simulate some
relations between the quota status and disk-free status.

The tests will become meaningful when we take the code that
does those calculations out of the VFS layer - the tests will
then exercise the server code.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:11 +01:00
Adrian Cochrane
62d4136755 selftest: Remove binary mappings from the build system.
Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-08 13:03:14 +02:00
Adrian Cochrane
47ad5d27eb selftest: Apply rename filepath arguments so binary mapping doesn't have to.
Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-08 13:03:14 +02:00
David Disseldorp
2e9ea9f195 selftest: add snapshot share configuration
Define a share that uses both vfs_shell_snap and fake_snap.pl to create,
delete and expose fake snapshots in response to FSRVP requests.
Additionally test snapshot enumeration and access via the shadow_copy2
module.

Allow for simple testing of FSRVP message sequence timeouts, by
specifying an artificially small interval.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-31 18:40:25 +02:00
Jelmer Vernooij
cc4f5372af Add basic tap2subunit converter, rather than relying on the one from subunit-tools.
Change-Id: I39ec5ec68c7c3c9d329d8f1a8ce01445b85c7ab8
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:47 +01:00
Jelmer Vernooij
de60dfd389 Use samba.subunit.run to run subunit tests.
Change-Id: Id9bdd33b7ac5e4db40ab8bef4dbe0f04c36d8da7
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:46 +01:00
Jelmer Vernooij
02e063bd5b Be consistent about what functions add $LISTOPT and $LOADLIST to the command-line.
Change-Id: Ife86624b53a99d48ce9f00d146b14f798c9bdb24
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sun Nov 30 16:43:52 CET 2014 on sn-devel-104
2014-11-30 16:43:52 +01:00
Jelmer Vernooij
0f408599f8 selftest: Add separate command line for listing tests, allowing us of subunit-filter (which doesn't support subunit v2).
Change-Id: Icb877214a422c63fd38ef92425c7b4fe7ee19ad5
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-11-30 14:22:05 +01:00
Jelmer Vernooij
afe94aa535 Re-use add_prefix function.
Change-Id: I6e91bc9fc6714c147427e920ca0e3e22cb9a076b
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-11-30 14:22:05 +01:00
Jelmer Vernooij
f6e3cd7f03 selftest: Drop support for TESTSUITE-IDLIST, and remove its last user.
Change-Id: Ic616676bb770fa4769195d73c4309915646caae0
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-11-30 14:22:05 +01:00
Jelmer Vernooij
2c67d55614 Include mimeparse, which is used by subunit/testtools.
Change-Id: I984c82acc0bc82a165e8ea17d8948c465c786905
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sat Nov 22 04:44:11 CET 2014 on sn-devel-104
2014-11-22 04:44:11 +01:00
Jelmer Vernooij
0c2c75a2d7 filter-subunit: Drop support for allow_empty_output hack.
Change-Id: If4f336ef770202dcf69484b9bccc6c0c80bd5f9b
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Oct 14 09:06:05 CEST 2014 on sn-devel-104
2014-10-14 09:06:05 +02:00
Jelmer Vernooij
bbaa739bbd Remove remaining instance of pep8 E211 (too many spaces before operator).
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Change-Id: I9af3bf582bba8fc1094addb12cd0a5ce04406b5b
2014-10-14 06:44:06 +02:00
Andrew Bartlett
233e3c9631 selftest: Remove print_smbtorture4_version and smbtorture4_possible check
smbtorture is now always the same version as the rest of Samba, and is strictly required.

Andrew Bartlett

Change-Id: I89d9c52275477177fa8a89050920ff8a2fec9288
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Mar 26 04:20:16 CET 2014 on sn-devel-104
2014-03-26 04:20:16 +01:00
Jelmer Vernooij
a7b8d0260a source3.selftest: Move last variables to selftesthelpers.
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sat Oct 27 19:08:42 CEST 2012 on sn-devel-104
2012-10-27 19:08:41 +02:00
Jelmer Vernooij
66980989e5 source3.selftest: Move more variables to be in common. 2012-10-27 07:01:10 -08:00
Jelmer Vernooij
1326992358 selftesthelpers: Fix detection of tap2subunit.
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sat Oct 27 16:57:49 CEST 2012 on sn-devel-104
2012-10-27 16:57:49 +02:00
Jelmer Vernooij
05dc5a39a6 selftesthelpers: Simplify detection of tap2subunit. 2012-10-27 05:16:19 -08:00
Jelmer Vernooij
58345820c0 selftesthelpers: Add function for printing smbtorture4 version. 2012-10-27 05:16:18 -08:00