From patchwork Mon Jan 14 13:51:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10762629 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4CCAB1390 for ; Mon, 14 Jan 2019 13:52:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E52A287EA for ; Mon, 14 Jan 2019 13:52:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32D4128BEC; Mon, 14 Jan 2019 13:52:46 +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 C9A89287EA for ; Mon, 14 Jan 2019 13:52:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbfANNvs (ORCPT ); Mon, 14 Jan 2019 08:51:48 -0500 Received: from albert.telenet-ops.be ([195.130.137.90]:39656 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726643AbfANNvs (ORCPT ); Mon, 14 Jan 2019 08:51:48 -0500 Received: from ramsan ([84.194.111.163]) by albert.telenet-ops.be with bizsmtp id QDrm1z0093XaVaC06Drml0; Mon, 14 Jan 2019 14:51:46 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1gj2eY-0000Ej-2F; Mon, 14 Jan 2019 14:51:46 +0100 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1gj2eY-0006o6-0x; Mon, 14 Jan 2019 14:51:46 +0100 From: Geert Uytterhoeven To: Shuah Khan , Masahiro Yamada , Michal Marek Cc: Jonathan Corbet , Bamvor Jian Zhang , Kees Cook , linux-kselftest@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 05/12] selftests: seccomp: Fix test dependencies and rules Date: Mon, 14 Jan 2019 14:51:37 +0100 Message-Id: <20190114135144.26096-6-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114135144.26096-1-geert+renesas@glider.be> References: <20190114135144.26096-1-geert+renesas@glider.be> 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 When building kselftest in a separate output directory, the seccomp_bpf binary ends up in the source directory instead of in the output directory, and the build of seccomp_benchmark fails: make[5]: *** No rule to make target 'seccomp_benchmark', needed by 'all'. Stop. Fix this by declaring both test binaries using TEST_GEN_PROGS, and using the build support from lib.mk properly. Fixes: 967d7ba841513910 ("selftests/seccomp: Add simple seccomp overhead benchmark") Signed-off-by: Geert Uytterhoeven --- tools/testing/selftests/seccomp/Makefile | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile index fce7f4ce069251a6..c728bd7a366f78b9 100644 --- a/tools/testing/selftests/seccomp/Makefile +++ b/tools/testing/selftests/seccomp/Makefile @@ -1,17 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 -all: -include ../lib.mk - -.PHONY: all clean - -BINARIES := seccomp_bpf seccomp_benchmark CFLAGS += -Wl,-no-as-needed -Wall +LDFLAGS += -lpthread -seccomp_bpf: seccomp_bpf.c ../kselftest_harness.h - $(CC) $(CFLAGS) $(LDFLAGS) -lpthread $< -o $@ +TEST_GEN_PROGS = seccomp_bpf seccomp_benchmark -TEST_PROGS += $(BINARIES) -EXTRA_CLEAN := $(BINARIES) - -all: $(BINARIES) +include ../lib.mk