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: 10453887 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 ABC63601D4 for ; Fri, 8 Jun 2018 06:51:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AFFB296D0 for ; Fri, 8 Jun 2018 06:51:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F4EC296D5; Fri, 8 Jun 2018 06:51:45 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 36B1F296D0 for ; Fri, 8 Jun 2018 06:51:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751244AbeFHGvo (ORCPT ); Fri, 8 Jun 2018 02:51:44 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:39298 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750837AbeFHGvn (ORCPT ); Fri, 8 Jun 2018 02:51:43 -0400 Received: by mail-lf0-f66.google.com with SMTP id t134-v6so18396867lff.6 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=LyGObMpP1hIKqoNMqtwU2vxRdFoIJ08D2gcbLc+Dzh1khCn7FEJBb+bw52j3IuhVyn gjQfjCRoZuCtP90IhKJtrpQyXyOVWkLlDQl25JCfd0KYUeD3vtqI261uxk2JuGzspnEj aJjwoUcZAYrWGTC3DLYo3bu/HMO0K1x14W/ACrLIc2+mPTCMoPH2FHxL8rlDTzMpVHFi /TF+INEnpO8S6CV6KOa7hM9K3kOG9jozHXTyuGjTMYuVVwji5j7jFUYVt2Fe59fBeKMS jyBcvFEppPqS5MJy8WqUgh2dxSQBhxcXOCBzwjW/AEWDPi9W1AmfvmfzmYLwmlcy0R4h dL1w== X-Gm-Message-State: APt69E3PvUztjsO9NIeTbgBAM6a62B7MDJOeJbYEBApn3LohHaxDPv9j zkS4Ivvuv3XddHHLoajSH1kwzg== 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: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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