summaryrefslogtreecommitdiff
path: root/script
Commit message (Collapse)AuthorAgeFilesLines
* autobuild: Add _FORTIFY_SOURCE=2 to the -O3 buildAndreas Schneider2018-11-281-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* script: Add new (temporary) pure python3 ad-dc-2 testNoel Power2018-11-141-0/+18
| | | | | | | | | | | Ideally we want all the tests to run under python3 by default (no special task for this) and then convert the existing '-py3' tasks to run the python tests with python3. However at the moment the convertion process is not ready to do this, for a while we need to run separate autobuild tasks for this. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* traffic_replay: Rework machine accounts to remove redundant codeTim Beale2018-11-071-0/+1
| | | | | | | | | | | | | | | generate_users_and_groups() now generates the machine acounts as well as the user accounts, so it seems there's no need to also have generate_traffic_accounts(), which does the same job. Instead, we can just pass through the number of machine acounts to generate_users_and_groups() and delete the other function. Also updated generate_users_and_groups() so that machine_accounts is no longer optional (we want to create machine accounts in all cases). Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* traffic_replay: Move 'traffic account' flag up a levelTim Beale2018-11-071-2/+4
| | | | | | | | | | | | | | | | | | We create machine accounts for 2 different purposes: 1). For traffic generation, i.e. testing realistic network packets. 2). For generating a realistic large DB. Unfortunately, we want to use different userAccountControl flags for the 2 different cases. Commit 3338a3e257fa9f28 changed the flags used for case #2, but this breaks case #1. The problem is generate_users_and_groups() is called in both cases, so we want the 'traffic account' flag passed into that function. This ensures that the machine accounts get created with the appropriate userAccountControl flags for the particular case you want to test. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* traffic_replay: Move machine account creationTim Beale2018-11-071-1/+5
| | | | | | | | | | | | | I was assuming that generate_users_and_groups() only gets called in the --generate-users-only case. However, it also gets called in the default traffic replay case. This patch reworks the code so that the number of machine accounts to create gets passed in, and the 'create 25% more computers than users' assumption only applies to the --generate-users-only case. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: remove unused variablesDouglas Bagnall2018-11-011-2/+0
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <noel.power@suse.com>
* traffic_replay: Exception has no .messageDouglas Bagnall2018-11-011-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <noel.power@suse.com>
* script/show_test_time: attempt py3 compatDouglas Bagnall2018-11-011-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <noel.power@suse.com>
* traffic_replay: logger was ignoring smb.conf log-levelTim Beale2018-10-311-1/+1
| | | | | | | | | We were trying to access the debug-level (in python C bindings) before the smb.conf had been loaded and actually set the debug-level. So it would default to zero, regardless of what was in the smb.conf. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* traffic_replay: Generate users faster by writing to local DBTim Beale2018-10-311-1/+11
| | | | | | | | | | | | | | | | | | | | We can create user accounts much faster if the LDB connection talks directly to the local sam.ldb file rather than going via LDAP. This patch allows the 'host' argument to the tool to be a .ldb file (e.g. "/usr/local/samba/private/sam.ldb") instead of a server name/IP. In most cases, the traffic_replay tool wants to run on a remote device (because the point of it is to send traffic to the DC). However, the --generate-users-only is one case where the tool can be run locally, directly on the test DC. (The traffic_replay user generation is handy for standalone testing, because it also handles assigning group memberships to the generated user accounts). Note that you also need to use '--option="ldb:nosync = true"' to get the improvement in performance. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* script/show_test_time: approach python 3 compatibilityDouglas Bagnall2018-10-251-3/+3
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
* script/generate_param.py: remove unused importsDouglas Bagnall2018-10-251-4/+0
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
* CI/Autobuild: Remove samba-none-env-py3 testNoel Power2018-10-231-1/+0
| | | | | | | | | | | | We now run a purepython3 none-env test, later when the whole build is running under python3 we will resurrect this job but as (samba-none-env-py2) for python2 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Oct 23 09:10:22 CEST 2018 on sn-devel-144
* script: Add new (temporary) autobuild task for none-env tests.Noel Power2018-10-231-0/+13
| | | | | | | | | | | Ideally we want all the tests to run under python3 by default (no special task for this) and then convert the existing '-py3' tasks to run the python tests with python3. However at the moment the convertion process is not ready to do this, for a while we need to run separate autobuild tasks for this. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/traffic_replay: apply new logger to replace printJoe Guo2018-10-101-51/+57
| | | | | | | | Use logger to replace print Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/traffic_replay: get debug level via apiJoe Guo2018-10-101-4/+5
| | | | | | | | | | | The -d option will set samba global debug level automatically. We should not parse and use the passed in value. Use samba.get_debug_level instead. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/traffic_replay: print packets data to stderrJoe Guo2018-10-101-2/+2
| | | | | | | | | This is debug info, should print to stderr. Otherwise it will flood stdout. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* third_party: Add pam_set_items.so from pam_wrapperMathieu Parent2018-10-021-0/+1
| | | | | | | Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Mathieu Parent <math.parent@gmail.com> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* script: add new autobuild task for building pure python3Noel Power2018-09-281-0/+8
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* turn --with-json-audit into global --with-jsonPhilipp Gesang2018-09-261-1/+1
| | | | | | | | | | Fold the build option --with-json-audit into the toplevel wscript to reflect the fact that JSON support is no longer local to the audit subsystem. Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild: Fix formatting in send_emailAlexander Bokovoy2018-09-051-1/+1
| | | | | | | | Commit cb40e2bbc8a34a1ec3584ab585c5bf44c037ef0e introduced a print statement with a broken formatting. Reported by pylint. Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild: re-use CACHE_SUFFIX from waflibAlexander Bokovoy2018-09-051-1/+11
| | | | | Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build:wafsamba: Ignore cfg_file absolute paths differencesThomas Nagy2018-09-051-0/+3
| | | | | | | | Due to build variants, cfg_file paths are written as absolute paths. Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild: use --out instead of -b when calling configureThomas Nagy2018-09-051-2/+2
| | | | | | Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build:wafsamba: detail where we are processing the autobuildThomas Nagy2018-09-051-2/+2
| | | | | | Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Avoid subshell for tail -f invocationAndrew Bartlett2018-08-291-5/+5
| | | | | | | | | | | | | This should mean one less process in the process tree, and less places to hold FDs open. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13591 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Aug 29 08:20:55 CEST 2018 on sn-devel-144
* autobuild: use close_fds=True to avoid *.stderr and *.stdout inheriting into ↵Andrew Bartlett2018-08-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | every process This closes fds other than 0, 1, 2. This ensures only the correct *.stderr and *.stdout is attached, via the stdout/stderr parameter to Popen(), but not every other FD currently open in python at the time Popen is called. For the tail invocation and other calls to Popen(), because fds 0, 1, 2 are still attached, these function as before. Per https://docs.python.org/2.6/library/subprocess.html: "If close_fds is true, all file descriptors except 0, 1 and 2 will be closed before the child process is executed. (Unix only)." And regarding the passed in parameters: "stdin, stdout and stderr specify the executed programs’ standard input, standard output and standard error file handles, respectively. " ... "With None (the default), no redirection will occur; the child’s file handles will be inherited from the parent. " (The unwanted inherited files would be on a random high FD, where the program wouldn't know what to do with them, but counting towards the process FD limit). BUG: https://bugzilla.samba.org/show_bug.cgi?id=13591 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* autobuild: Move backup/restore environments into to samba-ad-dc-2 autobuild jobAndrew Bartlett2018-08-291-2/+15
| | | | | | | | This tries to to split up the tasks more evenly and may help with the python3 work by isolating them from the long samba job. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* autobuild: Move ad_dc_no_nss into to samba-ad-dc-2 autobuild jobAndrew Bartlett2018-08-291-1/+5
| | | | | | | | This tries to to split up the tasks more evenly and may help with the python3 tests against this environment if started from a more isolated job. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* autobuild: Reduce duplication of task list in autobuildAndrew Bartlett2018-08-291-32/+6
| | | | | | | | | | | The defaulttasks or builddirs are often updated out of sync, which causes confusion until it is resolved. We simply choose "." as the builddir for the tasks that are not in the default set. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* autobuild: Implement a split python2 and python2 build patternAndrew Bartlett2018-08-291-28/+59
| | | | | | | | | | The default tasks will run the tests without --extra-python specified and the new -py3 tasks will run the python3 tests only. This will reduce the complexity of the build combinations Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* autobuild: Fix -py3 support to look in tasks (the table with the tests) not ↵Andrew Bartlett2018-08-271-1/+1
| | | | | | | tasknames (the requested list) Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* autobuild: Allow automatic handling of autobuild tasks ending in -py3Andrew Bartlett2018-08-251-2/+9
| | | | | | | | | | | This will allow splitting up of the python2 and python3 tests without duplication of this already complex file. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Aug 25 11:53:15 CEST 2018 on sn-devel-144
* PEP8: improve spacing around colonsDouglas Bagnall2018-08-241-10/+10
| | | | | | | These dropped out of Joe's patches during rebase and review. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* PEP8: fix W291: trailing whitespaceJoe Guo2018-08-241-4/+4
| | | | | | 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>
* PEP8: fix E703: statement ends with a semicolonJoe Guo2018-08-241-1/+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>
* PEP8: fix E401: multiple imports on one lineJoe Guo2018-08-242-2/+7
| | | | | | 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>
* PEP8: fix E305: expected 2 blank lines after class or function definition, ↵Joe Guo2018-08-243-0/+7
| | | | | | | | 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>
* PEP8: fix E303: too many blank lines (2)Joe Guo2018-08-241-1/+0
| | | | | | 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>
* PEP8: fix E302: expected 2 blank lines, found 1Joe Guo2018-08-243-0/+15
| | | | | | 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>
* PEP8: fix E261: at least two spaces before inline commentJoe Guo2018-08-241-4/+4
| | | | | | 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>
* PEP8: fix E251: unexpected spaces around keyword / parameter equalsJoe Guo2018-08-242-4/+4
| | | | | | 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>
* PEP8: fix E231: missing whitespace after ','Joe Guo2018-08-243-4/+4
| | | | | | 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>
* PEP8: fix E226: missing whitespace around arithmetic operatorJoe Guo2018-08-241-1/+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>
* PEP8: fix E225: missing whitespace around operatorJoe Guo2018-08-243-3/+3
| | | | | | 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>
* PEP8: fix E222: multiple spaces after operatorJoe Guo2018-08-241-1/+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>
* PEP8: fix E203: whitespace before ':'Joe Guo2018-08-242-38/+38
| | | | | | 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>
* PEP8: fix E202: whitespace before ')'Joe Guo2018-08-242-25/+25
| | | | | | 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>
* PEP8: fix E201: whitespace after '('Joe Guo2018-08-241-14/+14
| | | | | | 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>
* PEP8: fix E128: continuation line under-indented for visual indentJoe Guo2018-08-243-12/+12
| | | | | | 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>