Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/powerpc: Add test for 32 bits memcmp

This patch renames memcmp test to memcmp_64 and adds a memcmp_32 test
for testing the 32 bits version of memcmp()

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[mpe: Fix 64-bit build by adding build_32bit test]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Christophe Leroy and committed by
Michael Ellerman
1bb07b59 94675cce

+17 -3
+17 -3
tools/testing/selftests/powerpc/stringloops/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 # The loops are all 64-bit code 3 - CFLAGS += -m64 -maltivec 4 3 CFLAGS += -I$(CURDIR) 5 4 6 - TEST_GEN_PROGS := memcmp 7 - EXTRA_SOURCES := memcmp_64.S ../harness.c 5 + EXTRA_SOURCES := ../harness.c 6 + 7 + build_32bit = $(shell if ($(CC) $(CFLAGS) -m32 -o /dev/null memcmp.c >/dev/null 2>&1) then echo "1"; fi) 8 + 9 + TEST_GEN_PROGS := memcmp_64 10 + 11 + $(OUTPUT)/memcmp_64: memcmp.c 12 + $(OUTPUT)/memcmp_64: CFLAGS += -m64 -maltivec 13 + 14 + ifeq ($(build_32bit),1) 15 + $(OUTPUT)/memcmp_32: memcmp.c 16 + $(OUTPUT)/memcmp_32: CFLAGS += -m32 17 + 18 + TEST_GEN_PROGS += memcmp_32 19 + endif 20 + 21 + ASFLAGS = $(CFLAGS) 8 22 9 23 include ../../lib.mk 10 24