]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add LoongArch 64bit testcase 21857/head
authorXiaotian Wu <wuxiaotian@loongson.cn>
Sat, 6 Nov 2021 08:29:45 +0000 (16:29 +0800)
committerXiaotian Wu <wuxiaotian@loongson.cn>
Wed, 22 Dec 2021 03:07:56 +0000 (11:07 +0800)
src/test/test-execute.c
test/test-execute/exec-personality-loongarch64.service [new file with mode: 0644]

index 5818adbb5520087e5e83a0c57fb51dbcbdf4af24..49629c6bc2578e525f909505e8ce954d2fad7e6f 100644 (file)
@@ -381,6 +381,8 @@ static void test_exec_personality(Manager *m) {
 
 #elif defined(__i386__)
         test(m, "exec-personality-x86.service", 0, CLD_EXITED);
+#elif defined(__loongarch64)
+        test(m, "exec-personality-loongarch64.service", 0, CLD_EXITED);
 #else
         log_notice("Unknown personality, skipping %s", __func__);
 #endif
diff --git a/test/test-execute/exec-personality-loongarch64.service b/test/test-execute/exec-personality-loongarch64.service
new file mode 100644 (file)
index 0000000..0531ad1
--- /dev/null
@@ -0,0 +1,7 @@
+[Unit]
+Description=Test for Personality=loongarch64
+
+[Service]
+ExecStart=/bin/sh -c 'echo $(uname -m); exit $(test $(uname -m) = "loongarch64")'
+Type=oneshot
+Personality=loongarch64