Bug 1214809: use 'sudo' instead of 'su' to drop root privs; r=ted
authorDustin J. Mitchell <dustin@mozilla.com>
Tue, 20 Oct 2015 18:12:09 -0400
changeset 268986 d43d4d4e26fbb3f9a2217a53bb61cfab1828f6dc
parent 268985 0df6d6188fee64b4692499eaddb3985e5e4779e1
child 268987 8fa7f0e6243bd00915c3b2b025d54f7a39a32709
push id29567
push userkwierso@gmail.com
push dateThu, 22 Oct 2015 23:37:33 +0000
treeherdermozilla-central@3888eea6aaf2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1214809
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1214809: use 'sudo' instead of 'su' to drop root privs; r=ted
testing/docker/desktop-test/VERSION
testing/docker/desktop-test/bin/test.sh
testing/taskcluster/scripts/tester/test-linux.sh
--- a/testing/docker/desktop-test/VERSION
+++ b/testing/docker/desktop-test/VERSION
@@ -1,1 +1,1 @@
-0.4.0
+0.4.2
--- a/testing/docker/desktop-test/bin/test.sh
+++ b/testing/docker/desktop-test/bin/test.sh
@@ -7,17 +7,17 @@ set -x -e
 : WORKSPACE                     ${WORKSPACE:=/home/worker/workspace}
 
 
 # TODO: when bug 1093833 is solved and tasks can run as non-root, reduce this
 # to a simple fail-if-root check
 if [ $(id -u) = 0 ]; then
     chown -R worker:worker /home/worker
     # drop privileges by re-running this script
-    exec su worker /home/worker/bin/test.sh -- "${@}"
+    exec sudo -E -u worker bash /home/worker/bin/test.sh "${@}"
 fi
 
 ####
 # Now get the test-linux.sh script from the given Gecko tree and run it with
 # the same arguments.
 ####
 
 [ -d $WORKSPACE ] || mkdir -p $WORKSPACE
--- a/testing/taskcluster/scripts/tester/test-linux.sh
+++ b/testing/taskcluster/scripts/tester/test-linux.sh
@@ -42,18 +42,18 @@ rm mozharness.zip
 if ! [ -d mozharness ]; then
     echo "mozharness zip did not contain mozharness/"
     exit 1
 fi
 
 # start up the pulseaudio daemon.  Note that it's important this occur
 # before the Xvfb startup.
 if $NEED_PULSEAUDIO; then
-    echo "Pulseaudio is not yet supported in desktop-test; See Bug 1214809"
-    exit 1
+    pulseaudio --fail --daemonize --start
+    pactl load-module module-null-sink
 fi
 
 # run XVfb in the background, if necessary
 if $NEED_XVFB; then
     Xvfb :0 -nolisten tcp -screen 0 1600x1200x24 &
     export DISPLAY=:0
     xvfb_pid=$!
     # Only error code 255 matters, because it signifies that no