From aeab1bdc7ddc69b8e292c53fcbf4e182241aa50d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Sat, 26 Oct 2019 19:12:05 +0300 Subject: [PATCH] Cherry-pick: Fall back to pkill in run_ctrl_c.sh The pkill executable is provided by the same package that provides ps which is why it is more likely to be installed. Seems that the test VMs don't always have killall installed. Run the MaxScale process with the maxscale user instead of the root user to prevent any new files from being owned by a different user. Cherry-picked the commit a06c122a5e050071589f724758d6bbd3d8d3f419 from develop. --- maxscale-system-test/test_ctrl_c/start_killer.sh | 2 +- maxscale-system-test/test_ctrl_c/test_ctrl_c.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maxscale-system-test/test_ctrl_c/start_killer.sh b/maxscale-system-test/test_ctrl_c/start_killer.sh index 697db3571..b5998a86b 100755 --- a/maxscale-system-test/test_ctrl_c/start_killer.sh +++ b/maxscale-system-test/test_ctrl_c/start_killer.sh @@ -1,3 +1,3 @@ sleep 5 -sudo /usr/bin/killall maxscale -s INT +sudo /usr/bin/killall maxscale -s INT || sudo pkill -INT maxscale diff --git a/maxscale-system-test/test_ctrl_c/test_ctrl_c.sh b/maxscale-system-test/test_ctrl_c/test_ctrl_c.sh index 0eb2d64d8..be17ee7f7 100755 --- a/maxscale-system-test/test_ctrl_c/test_ctrl_c.sh +++ b/maxscale-system-test/test_ctrl_c/test_ctrl_c.sh @@ -10,7 +10,7 @@ fi T="$(date +%s)" -sudo maxscale -d -U root +sudo maxscale -d -U maxscale if [ $? -ne 0 ] ; then exit 1 fi