From patchwork Thu Jun 7 10:57:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 10451629 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 8A1966037F for ; Thu, 7 Jun 2018 10:58:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A2B129DB7 for ; Thu, 7 Jun 2018 10:58:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D97B29DB9; Thu, 7 Jun 2018 10:58:09 +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 559AA29DBB for ; Thu, 7 Jun 2018 10:58:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753573AbeFGK5z (ORCPT ); Thu, 7 Jun 2018 06:57:55 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:42896 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932436AbeFGK5x (ORCPT ); Thu, 7 Jun 2018 06:57:53 -0400 Received: by mail-lf0-f68.google.com with SMTP id v135-v6so13977323lfa.9 for ; Thu, 07 Jun 2018 03:57:53 -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:mime-version :content-transfer-encoding; bh=s2p9UJOln1Mqy/huqQApabcsxfD60KbqoiCfk+WFGTA=; b=KeX0lX7TpyRn/HUD+QvPa5RmmHoQU3pJSAhngxjxaN+6ycyQ9eoYx7131h9LV6CJM4 hfC+ZfuPunzYDMMUDmwbcCM4znqkc6SCe4JeydCCRVFW4MrErFlG4AR6s7N4VJkXBF2V GgcZxLvmX3AcNijVUAPqY40iUZyptyeyjg650= 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:mime-version :content-transfer-encoding; bh=s2p9UJOln1Mqy/huqQApabcsxfD60KbqoiCfk+WFGTA=; b=dAL4p28oUfptn2nu3nN9CEiYoKM2TGjxJm01t5OvyIahd1rniOm7b6odkS3rclG+O1 dTbLQVQEoaqNCgOsMeh0o1LYsou/fqtwIqzkHcdpJkGrU64rVbQ2bN7I/gcSEJrafRkg yAWoMaKZlirpqiBctLpbYEdaOJ4pb3GkKEM34/KO6wxt8uhVF8crazyoKgS46bZxvt8Z dpiFjFxzcdQHnt8D5USGaEAMOYFT4CRj+kZxRZQ37BzsQVRDpRiY0PcEp0HYaEZ+xuAx UYRG1TedYeRkekX+2J2z9riOM9mHtd9IC4BpqFPwgLb2JHHmvhu/CKrTYcrh2tuBXffI eC/g== X-Gm-Message-State: APt69E30vxZkK2oE8GzUVdCBym9/gRdVUqK3wJCnSYBoJrwf9FsQVliv w12InNMLIjshfxNXOiEawI4pVQ== X-Google-Smtp-Source: ADUXVKJkuvbmdMjeojl9IQntEvn0ryzdrlq+sXYOmlIcoHB5xhbdSoI6XZrxeHqyEHtjHDdLHcFs7g== X-Received: by 2002:a19:5512:: with SMTP id n18-v6mr894623lfe.133.1528369072322; Thu, 07 Jun 2018 03:57:52 -0700 (PDT) Received: from localhost (c-2c3d70d5.07-21-73746f28.bbcust.telenor.se. [213.112.61.44]) by smtp.gmail.com with ESMTPSA id p28-v6sm3642520lfh.24.2018.06.07.03.57.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jun 2018 03:57:50 -0700 (PDT) From: Anders Roxell To: ast@kernel.org, daniel@iogearbox.net, shuah@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Anders Roxell Subject: [PATCH] selftests: bpf: fix urandom_read build issue Date: Thu, 7 Jun 2018 12:57:12 +0200 Message-Id: <20180607105712.553-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.17.1 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 607ed8729c06..67285591ffd7 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -16,10 +16,8 @@ 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 - $(CC) -o $(TEST_CUSTOM_PROGS) -static $< -Wl,--build-id +$(TEST_CUSTOM_PROGS): $(OUTPUT)/%: %.c + $(CC) -o $@ -static $< -Wl,--build-id # Order correspond to 'make run_tests' order TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test_progs \