From badd81d2d5bfb88e25c0a12e77022aa5d94384ab Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 15 Aug 2024 01:36:53 +0200 Subject: [PATCH] [MTR] Start using '--port-base' option instead of MTR_BUILD_THREAD Explanation of the options per: https://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_MYSQL_TEST_RUN_PL.html --port-base=P The value may also be given with the environment variable MTR_PORT_BASE. The variable MTR_PORT_BASE is a more logical replacement for the original variable MTR_BUILD_THREAD. It gives the actual port number directly (will be rounded down to a multiple of 10). If you use MTR_BUILD_THREAD, the port number is found by multiplying this by 10 and adding 10000. Specify base of port numbers to be used; a block of 10 will be allocated. P should be divisible by 10; if it is not, it will be rounded down. If running with more than one parallel test thread, thread 2 will use the next block of 10 and so on. If the port number is given as auto, which is also the default, mysql-test-run.pl will allocate a number unique to this host. --port-base was added as a more logical alternative to --build-thread. If both are used, --port-base takes precedence. --- mysql8.4.spec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mysql8.4.spec b/mysql8.4.spec index c27856a..569662a 100644 --- a/mysql8.4.spec +++ b/mysql8.4.spec @@ -761,18 +761,13 @@ pushd %_vpath_builddir pushd mysql-test cp ../../mysql-test/%{skiplist} . -# Builds might happen at the same host, avoid collision -# The port used is calculated as 10 * MTR_BUILD_THREAD + 10000 -# The resulting port must be between 5000 and 32767 -export MTR_BUILD_THREAD=$(( $(date +%s) % 2200 )) - ( set -ex cd %{buildroot}%{_datadir}/mysql-test export common_testsuite_arguments=" %{?with_debug:--debug-server} \ --force --skip-combinations --report-unstable-tests --clean-vardir --nocheck-testcases \ - --suite-timeout=900 --testcase-timeout=30 \ + --suite-timeout=900 --testcase-timeout=30 --port-base=$(( $(date +%s) % 20000 + 10000 )) \ --parallel=auto --retry=3 --max-test-fail=30 " # If full testsuite has already been run on this version and we don't explicitly want the full testsuite to be run