summaryrefslogtreecommitdiff
path: root/script
Commit message (Collapse)AuthorAgeFilesLines
* gitlab-ci: Run 'samba' tests also with MIT KerberosAndreas Schneider2019-11-041-0/+52
| | | | | | | | | | This runs the tests of the ktest environment. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Nov 4 14:19:17 UTC 2019 on sn-devel-184
* autobuild: rename samba-ad-member-* to samba-admem-*Ralph Boehme2019-10-221-4/+4
| | | | | | | | | | | Needed to come around MAX pathlen limit for UNIX domain socket triggered by the new samba-ad-member-mitkrb5 target added in samba-ad-member-mitkrb5. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Tue Oct 22 14:53:17 UTC 2019 on sn-devel-184
* autobuild: harden samba-xc test suiteUri Simchoni2019-10-201-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Add more checks which directly test the behavior of --cross-answers and --cross-execute. Previous test tested things in a round-about way, checking that running in all three modes (native, cross-execute, cross-answers) yields the same result. It was vulnerable to a degradation in which cross-compilation modes didn't work at all and were running native tests, which is what happened with the upgrade of waf. The added tests check the following: - That cross-excute with cross-answers sets the cross-answers file - That the content of cross-answers file actually affects the build configuration - That a missing line in cross-answers fails the build BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Uri Simchoni <uri@samba.org> Autobuild-Date(master): Sun Oct 20 13:29:58 UTC 2019 on sn-devel-184
* gitlab-ci: Run several AD tests with MIT KDCAndreas Schneider2019-10-121-14/+44
| | | | | | | This will avoid introducing regressions in either client or server code. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* selftest: split fileserver testenv into simpleserver and fileserverRalph Boehme2019-10-091-2/+12
| | | | | | | | | The simpleserver testenv continues to be built with minimal dependencies. fileserver otoh will be built with bells and whistles including JSON which I need for using the env as target for Spotlight tests. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* script/autobuild.py: remove explicit --picky-developer"Stefan Metzmacher2019-08-061-6/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* traffic replay: Store the instance id in the replay contextGary Lockyer2019-07-241-1/+2
| | | | | | | | Store the traffic runner instance id in the replay context. Will be used in subsequent commits. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/compare_cc_results: print usage on too few argsDouglas Bagnall2019-07-051-3/+9
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/bisect-test: fix for py3Douglas Bagnall2019-07-021-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: make code more pythonicJoe Guo2019-06-201-43/+31
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: avoid nested try except blockJoe Guo2019-06-201-11/+12
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: rm redundant empty str in optionsJoe Guo2019-06-201-20/+20
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: define cwd for builder and avoid chdirJoe Guo2019-06-201-5/+3
| | | | | | | | We can pass cwd in Popen, no need to chdir for each cmd. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: improve run_cmd with check_outputJoe Guo2019-06-201-4/+4
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: add helper functions to simplify make test cmdJoe Guo2019-06-201-120/+131
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: replace random-sleep.sh with python functionJoe Guo2019-06-202-58/+39
| | | | | | | | | | | | | The random-sleep.sh script is tricky, and there is no need to rely on another script just for random sleep. Using the python function, the random number generation will happen when load autobuild.py other than execute cmd, but shouldn't affect the result. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: rm unused mime type text/plain in tasksJoe Guo2019-06-201-294/+288
| | | | | | | | The mime type `text/plain` is repeated everywhere but not used any more. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: fix tasks indentJoe Guo2019-06-201-430/+467
| | | | | | | | Indent tasks at same level, make it easier to copy/move lines arround. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Fix autobuild for python3Volker Lendecke2019-06-181-1/+1
| | | | | | | | | "keys()" in python3 returns an unmodifiable view object. Two lines down we might want to modify it, which python3 does not allow. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Noel Power <npower@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* script/autobuild.py: define LCOV_CMD and run it after each make testJoe Guo2019-05-101-2/+35
| | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: add ENABLE_COVERAGE placeholder in configure cmd optionJoe Guo2019-05-101-10/+10
| | | | | | | The value will be "--enable-coverage" or "". Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: replace more placeholders in cmds for coverageJoe Guo2019-05-101-0/+4
| | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: add --enable-coverage optionJoe Guo2019-05-101-0/+3
| | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: mv optionparse to topJoe Guo2019-05-101-53/+53
| | | | | | | so the rest of the code can use the option values directly. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: mv find_git_root and gitroot to topJoe Guo2019-05-101-14/+16
| | | | | | | so the reset of the code can use gitroot directly. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: rename sdir to test_source_dirJoe Guo2019-05-101-7/+7
| | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/attr_count_read: load and correlate all dataDouglas Bagnall2019-05-011-11/+183
| | | | | | | | | | | | | | | | | | | | | | | This changes script/attr_count_read to take the samba private directory as an argument and load all the databases at once, printing them as one big table. It isn't extremely clear what it all means, but it *tries* to tell you. With --plot, it will attempt to load matplotlib and plot the number of requested attributes against the number returned, with colour of each point indicating its relative frequency. It is a scatterplot that wants to be a heatmap. With --no-casefold, you can get an extra confusing table where, for instance, something repeatedly asks for "attributeId" which is not accounted for, while in a completely different row an unrequested "attributeID" is found many times over. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed May 1 06:46:36 UTC 2019 on sn-devel-184
* dsdb/modules: a module to count attribute searches and resultsDouglas Bagnall2019-05-011-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dsdb module stack can turn a simple search request into a complicated tree of sub-queries that include attributes not originally asked for and excluding those that were. The corresponding replies might contain unrequested attributes or (for good reasons, according to some module) hide requested ones. The entire stack is there to meddle and that is what is does. Except *this* module. It just counts. To understand dsdb performance it helps to have some idea what requests and replies are flying too and fro. This module, when inserted anywhere in the stack, counts the requests and replies passing through and the attributes they contain. This data is stored in on-disk tdbs in the private/debug directory. The module is not loaded by default. To load it you need to patch the source4/dsdb/samdb/ldb_modules/samba_dsdb.c and put "count_attrs" somewhere in the module lists in the samba_dsdb_init() function. For example, to examine the traffic between repl_meta_data and group_audit_log, you would do something like this around line 316: "subtree_delete", "repl_meta_data", + "count_attrs", "group_audit_log", "encrypted_secrets", and recompile. Samba will then write to a number of tdb files in the debug directory as requests and replies pass through. A simple script is included to read these files. Doing this: ./script/attr_count_read st/ad_dc/private/debug/debug/attr_counts_not_found.tdb will print a table showing how often various attritbutes were requested but not found (from the point of view of the module). A more sophisticated version of the script is coming in the next commit, but this one is included first because in its simplicity it documents the storage format reasonably well. The tdb keys are attribute names, and the values are uint32_t in machine native order. When the module is included in the stack there will be a very small decrease in performance. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* traffic: load dns query from file and write stats to fileJoe Guo2019-05-011-0/+3
| | | | | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed May 1 01:10:42 UTC 2019 on sn-devel-184
* traffic_replay: Avoid Exception if no packet rate is specifiedTim Beale2019-04-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | traffic_replay would throw an exception if you didn't specify some sort of packet rate. We can avoid this by using --scale-traffic=1.0 as the default if nothing else was specified. script/traffic_replay model.txt $SERVER.$REALM --duration=10 --fixed-password=blahblah12# -U$USERNAME%$PASSWORD INFO 2019-04-10 01:03:01,809 pid:47755 script/traffic_replay #280: Using the specified model file to generate conversations Traceback (most recent call last): File "script/traffic_replay", line 438, in <module> main() File "script/traffic_replay", line 293, in main opts.conversation_persistence) File "bin/python/samba/emulate/traffic.py", line 1295, in generate_conversation_sequences target_packets = int(packet_rate * duration) TypeError: unsupported operand type(s) for *: 'NoneType' and 'float' Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* traffic_replay: Assign users to groups by defaultTim Beale2019-04-301-1/+10
| | | | | | | | | | | | | | | | The traffic_replay script has a myriad of options, but by default when it creates user accounts it does not assign these users to any groups (you have to specify extra options to do that). This isn't really a fair test of samba performance, because it's unlikely that real world setups will have users that are in no groups (other than the default ones). This patch changes the default behaviour so that it will assign the new users to groups automatically, if no other group options were specified. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* autobuild: Build also Samba AD with MIT KerberosAndreas Schneider2019-04-251-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* waf: build: Respect --disable-python for third_party modulesLutz Justen2019-04-242-0/+11
| | | | | | | | | | | | | | | | Skips installation of samba/third_party stuff into the python directory if --disable-python is set. Added test after install that confirms no python modules installed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13905 Signed-off-by: Lutz Justen <ljusten@google.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Apr 24 07:32:31 UTC 2019 on sn-devel-184
* selftest: rename schemaupgrade_dc (+pair) to schema_dcGarming Sam2019-04-121-4/+4
| | | | | | | | | | | | | | | | This is needed because the name of the autobuild job and the name of the selftest env end up in the socket path for ncalrpc sockets. The challenge is that (for example) /memdisk/autobuild/fl/b2424063/samba-schemaupgrade/bin/ab/schemaupgrade_pair_dc/ncalrpc/np/protected_storage does not fit in a struct sockaddr_un. Signed-off-by: Garming Sam <garming@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Apr 12 05:41:36 UTC 2019 on sn-devel-144
* selftest: split schemaupgrade testenv outAaron Haslett2019-04-111-0/+14
| | | | | | | | | | Schemaupgrade tests are particularly resource intensive and are causing runners to hit their memory and CPU limits, so we need to split them out. Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* autobuild: attempt authenticated email if environment suggests itDouglas Bagnall2019-04-051-0/+6
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: try to distribute the tasks a bit moreStefan Metzmacher2019-02-271-21/+21
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* autobuild: spread ad-dc tests over 6 autobuild/ci separate tasks/jobsStefan Metzmacher2019-02-271-12/+62
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* autobuild: add samba-ad-member taskStefan Metzmacher2019-02-271-3/+15
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* autobuild: run ad_dc_backup tests in samba-ad-dc-backupStefan Metzmacher2019-02-271-3/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* autobuild: move maptoguest and simpleserver to 'samba-fileserver'Stefan Metzmacher2019-02-271-1/+7
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* autobuild: move nt4_dc_schannel out of 'samba'Stefan Metzmacher2019-02-271-1/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest:Samba4: add ad_dc_backup alias to ad_dcStefan Metzmacher2019-02-271-0/+2
| | | | | | | | This will allow us to run really most tests in an isolated autobuild/ci task later. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest:Samba4: add ad_dc_default alias to ad_dc_ntvfsStefan Metzmacher2019-02-271-0/+2
| | | | | | | | | | | This will allow us to run really most tests in an isolated autobuild/ci task later. This will apply to tests, which may not rely on the ntvfs backend, so the ad_dc_default alias can point to another environment in future. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest:Samba4: add ad_dc_slowtests alias to ad_dc_ntvfsStefan Metzmacher2019-02-271-0/+2
| | | | | | | | This will allow us to run really slow tests in an isolated autobuild/ci task later. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest:Samba4: add fl2008dc as alias to ad_dc_ntvfsStefan Metzmacher2019-02-271-2/+5
| | | | | | | | | Using aliases it will be possible to split the large amount of tests which use ad_dc_ntvfs into multiple autobuild/ci tasks/jobs later. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: Add basic sanity-check tests for nopython targetTim Beale2019-02-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were only checking samba compiled OK with --disable-python, not that it actually ran. The main problem is all the make test framework is based around subunit/smbtorture, neither of which we seem to build with disable-python. However, for just a simple sanity-check, we can just bypass all the subunit-filter work and just call the Perl code directly. This works OK as long as it's just simple shell script tests that we're running, as we can check the script's exit code directly. The main thing that we really want to test is that we can start up the smbd testenv and connect to it (i.e. a simple smbclient test). This patch adds a new 'make test-nopython' target. This disables the subunit filtering, and runs a small test-list that was generated manually. Note that currently this has the limitation that it doesn't support known failures or flapping tests. However, just checking that smd starts up OK is probably OK for now. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Feb 20 02:10:00 CET 2019 on sn-devel-144
* autobuild: Drop 'py2' flagTim Beale2019-02-151-9/+2
| | | | | | | This isn't used any more. It was only being set, never referenced. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Replace samba-buildpy2-only with samba-nopython-py2Tim Beale2019-02-151-8/+32
| | | | | | | | | | | | | For Samba 4.11, the minimum python2 functionality we will support (for now, at least - we may change our minds) is for the --disable-python target, i.e. if you're excluding all the python functionality from samba, then WAF should still support being built with python2. The use case here is old unix platforms that want to use smbd, but don't have python3 support. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Remove ${EXTRA_PYTHON} variableTim Beale2019-02-151-17/+8
| | | | | | | | We no longer build the python2 bindings, only python3. So we can get rid of this variable now. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>