Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp507444ybc; Fri, 22 Nov 2019 08:35:47 -0800 (PST) X-Google-Smtp-Source: APXvYqxVArGHCsPUKh+KB/6KvgjCh+wi3AgokBKmMaDSU5BMJNQYu9xY+AFF1t7PVdDZfikANboB X-Received: by 2002:a17:906:7fcb:: with SMTP id r11mr22972683ejs.85.1574440547439; Fri, 22 Nov 2019 08:35:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574440547; cv=none; d=google.com; s=arc-20160816; b=mx2PZU5OUCEm6WL0IEEumXvvUjqlpUZCnV1RMHOJo7sdMwRhOwfyynAxbOunQvad+y 8L9Zh5Rrp8zgeSy3NPBUA90qVpgeZqE6YTZXmOP5lDqC/Ku8sejlB1IZA7wg8Rouqj/S yobGpvjr7DeKbz9WvHpxvmFTy6+9OLo7Jx2PvZxkingHFz9EfIJ8YieKohmsJgri8O/e YsxbwoxkxKgvZbgfoZbC9CIBinfGyap1W+oU9mRFY2eKjc0yaCCn6YIwgCErJKXaPLmz wmzyZvehXSzJrcQw+vIhuoaNgbyFfQP3opdPY09utrZgj9ky+QhyvsM6mmK2clsg+dWT dbgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Ewg/yv2nDe6mNePO1hVyJcZEM93PzoLaB/4JIOpiCl0=; b=fa2acj0BpcdjyEuymESAbRQt6FIEQVPzNuZBb5GKltFlJVcxFBi1iRaVQY7M4OrIXV X2C8Gz0icQNxLOCLyeqP9HTJvSMdAp0aPK1GhOUReU0mCWuMxnBWyZ0xS+pBWeHnj31V hj/S1IIwCaeHzP5MPG9vZQkQ1yliGpMw36j7HqygnmJc5YjcPhFCl/HonUA+D+caSlfS 4Xudj4DzjwN/IGmKRdm+ehFbUixE/clxH9Ov/DGAPepO1neUJ0pKS3Uutm/wA4kvkApI 5rG35it+A9uJA97PL91EI0eK7Vsa9upRHRy3TA65mSj/48lhc+w0vIdIKP3IKplj45g+ CdOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fomichev-me.20150623.gappssmtp.com header.s=20150623 header.b=0OgC9EH1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jx16si4512456ejb.353.2019.11.22.08.35.23; Fri, 22 Nov 2019 08:35:47 -0800 (PST) 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=@fomichev-me.20150623.gappssmtp.com header.s=20150623 header.b=0OgC9EH1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727112AbfKVQcQ (ORCPT + 99 others); Fri, 22 Nov 2019 11:32:16 -0500 Received: from mail-pj1-f68.google.com ([209.85.216.68]:36916 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbfKVQcP (ORCPT ); Fri, 22 Nov 2019 11:32:15 -0500 Received: by mail-pj1-f68.google.com with SMTP id f3so3257250pjg.4 for ; Fri, 22 Nov 2019 08:32:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fomichev-me.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Ewg/yv2nDe6mNePO1hVyJcZEM93PzoLaB/4JIOpiCl0=; b=0OgC9EH1ZwAFvHpXL/6pLXTDHSn+8VY2B3rru4xCMEKyLrwwCBjt+0ju713/hBnlLO 6JFCR6kXueKU0tFgif0fYrcIetYAMcjOM6Tc6zm5HAHOn+g+CKW8vVEQlj2GYBzgfPVz 73mpwToER8ZPuyOA7xbBh4VkDVxmB4Ok5Kjp9cFHCNe/eHo1FbwepyY9lVBXRDn8quFi 2dOicxRS8FKkNBKSGYdY6RwUyUfDffnmdQUy2vQPMX4vJEer5UfFs3Z2O14CtNAWie2Y lFukwJ4ya64FBzfdStOa8H6QQAOiW74HpbBxbpiS/ykVVZQyTmyWXU2xff3D7BkTGbIs /O3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Ewg/yv2nDe6mNePO1hVyJcZEM93PzoLaB/4JIOpiCl0=; b=qJsIekkjzkiPvv3+u39bIeTXjG5bEOLkEWeZugQhBCxI4ex7q8+0/FKsTLcKuI6Epw 2BTsTiNqhpu/c1lRL2vK7/RZqKbYTKlomjJNA5dFpW9VNRCA8/PW29hCNOGE0QH5c8Qd XSyGM5fyJC5IOFSmRUvgI8kjFPxAQOeWgwb3pUvb/CnvUHSP3arfTPvdZGHH+3iO0kPy HzirEMiSBSm89WF4AzurHUOhZzCK+06b7lIkzdgVhku9kIljuwvm5odEk6RCaocMwiGQ /aC5o17UqFoCAUkx7OiS+foDw6PsdWBk0kNBwquQn+zF4Hz9qkD696uBo50ebwBT+cvO zyBA== X-Gm-Message-State: APjAAAV+GcNNofO/jq1At/d27awWZf5UhvNDlsYy+CYE+CncCK83N7jU bVvXlr/PO7GUjjEapoSCA25Quw== X-Received: by 2002:a17:902:968f:: with SMTP id n15mr14084646plp.12.1574440333138; Fri, 22 Nov 2019 08:32:13 -0800 (PST) Received: from localhost ([2601:646:8f00:18d9:d0fa:7a4b:764f:de48]) by smtp.gmail.com with ESMTPSA id m7sm369937pgh.72.2019.11.22.08.32.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 08:32:12 -0800 (PST) Date: Fri, 22 Nov 2019 08:32:11 -0800 From: Stanislav Fomichev To: Andrii Nakryiko Cc: Ivan Khoronzhuk , Alexei Starovoitov , Daniel Borkmann , Yonghong Song , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , john fastabend , open list , Networking , bpf , clang-built-linux@googlegroups.com, ilias.apalodimas@linaro.org, sergei.shtylyov@cogentembedded.com, Andrii Nakryiko Subject: Re: [PATCH v5 bpf-next 11/15] libbpf: don't use cxx to test_libpf target Message-ID: <20191122163211.GB3145429@mini-arch.hsd1.ca.comcast.net> References: <20191011002808.28206-1-ivan.khoronzhuk@linaro.org> <20191011002808.28206-12-ivan.khoronzhuk@linaro.org> <20191121214225.GA3145429@mini-arch.hsd1.ca.comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/21, Andrii Nakryiko wrote: > On Thu, Nov 21, 2019 at 1:42 PM Stanislav Fomichev wrote: > > > > On 10/11, Ivan Khoronzhuk wrote: > > > No need to use C++ for test_libbpf target when libbpf is on C and it > > > can be tested with C, after this change the CXXFLAGS in makefiles can > > > be avoided, at least in bpf samples, when sysroot is used, passing > > > same C/LDFLAGS as for lib. > > > Add "return 0" in test_libbpf to avoid warn, but also remove spaces at > > > start of the lines to keep same style and avoid warns while apply. > > Hey, just spotted this patch, not sure how it slipped through. > > The c++ test was there to make sure libbpf can be included and > > linked against c++ code (i.e. libbpf headers don't have some c++ > > keywords/etc). > > > > Any particular reason you were not happy with it? Can we revert it > > back to c++ and fix your use-case instead? Alternatively, we can just > > remove this test if we don't really care about c++. > > > > No one seemed to know why we have C++ pieces in pure C library and its > Makefile, so we decide to "fix" this. :) It's surprising, the commit 8c4905b995c6 clearly states the reason for adding it. Looks like it deserved a real comment in the Makefile :-) > But I do understand your concern. Would it be possible to instead do > this as a proper selftests test? Do you mind taking a look at that? Ack, will move this test_libbpf.c into selftests and convert back to c++.