Reading config file fails with latest GCC in Debian
Debian's test infrastructure discovered that osk-sdl built with GCC 12 fails to read it's config file. Specifically, the test output is:
autopkgtest [05:11:09]: test test-functional: [-----------------------
** Testing key script with 'physical' key input
INFO: osk-sdl v0.66
ERROR: Syntax error on line 4
ERROR: Could not parse config file: ./osk.conf
ERROR: No valid config file specified, use -c [path]
ERROR: Unexpected result!
got:
expected: postmarketOS
** Testing osk toggle button and 'mouse' key input
INFO: osk-sdl v0.66
ERROR: Syntax error on line 4
ERROR: Could not parse config file: ./osk.conf
ERROR: No valid config file specified, use -c [path]
ERROR: Unexpected result!
got:
expected: qwerty
autopkgtest [05:11:25]: test test-functional: -----------------------]
autopkgtest [05:11:25]: test test-functional: - - - - - - - - - - results - - - - - - - - - -
test-functional FAIL non-zero exit status 2
autopkgtest [05:11:25]: @@@@@@@@@@@@@@@@@@@@ summary
test-machine-functional SKIP Test requires machine-level isolation but testbed does not provide that
test-functional FAIL non-zero exit status 2
I have narrowed this down to the first check in https://gitlab.postmarketos.org/postmarketos/osk-sdl/-/blob/master/src/config.cpp#L197, which seems to always return false
now, even though eq
and val
are correctly set.
While playing around with it myself, removing just this part of the check allows the config to be loaded successfully, though some keypresses are still missed. This may be an issue with the test or some other bug.
The failing config file is mostly default.
# Config file for osk-sdl
# The space around the = is important
wallpaper = #000000
keyboard-background = #0E0E12
keyboard-map = us
keyboard-font = /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
keyboard-font-size = 24
key-foreground = #FFFFFF
key-foreground-highlighted = #0E0E12
key-background-letter = #5A606A
key-background-return = #003C00
key-background-other = #32363E
key-background-highlighted = #FFFFFF
key-radius = 0
key-vibrate-duration = 100
key-preview-popup = true
inputbox-foreground = #FFFFFF
inputbox-foreground-error = #7E141A
inputbox-background = #32363E
inputbox-background-error = #E76A63
inputbox-radius = 0
animations = true
Edited by Administrator