summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaotian Wu <wuxiaotian@loongson.cn>2021-11-06 16:29:45 +0800
committerXiaotian Wu <wuxiaotian@loongson.cn>2021-12-22 11:07:56 +0800
commit646b01121a9cf2009768af2dac080940b9803624 (patch)
tree1434d006467aa555f8fbe6e8052a7322ba0f7b58
parenteebbd595f0de9505f4df3c3460ab36d46d8262f8 (diff)
downloadsystemd-646b01121a9cf2009768af2dac080940b9803624.tar.gz
test: add LoongArch 64bit testcase
-rw-r--r--src/test/test-execute.c2
-rw-r--r--test/test-execute/exec-personality-loongarch64.service7
2 files changed, 9 insertions, 0 deletions
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
index 5818adbb55..49629c6bc2 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -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
index 0000000000..0531ad1164
--- /dev/null
+++ b/test/test-execute/exec-personality-loongarch64.service
@@ -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