Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2007373imm; Thu, 7 Jun 2018 04:04:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLpjibtlAYRyQmeSQMwX1jTR+egHu6aOo1+KPoHMg+YNuroj+WhQFp1bePhe0J7CCwYg3ik X-Received: by 2002:a63:931c:: with SMTP id b28-v6mr1177268pge.167.1528369441541; Thu, 07 Jun 2018 04:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528369441; cv=none; d=google.com; s=arc-20160816; b=uOiWRC+cORj8KbhvHyN/tW0JrKhzSXqf1r+dMuXK2BYz/n0M5Z4HdDB4hUGPyl9nw3 aNc2hEwwaC3gIUBLZcMs67I4jxdu/ysxKQLm3nLgQFKPjKoeSoFXZYorCQ5x4+yISHNf 9M9TFl8iuU+inY9EWGl12157CjnY+nC+v3xtovMeeBEp0HXRgjtDUMqTzLuZBMixFEJH 9EA2ryamUedOF+b+BqSCWb2+ttk9inDkMy68Fb2uSN404bTAPC8FxAU1WLHTVip/6e2I oC0VBYLeRNWgMakP9fwXTAsOA4pn1r/93af6vMz1OXUHPuOjNyxC9CV+SZzXdI4Z+Wmt CTeA== 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 35-v6si20189828pla.543.2018.06.07.04.03.47; Thu, 07 Jun 2018 04:04:01 -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 S932491AbeFGK54 (ORCPT + 99 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 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 --- 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 \ -- 2.17.1