]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-systemctl-enable: skip test for %v if kver is not a valid instance
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 29 Mar 2022 20:39:08 +0000 (22:39 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 29 Mar 2022 20:39:32 +0000 (22:39 +0200)
On arm, we'd fail with:
target@v:5.16.8-200.fc35.armv7hl+lpae.socket: not a valid unit name "target@v:5.16.8-200.fc35.armv7hl+lpae.socket": Invalid argument

test/test-systemctl-enable.sh

index ac1bcc1cc7f8f4b78c11fa1f2b9536ce7b698132..f40831cf8c7ae12cb7bc19ed6a1bc7bdc47f38d0 100644 (file)
@@ -648,7 +648,8 @@ check_alias N 'some-some-link6@'
 
 check_alias p 'some-some-link6'
 
-check_alias v "$(uname -r)"
+uname -r | grep -q '[^a-zA-Z0-9_.\\-]' || \
+    check_alias v "$(uname -r)"
 
 # % is not legal in unit name
 ( ! check_alias % '%' )