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: 137861 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1938234lji; Thu, 7 Jun 2018 03:57:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKV7Cm8uLn34CJXdlsOndlXxutVdVbn/gEhvNfve0pdSVhtzOAuAlQvkPztBUaGLkjsHttK X-Received: by 2002:a62:5911:: with SMTP id n17-v6mr1338459pfb.162.1528369078988; Thu, 07 Jun 2018 03:57:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528369078; cv=none; d=google.com; s=arc-20160816; b=Jjskv84CESLPB/dqCbMAZqKVy3F8R5Q15rxvPe+CKAumLTFaKoXrD0o2xWOa73PAbt IXmxCT3JHExVw5LUHYtUHPRJSooqiYq6I10ELCWQAjjs943u4YZV3uXSX2/J8cpsF12G bgX7OGgcB/n5ZSLB/lemZp5oTK+ngXTrlZAgzORRHuYtz806E+hmytKXo5p9xUVWUs8q LJaeLAYCC3H2F2i6qV4YgKaBGe6rv0phAgLA9OkB0gm7eOV9b6Y9xe2DM7EkWkBwtY2l RAq0C0odASPh9RldF/L4n/KUEbN7Xs3nJ9VS/g2k3/kL8REw/izfD9Zs3K4ymlvujock 4VRA== 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 :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=s2p9UJOln1Mqy/huqQApabcsxfD60KbqoiCfk+WFGTA=; b=rtdy0b4ZiqHii8An6u7PvgR+F5N/RpEgVQSoed/dMvaz5/TiL9dox0Ig3FHdbhSoAe nMT0ffAmpv9WVhoNQdEbGH272aum+11Hn67jGMN62T4Z6kEdnECqVeUfUHUWsUnY0qk+ S1k6EgonOctxeonJga8UKcPZANmBoKGsHhdfPDqcTol6OIcikboD+a+6y/F/f1XpybH1 SzpzgJGuHKjoYUuRgC23ARM/qu/lWCMtThyuKiOUPy4k3J720AVfKs4fW2JSUn8lhU/M DOlt4AYCgFz6isQ6TE36lBYRCg/5Pq2ZHswPWVwDYmlFbii/dD0bHDedHaAS8wwSrjo4 /W9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KeX0lX7T; 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 f18-v6si16703247plj.571.2018.06.07.03.57.58; Thu, 07 Jun 2018 03:57:58 -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=KeX0lX7T; 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 S932508AbeFGK54 (ORCPT + 30 others); Thu, 7 Jun 2018 06:57:56 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:40178 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932426AbeFGK5x (ORCPT ); Thu, 7 Jun 2018 06:57:53 -0400 Received: by mail-lf0-f66.google.com with SMTP id q11-v6so13970816lfc.7 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=TNZQKYOFsTVK8Er3/9+B7kvP3ST+QtOHpSSU9Zgf3DJGd2t1zt+dv1gpjD9Fw2BHbN L6dZBQd5YeK9V96AN2eToDwwgbjbHtAhs65eqlJNwdlG2TQta0sT13WkAGsLG3bq2+a1 VPVlx7VOYOiAQDXQfeP9xs9694IYkzmBsTXikPsb3z0qQEyIzft91mXaDmdL1gTaL/Ud 8BDKKqmmD/6rZMrcrM3rGjbySpQb7gelkv4vKiv+/VkAjDftbQaKmQyjFF4GlKbAhBMZ HPFoomG3cUkUlJRoSpr6Khfnr7hM6G1sjq2xf/hOjhWJ951IlVxueCrtghgzJxuqUhR9 Tz5w== X-Gm-Message-State: APt69E26JaRC9n4udZLU/cKlc4+X+zMq1Ruv3NvQJDgNJek6yX6LrYYW R+tsalzlKjKNSLzwV/64Z/44AQ== 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-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 --- tools/testing/selftests/bpf/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.17.1 Acked-by: Yonghong Song 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 \