From patchwork Fri Jun 8 06:51:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 926621 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="g7JVJQ1Q"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 412Ckl1K3xz9s0W for ; Fri, 8 Jun 2018 16:51:59 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752598AbeFHGvp (ORCPT ); Fri, 8 Jun 2018 02:51:45 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:46448 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbeFHGvn (ORCPT ); Fri, 8 Jun 2018 02:51:43 -0400 Received: by mail-lf0-f66.google.com with SMTP id j13-v6so18384140lfb.13 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=a0qqGXGmfx6W4EmPNK+ArTINqdbaSnFTUfokpQz3vr60VrglneDVYLkwvWSUSL+EJo khS2JoNMpoET2H81I6HdJaaUR/iHEsN8K9x1iiAHz7urr9qbNIDeLTno5BaUG4MoogUf 6Q7fiI65nM9UlAZxCvyPSIU5dpWEU+P8EX2Ue3TrrmsfTfITfJLjldePL42Y+4beio/H 5YQwQSuC9Y97JOAcO6+w267aRpMz5Yp8mCVzIq5bUexPbAeKqIhSF5bY0IVT1NCY0kSi 8i4pUcOG3aFBRAGbXVTWcwj3q10/8ppl5KPIh0SCKrg6k+eKYCY0ar3o4acsVEMilDJh qfSA== X-Gm-Message-State: APt69E2xyTZz9oKZprtSeOJP4GgiCbzWoX1sxzvrNIfp9axEhW4hQ42w NpmY9vSjf4wF+PW9pfUDXavOew== X-Google-Smtp-Source: ADUXVKJGxkhdwmByU2A6NOCYztEo3fzr/1qfLT2NmPQB7mFOn9F7LOoZhJP9tsWwyqFFi4JMPqc0Mw== 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 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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