libsdl-org/sdl2-compat

test failure in video_getSetWindowGrab but only if running all suites

smcv opened this issue · 3 comments

Steps to reproduce

Originally reproduced with SDL3 libsdl-org/SDL@bec1b8f and sdl2-compat ee88d35.

Still reproducible with the newest version I have tested, SDL3 libsdl-org/SDL@82f2c4d and sdl2-compat 76ab1f9.

$ podman run --rm -it -w $(pwd) -v $(pwd):$(pwd):rw -v $(pwd)/.git:$(pwd)/.git:ro debian:sid-slim
# sed -i \
  -e 's/Types: deb/& deb-src/' \
  -e 's/Suites: sid/& experimental/' \
  /etc/apt/sources.list.d/debian.sources
# apt update
# apt upgrade
# apt install cmake libsdl3-dev
# cmake -S . -B _build -DSDL2COMPAT_TESTS=ON
# make -C _build
# make -C _build test

(the steps above are similar to how I'm intending to build sdl2-compat in Debian)

If the tests fail, debug with:

# cd _build/test
# export SDL_VIDEO_DRIVER=dummy SDL_AUDIO_DRIVER=dummy
# ./testautomation --filter video_getSetWindowGrab

Expected result

All tests should ideally pass.

Actual result

I see three test failures in make test: audio_resampleLoss (#95), mouse_getMouseFocus (#125), video_getSetWindowGrab (this issue).

This one cannot be reproduced by running just that one test, or by running with --filter Video - so perhaps state from one of the failing tests is leaking into it? So there's probably little point in investigating this issue in detail until #95 and #125 are solved.

This one cannot be reproduced by running just that one test, or by running with --filter Video - so perhaps state from one of the failing tests is leaking into it? So there's probably little point in investigating this issue in detail until #95 and #125 are solved.

Hmm, no. If I disable audio_resampleLoss and mouse_getMouseFocus with TEST_DISABLED, this one still fails. So state must be leaking into it from something outside the Video suite.

Still the same situation with SDL3 libsdl-org/SDL@82f2c4d and sdl2-compat 76ab1f9: testautomation has video_getSetWindowGrab (among others) failing, but testautomation --filter Video or testautomation --filter video_getSetWindowGrab succeeds.

This was an sdl2-compat bug, fixed in e7395ab