Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp498512imm; Thu, 7 Jun 2018 23:52:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLj3mvC9lVETXy28d+UgCzwy3cHUn2fls3SyG4jNCG4Jc/WSBOHvAtaVLMv4hVjtL96pKX3 X-Received: by 2002:a17:902:b611:: with SMTP id b17-v6mr5227288pls.284.1528440742780; Thu, 07 Jun 2018 23:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528440742; cv=none; d=google.com; s=arc-20160816; b=fDJIwOHpLzgOdewKvtw2KOTNQr7kUbsbfaUwBy0QY4M8BZzyFB9NpETtfqyxWE4U6I xc6K8AjAr/j6oDaUQblJlHzjf91GhXxvc/6/u9UrYd2ESN6o5HjkD1kgwT5MPIg1IEw4 f3vZAsmUVSkBCjXhPuXJ/C7DtaK8pfYC25VAC05VVTdV2HSVS8SqHOmKY1z7yFNMgZZl c5bbk9Z9WphM+nZqTQ3IMOG6k8vdJlTFIcVFytsSHjEIjlzPnmET4OaYZprtmzV6+e6p og+llMVvgmoZkLmPYyJnMPZHO7QbPSG3OtKGD9nDiSmwTs7urCH0q1/H1acVvEbMgr6s F2TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=7W1yzcnJNHKQrgraPILtxT9yr1QxYFzVWYM+zREzulI=; b=0mOVjeOL48R95qyNRrpXLz51fguhxZuxAfBzyA8kgCsDxiPh5yYvrh7+yM47560jMx vj9TFsEtgBmnMrAXz1gHKD8I8ORGnjmTtZPgO9D+5kvOIbx2/vWULd+0OtsgAeMSQ2Nf 9v64NCZ6b1qcucGR1xybFB3VVlP5uM4GV5FAdPfK54HLPK7A3YiPRl5WwqEaLdH3l3Z+ NOdtWFBx+kdyCMh0uoilvvfG6gF4tMiJmOvhI+oTUv6pBB3BqWSb7kF704YBh1XH0z9R lSlJyuatqkMYHPbroL4o9HVi4vMLvrvJ6usl0DHD5LgojaShD6FlTbC/HGlzkPE1yD4K vBTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g7JVJQ1Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si55552433plb.549.2018.06.07.23.52.08; Thu, 07 Jun 2018 23:52:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g7JVJQ1Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752705AbeFHGvp (ORCPT + 99 others); Fri, 8 Jun 2018 02:51:45 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:42446 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751241AbeFHGvo (ORCPT ); Fri, 8 Jun 2018 02:51:44 -0400 Received: by mail-lf0-f65.google.com with SMTP id v135-v6so18383782lfa.9 for ; Thu, 07 Jun 2018 23:51:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7W1yzcnJNHKQrgraPILtxT9yr1QxYFzVWYM+zREzulI=; b=g7JVJQ1Qcw2bDXC59EEZrED106BJqlUAt3Ej6pkQnHC5rZkZLRA+vn86UXus/xV+Fx kO1Cqrrmpjc6EmReZ5YvsAEidC4CEfBGPPNl5KwCejpx2phzW9Cs3kD8BiumT7THJjva Mh1rfYCajmd93bW2C8DnzUvUkFAyUtQOcdRVA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7W1yzcnJNHKQrgraPILtxT9yr1QxYFzVWYM+zREzulI=; b=E/M2mqRjw9+CGt1b9auM40l/yAVjeU3Kuq/dDDiyIU6QD7YL2K0Nkynl1OgCAeLRjg zFOfP6F4eCRmBDRuqG1C7TXRq9/7HuXNZr2kEPd/zYVW1DK1Cqx/Mf2S7NDRiwodAtbO LNZADH2XMvFjfivHMMExxL5nN5xB81uFjr4F6/uwZ9MN1I7+eRKCQxU9hg+MUPIlcYjg PDrZrCZ+tfJlHNWX3G+eJwLoHzbOkqgKXY5gTcm14ustYlNbLn2Z+xh22a/83b3G9fRt KFQEfhjJpSphKJ7ZrJWzp85ktVvEANyb950TWi4zmfvAJQH2Okxd3+golysMcmn5PI4j CheQ== X-Gm-Message-State: APt69E0TCdcBDq2vmyPZgMn1IJm6fqZ8gAArAjCPbuGfYz0NhB+A2LAS CFiC1/VsA2lGIsOCXwbFqjjX0A== X-Received: by 2002:a19:c452:: with SMTP id u79-v6mr3003244lff.5.1528440702473; Thu, 07 Jun 2018 23:51:42 -0700 (PDT) Received: from localhost (c-2c3d70d5.07-21-73746f28.bbcust.telenor.se. [213.112.61.44]) by smtp.gmail.com with ESMTPSA id q78-v6sm6988379lfd.35.2018.06.07.23.51.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jun 2018 23:51:41 -0700 (PDT) From: Anders Roxell To: ast@kernel.org, daniel@iogearbox.net, ys114321@gmail.com, shuah@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Anders Roxell Subject: [PATCH v2] selftests: bpf: fix urandom_read build issue Date: Fri, 8 Jun 2018 08:51:27 +0200 Message-Id: <20180608065127.28115-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc complains that urandom_read gets built twice. gcc -o tools/testing/selftests/bpf/urandom_read -static urandom_read.c -Wl,--build-id gcc -Wall -O2 -I../../../include/uapi -I../../../lib -I../../../lib/bpf -I../../../../include/generated -I../../../include urandom_read.c urandom_read -lcap -lelf -lrt -lpthread -o tools/testing/selftests/bpf/urandom_read gcc: fatal error: input file ‘tools/testing/selftests/bpf/urandom_read’ is the same as output file compilation terminated. ../lib.mk:110: recipe for target 'tools/testing/selftests/bpf/urandom_read' failed To fix this issue remove the urandom_read target and so target TEST_CUSTOM_PROGS gets used. Fixes: 81f77fd0deeb ("bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID") Signed-off-by: Anders Roxell Acked-by: Yonghong Song --- tools/testing/selftests/bpf/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 607ed8729c06..7a6214e9ae58 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -16,9 +16,7 @@ LDLIBS += -lcap -lelf -lrt -lpthread TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read all: $(TEST_CUSTOM_PROGS) -$(TEST_CUSTOM_PROGS): urandom_read - -urandom_read: urandom_read.c +$(TEST_CUSTOM_PROGS): $(OUTPUT)/%: %.c $(CC) -o $(TEST_CUSTOM_PROGS) -static $< -Wl,--build-id # Order correspond to 'make run_tests' order -- 2.17.1