From patchwork Fri Jun 22 17:50:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shuah X-Patchwork-Id: 10482787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B7F5E60388 for ; Fri, 22 Jun 2018 17:50:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A11428FC6 for ; Fri, 22 Jun 2018 17:50:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C8F128FB4; Fri, 22 Jun 2018 17:50:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1441928FB4 for ; Fri, 22 Jun 2018 17:50:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933200AbeFVRuz (ORCPT ); Fri, 22 Jun 2018 13:50:55 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:42282 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932973AbeFVRuz (ORCPT ); Fri, 22 Jun 2018 13:50:55 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 40F4841AD2; Fri, 22 Jun 2018 17:50:54 +0000 (UTC) Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo03-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qaGiQqxy7Brs; Fri, 22 Jun 2018 17:50:54 +0000 (UTC) Received: from shuah-XPS-13-9350.sisa.samsung.com (unknown [50.236.218.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id EC70140E42; Fri, 22 Jun 2018 17:50:49 +0000 (UTC) From: "Shuah Khan (Samsung OSG)" To: shuah@kernel.org, linux@dominikbrodowski.net Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] selftests: vDSO - fix to exclude x86 test on non-x86 platforms Date: Fri, 22 Jun 2018 11:50:48 -0600 Message-Id: <20180622175048.24237-1-shuah@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix to exclude vdso_standalone_test_x86 test from building on non-x86 platforms. In addition, fix it to use TEST_GEN_PROGS which is the right variable to use for generated programs. TEST_PROGS is for shell scripts. Signed-off-by: Shuah Khan (Samsung OSG) --- tools/testing/selftests/vDSO/Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile index f5d7a7851e21..9e03d61f52fd 100644 --- a/tools/testing/selftests/vDSO/Makefile +++ b/tools/testing/selftests/vDSO/Makefile @@ -1,6 +1,14 @@ # SPDX-License-Identifier: GPL-2.0 include ../lib.mk +uname_M := $(shell uname -m 2>/dev/null || echo not) +ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) + +TEST_GEN_PROGS := $(OUTPUT)/vdso_test +ifeq ($(ARCH),x86) +TEST_GEN_PROGS += $(OUTPUT)/vdso_standalone_test_x86 +endif + ifndef CROSS_COMPILE CFLAGS := -std=gnu99 CFLAGS_vdso_standalone_test_x86 := -nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector @@ -8,14 +16,11 @@ ifeq ($(CONFIG_X86_32),y) LDLIBS += -lgcc_s endif -TEST_PROGS := $(OUTPUT)/vdso_test $(OUTPUT)/vdso_standalone_test_x86 - -all: $(TEST_PROGS) +all: $(TEST_GEN_PROGS) $(OUTPUT)/vdso_test: parse_vdso.c vdso_test.c $(OUTPUT)/vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c $(CC) $(CFLAGS) $(CFLAGS_vdso_standalone_test_x86) \ vdso_standalone_test_x86.c parse_vdso.c \ -o $@ -EXTRA_CLEAN := $(TEST_PROGS) endif