diff mbox series

[v8,6/6] test/cpuflags: add test for LoongArch cpu flag

Message ID 20221004154047.35276-7-zhoumin@loongson.cn (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers show
Series Introduce support for LoongArch architecture | expand

Checks

Context Check Description
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

zhoumin Oct. 4, 2022, 3:40 p.m. UTC
Add checks for all flag values defined in the LoongArch cpu
feature table.

Signed-off-by: Min Zhou <zhoumin@loongson.cn>
---
 app/test/test_cpuflags.c | 41 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
diff mbox series

Patch

diff --git a/app/test/test_cpuflags.c b/app/test/test_cpuflags.c
index 98a99c2c7d..a0e342ae48 100644
--- a/app/test/test_cpuflags.c
+++ b/app/test/test_cpuflags.c
@@ -281,6 +281,47 @@  test_cpuflags(void)
 	CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_Z);
 #endif
 
+#if defined(RTE_ARCH_LOONGARCH)
+	printf("Check for CPUCFG:\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_CPUCFG);
+
+	printf("Check for LAM:\t\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_LAM);
+
+	printf("Check for UAL:\t\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_UAL);
+
+	printf("Check for FPU:\t\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_FPU);
+
+	printf("Check for LSX:\t\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_LSX);
+
+	printf("Check for LASX:\t\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_LASX);
+
+	printf("Check for CRC32:\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_CRC32);
+
+	printf("Check for COMPLEX:\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_COMPLEX);
+
+	printf("Check for CRYPTO:\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_CRYPTO);
+
+	printf("Check for LVZ:\t\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_LVZ);
+
+	printf("Check for LBT_X86:\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_LBT_X86);
+
+	printf("Check for LBT_ARM:\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_LBT_ARM);
+
+	printf("Check for LBT_MIPS:\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_LBT_MIPS);
+#endif
+
 	/*
 	 * Check if invalid data is handled properly
 	 */