]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-73-LOCALE: do not unnecessarily restart systemd-localed
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 13 Mar 2025 03:11:40 +0000 (12:11 +0900)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 13 Mar 2025 08:24:49 +0000 (09:24 +0100)
It is not necessary to clear previous keymap assignment, as
`localectl set-keymap` will anyway overwrite the previous assignment.

This drops the unnecessary restart of systemd-localed in the loop.
The mkosi test image contains about 500~700 keymaps. The test
performance is greatly improved by reducing the number of restarts,
especially when the test is running with sanitizers.

On Fedora 41 with sanitizers,
Before:
1/1 systemd:integration-tests / TEST-73-LOCALE OK             1157.50s
After:
1/1 systemd:integration-tests / TEST-73-LOCALE OK              104.43s

test/units/TEST-73-LOCALE.sh

index 0617bd0d51a1db8f851c7b279b5262e716220deb..de935183ad6345251ba4efab0d6751b7dcbf4bb6 100755 (executable)
@@ -209,11 +209,6 @@ testcase_vc_keymap() {
     assert_in "VC Keymap:" "$(localectl)"
 
     for i in $(localectl list-keymaps); do
-        # clear previous conversion from VC -> X11 keymap
-        systemctl stop systemd-localed.service
-        wait_vconsole_setup
-        rm -f /etc/vconsole.conf /etc/X11/xorg.conf.d/00-keyboard.conf /etc/default/keyboard
-
         # set VC keymap
         assert_rc 0 localectl set-keymap "$i"
         output=$(localectl)