summaryrefslogtreecommitdiff
path: root/script
AgeCommit message (Collapse)AuthorFilesLines
2019-02-27autobuild: try to distribute the tasks a bit moreStefan Metzmacher1-21/+21
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-02-27autobuild: spread ad-dc tests over 6 autobuild/ci separate tasks/jobsStefan Metzmacher1-12/+62
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-02-27autobuild: add samba-ad-member taskStefan Metzmacher1-3/+15
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-02-27autobuild: run ad_dc_backup tests in samba-ad-dc-backupStefan Metzmacher1-3/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-02-27autobuild: move maptoguest and simpleserver to 'samba-fileserver'Stefan Metzmacher1-1/+7
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-02-27autobuild: move nt4_dc_schannel out of 'samba'Stefan Metzmacher1-1/+6
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-02-27selftest:Samba4: add ad_dc_backup alias to ad_dcStefan Metzmacher1-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>
2019-02-27selftest:Samba4: add ad_dc_default alias to ad_dc_ntvfsStefan Metzmacher1-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>
2019-02-27selftest:Samba4: add ad_dc_slowtests alias to ad_dc_ntvfsStefan Metzmacher1-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>
2019-02-27selftest:Samba4: add fl2008dc as alias to ad_dc_ntvfsStefan Metzmacher1-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>
2019-02-20selftest: Add basic sanity-check tests for nopython targetTim Beale1-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
2019-02-15autobuild: Drop 'py2' flagTim Beale1-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>
2019-02-15autobuild: Replace samba-buildpy2-only with samba-nopython-py2Tim Beale1-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>
2019-02-15autobuild: Remove ${EXTRA_PYTHON} variableTim Beale1-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>
2019-02-15autobuild: Tidy up unnecessary line-breaks in 'TESTS='Tim Beale1-21/+10
Now that we've dropped the {PY3_ONLY} variable, there's no need for line-breaks in some of the 'TESTS=' values. We can tidy this up a bit. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-02-15autobuild: Remove the PY3_ONLY variableTim Beale1-13/+10
This variable is no longer needed as all the tests run using python3 now. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-02-15autobuild: Update variable name to make more senseTim Beale1-4/+4
When we switched from python2 being the default to python3, we didn't update this variable name. It's now handling the python2 case, but it's a boolean flag named 'py3', which is rather confusing. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-02-15autobuild: Drop py2 autobuild jobsTim Beale1-6/+0
Samba v4.11 will no longer support python2, so let's drop the autobuild jobs. This will save some gitlab/sn-devel time and money, as it's less work for CI to do. Note that this highlights some previous inconsistencies: - samba-none-env-py2 was being built for gitlab but not sn-devel. - samba-nt4-py2 was being built for sn-devel but not gitlab I've left samba-buildpy2-only for now, which will be addressed in a subsequent patch. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-02-14script/autobuild.py: add 'lsb_release -a' and 'mount' to system-info.txtStefan Metzmacher1-0/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-02-11CI: split out "samba-ad-dc-ntvfs[-py2]" test targetsRalph Boehme1-6/+20
Many AD tests currently use the "samba" target. Split out a new target "samba-ad-dc-ntvfs" and have all tests that use the "ad_dc_ntvfs" env use the new target. This should greatly speed up the runtime for the "samba" target and avoid swapping. This reduces the total CI time by ~ 55%, I got an autobuild and a gitlab pipeline finished in just ~ 100 mins! Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Mon Feb 11 14:10:12 CET 2019 on sn-devel-144
2019-02-05autobuild: Split backup/restore testenvs out into separate jobTim Beale1-0/+12
The samba-ad-dc-2 job was reaching its limits with the number of testenvs and what the resource-limited CI machines can handle. Samba processes were getting swapped out of memory, causing CI runs to fail. This patch splits the backup/restore testenv targets into a separate autobuild job: samba-ad-dc-backup. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Feb 5 12:23:31 CET 2019 on sn-devel-144
2019-01-23traffic: rm --scale-traffic default valueJoe Guo1-1/+1
-S, --scale--traffic defaults to 1.0 when we switch to new option -T, both -T and -S are set, which raise an error: script/traffic_replay #234: --scale-traffic and --packets-per-second are incompatible. Use one or the other. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Tim Beale <timbeale@catalyst.net.nz> Autobuild-User(master): Tim Beale <timbeale@samba.org> Autobuild-Date(master): Wed Jan 23 03:09:41 CET 2019 on sn-devel-144
2019-01-17generate_param.py: Use C99 initializer for last element in param tableAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-08traffic_replay: use packets per second as primary scaleDouglas Bagnall1-3/+16
The old -S/--scale-traffic is relative to the original model, which made its relationship to true traffic volumes quite opaque Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic_replay: --old-scale to mimic the old traffic_replayDouglas Bagnall1-0/+10
traffic_replay had a broken sense of traffic scale. That is fixed, but in order to compare old and new tests, it helps to be able to approximate the old behaviour. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic: add option to reanimate dying conversationsDouglas Bagnall1-1/+6
The traffic model is generated from a window in time, which makes conversations appear to start and stop unnaturally at the window boundaries. When the window is short compared to the traffic replay time and the true expected conversation length, this has a significant distorting effect, leading to more conversations than would be expected to generate a given number of packets. To offset this slightly we add the --conversation-persistence option which tries to convert apparent death into a longish wait. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic_model: don't report generation errors as parse errorsDouglas Bagnall1-16/+10
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic: improve debug messages in traffic_replayDouglas Bagnall1-7/+6
tracebacks and less nonsense at higher debug levels. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic: traffic_replay --latency-timeout to control final waitDouglas Bagnall1-0/+3
Conversations that haven't finished within some acceptable margin of on-time can be said to have failed. This is where you specify that margin. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic_replay: --stop-on-any-error option to not ignore client troubleDouglas Bagnall1-1/+4
Sometimes you want to know if any client is crashing for any reason. In those times use --stop-on-any-error for an early exit. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic: rework conversation generation to better use memoryDouglas Bagnall1-1/+1
Use less memory altogether and don't allocated shared mutable before the fork. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic: generate sparser descriptions of conversationsDouglas Bagnall1-6/+7
Rather than building all the packets at this point, we stick to the barest details of the packets (which is all the model gives us anyway). The advantage is that will take a lot less memory, which matters because this process forks into many clients that were sharing and mutate the conversation list. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic: new version of model with packet_rate, version numberDouglas Bagnall1-1/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic: delete empty temp directoriesDouglas Bagnall1-1/+10
even if someone asked to keep the temporary data, they don't want to see 5000 empty directries. Non-empty directories will remain. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic learner: avoid truncated output files on errorDouglas Bagnall1-1/+8
add_argument(type=argparse.FileType('w'), ...) will open the file and leave it empty if the script fails. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic_learner: use samba.logger, not print(file=sys.stderr)Douglas Bagnall1-4/+8
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic_learner: return an error codeDouglas Bagnall1-4/+3
And use it in tests, rather than expecting exact strings. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic: use default value for --durationDouglas Bagnall1-7/+3
We could not do this when we replayed traffic summaries (as opposed to models), but now this script does not do that. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic_replay: drop summary replayDouglas Bagnall1-36/+22
The traffic_replay script has been able to replay a replay log as well as a model, which was not used in practice and complicated the script. If we want that feature, we can make a new script for it. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic replay: allow --random-seed=0Douglas Bagnall1-2/+2
Zero is a valid seed. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-12-14PY3: change shebang to python3 in script dirJoe Guo4-4/+4
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2018-12-12autobuild: convert top_commit_msg to str for Py 3Douglas Bagnall1-0/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-12-12autobuild: py3: cope with bytes when compiling system-info.txtDouglas Bagnall1-3/+8
The command output looks like b'foo\nbar' in string-space. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-12-10autobuild: We should run autobuild with python3 by defaultNoel Power1-1/+1
sn-devel autobuild runing autobuild.py (via git hooks I suppose) but if run directly (e.g. depending on script shebang) then 'python' aka python2 will run. This will cause an error when building some targets because the autobuild script itself sometimes builds paths based on the version of python executing the script e.g ${PYTHON_PREFIX}. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-12-10autobuild: Convert old py3 tasks to py2Noel Power1-8/+8
Now that we are building with python3 by default we need to convert the old python3 test tasks to python2 (e.g. reverse how we used do it) Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-12-10autobuild: Adjust autobuild for PY2/PY3 get_python_lib behaviourNoel Power1-4/+4
The resuls of get_python_lib are different between python2 & python3 and this results in autobuild generating the wrong PYTHONPATH with python3. python2 ======= print ("%s" % get_python_lib(standard_lib=1, prefix='/my/prefix')) /my/prefix/lib64/python2.7 python3 print ("%s" % get_python_lib(standard_lib=1, prefix='/my/prefix')) /my/prefix/lib/python3.6 But with addition of plat_specific param the results are the same python2 ======= print ("%s" % get_python_lib(plat_specific=1, standard_lib=0, prefix='/my/prefix')) /my/prefix/lib64/python2.7/site-packages python3 ======= print ("%s" % get_python_lib(plat_specific=1, standard_lib=0, prefix='/my/prefix')) /my/prefix/lib64/python3.6/site-packages Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-12-10autobuild: Modify old samba_buildpy3_only job to python2Noel Power1-6/+6
Since autobuild now builds python3 by default we need to change the previously buildpy3 only job to python2 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-12-10script: Fix failing build_xc jobNoel Power1-0/+14
build_xc job uses compare_cc_results.py to compare cache files, the cache files are stringified hash maps, the results in python 3.4 don't compare well due to inconsistent order of dict key/value pairs when the cache files are created. While comparing the file contents works fine in python3.6 it fails with python3.4. This patch detects problematic dict lines and rewrites the value for comparison Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-12-10autobuild: Remove temporary purepy3 tasksNoel Power1-82/+0
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-12-10CI: Add new (TEMP) pure python3 autobuild jobs for samba-build & samba-nt4Noel Power1-0/+39
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>