From 23350b59391ec56c0671a3524d6d87864751a65c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 21 Jan 2021 16:19:43 -0800 Subject: [PATCH] ci/freedreno: Do our piglit runs against Xorg. We were using surfaceless, which misses out on some useful coverage we'd like to have in the GLX/EGL piglit tests, but more importantly prevented many traces from running. Reviewed-by: Daniel Stone Part-of: --- .gitlab-ci.yml | 7 ++++--- .gitlab-ci/bare-metal/init.sh | 21 +++++++++++++++++++++ .gitlab-ci/bare-metal/rootfs-setup.sh | 1 + .gitlab-ci/piglit/run.sh | 4 ++++ 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f36eb7a774a..79bdbd031d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1143,7 +1143,7 @@ arm64-a630-traces: - .arm64-a630-test variables: BARE_METAL_TEST_SCRIPT: "/install/piglit/run.sh" - EGL_PLATFORM: "surfaceless" + BM_START_XORG: 1 PIGLIT_REPLAY_DESCRIPTION_FILE: "/install/traces-freedreno.yml" PIGLIT_REPLAY_DEVICE_NAME: "freedreno-a630" PIGLIT_RESULTS: "freedreno-a630-replay" @@ -1463,6 +1463,7 @@ arm64_a630_vk_sysmem: - .test-manual variables: BARE_METAL_TEST_SCRIPT: "/install/piglit/run.sh" + BM_START_XORG: 1 # Excluding various features we don't support to keep runtime down in # deciding that they aren't supported. # @@ -1512,7 +1513,6 @@ arm64_a630_vk_sysmem: -x glsl-4.50 -x glsl-4.60 -x gl-1.3-texture-env - PIGLIT_PLATFORM: gbm # Takes ~20 minutes, so manual-only until we can sort out runtime. arm64_a630_piglit_gl: @@ -1564,6 +1564,7 @@ arm64_a630_piglit_shader: variables: BM_ROOTFS: /lava-files/rootfs-arm64 FLAKES_CHANNEL: "#freedreno-ci" + PIGLIT_PLATFORM: mixed_glx_egl script: - ./install/bare-metal/fastboot.sh needs: @@ -1670,6 +1671,7 @@ arm64_a530_gles31: - .test-manual variables: BARE_METAL_TEST_SCRIPT: "/install/piglit/run.sh" + BM_START_XORG: 1 # SMP is disabled in the current kernels for db820c. FDO_CI_CONCURRENT: 1 # Excluding for flakes in multisample (MSAA fails covered well by deqp, we @@ -1706,7 +1708,6 @@ arm64_a530_gles31: -x glsl-4.50 -x glsl-4.60 -x gl-1.3-texture-env - PIGLIT_PLATFORM: gbm # Takes ~25 minutes, so manual-only until we can sort out runtime. arm64_a530_piglit_gl: diff --git a/.gitlab-ci/bare-metal/init.sh b/.gitlab-ci/bare-metal/init.sh index e152a26d159..eabdd1cdf76 100755 --- a/.gitlab-ci/bare-metal/init.sh +++ b/.gitlab-ci/bare-metal/init.sh @@ -25,6 +25,27 @@ sntp -sS pool.ntp.org || true # expire after 5 minutes, so we poll for them). ./capture-devcoredump.sh & +# If we want Xorg to be running for the test, then we start it up before the +# BARE_METAL_TEST_SCRIPT because we need to use xinit to start X (otherwise +# without using -displayfd you can race with Xorg's startup), but xinit will eat +# your client's return code +if [ -n "$BM_START_XORG" ]; then + echo "touch /xorg-started; sleep 100000" > /xorg-script + env \ + LD_LIBRARY_PATH=/install/lib/ \ + LIBGL_DRIVERS_PATH=/install/lib/dri/ \ + xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -dpms -logfile /Xorg.0.log & + + # Wait for xorg to be ready for connections. + for i in 1 2 3 4 5; do + if [ -e /xorg-started ]; then + break + fi + sleep 5 + done + export DISPLAY=:0 +fi + if sh $BARE_METAL_TEST_SCRIPT; then OK=1 else diff --git a/.gitlab-ci/bare-metal/rootfs-setup.sh b/.gitlab-ci/bare-metal/rootfs-setup.sh index ac4cd96117a..f1108fd1c26 100644 --- a/.gitlab-ci/bare-metal/rootfs-setup.sh +++ b/.gitlab-ci/bare-metal/rootfs-setup.sh @@ -16,6 +16,7 @@ chmod +x $rootfs_dst/set-job-env-vars.sh for var in \ BARE_METAL_TEST_SCRIPT \ BM_KERNEL_MODULES \ + BM_START_XORG \ CI_COMMIT_BRANCH \ CI_COMMIT_TITLE \ CI_JOB_JWT \ diff --git a/.gitlab-ci/piglit/run.sh b/.gitlab-ci/piglit/run.sh index 631f38d624e..f3e4f4c78a7 100755 --- a/.gitlab-ci/piglit/run.sh +++ b/.gitlab-ci/piglit/run.sh @@ -107,6 +107,10 @@ else fi elif [ "x$PIGLIT_PLATFORM" = "xgbm" ]; then SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD --platform gbm --api gl" + elif [ "x$PIGLIT_PLATFORM" = "xmixed_glx_egl" ]; then + # It is assumed that you have already brought up your X server before + # calling this script. + SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD --platform glx --api gl --profile core" else SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD --platform glx --api gl --profile core" RUN_CMD_WRAPPER="xvfb-run --server-args=\"-noreset\" sh -c"