From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 333FAC432C0 for ; Sat, 23 Nov 2019 00:01:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06C8020714 for ; Sat, 23 Nov 2019 00:01:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=fomichev-me.20150623.gappssmtp.com header.i=@fomichev-me.20150623.gappssmtp.com header.b="ufnbRqcp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726735AbfKWAB3 (ORCPT ); Fri, 22 Nov 2019 19:01:29 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:44187 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726638AbfKWAB3 (ORCPT ); Fri, 22 Nov 2019 19:01:29 -0500 Received: by mail-pg1-f195.google.com with SMTP id e6so4088331pgi.11 for ; Fri, 22 Nov 2019 16:01:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fomichev-me.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8+yuRo8leBwiMoTIdlspRuC+nuf9tPvJBSaoVlCYcr0=; b=ufnbRqcpbY771Xbf6t8odtaI4hw0nxfRj7NahcvgDmBndf0iIb6gSTI8z7gsnj05fk v5UzVehJDvYN2ih7BlyB5r/Zz3Oz64RQkfxntUmVNS90S/e55JchNLCh3GU+Qrwl5mTQ HM8/zjNj91oRJpozOW59hli4SuOoylfoWqn3qTBbQsg7b0hTGx3+0ufO7nVDKLF43Yv2 mNIxKYPsv3RJ/7aG4QADxRLAZvC9qoBl03uEN91OUdunLjDOWq0hQAAfatMYsg2r7nbg xId2a0ly59seCF082tZgXIwsQj7NdZG+aSSi7sf7YbBrv7CiEKbk1QabJUBGe1GxftKq zddw== 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:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8+yuRo8leBwiMoTIdlspRuC+nuf9tPvJBSaoVlCYcr0=; b=kGixsZhwOvfahJH6XiruL1uqZb/gpPMvrIOhcaWG8iaKyFnx6/nsiT5LWBsTOcn2Vi tCcbs0OkrQDGkg6rZxumnMeTqowKxFamhexLGyaH8GhuV0dl/ydtj9X0uuUg3U6jVL1d nPHCkudmF3OigyupgGiBn9NI/HGyKSofozycvvrslzd1anLTe5vwgWN8DOqvO/gZeljD a8IALg9MgwQBw8mCjN6YJvoayaY8rWDioEMSeGNms52rK9X2nreLl9Y9KNHxgopo3iRB kmCIuFylTbotJYvS8VCZKZxVv+Ezafkcv4Dj2vEFQOcP1ZibqeQxzjKjLiDKurClEgJo sTVw== X-Gm-Message-State: APjAAAXQDMeNmz7PT32MqwzQLOcjjyyEk8PMgzn4oC3XsQAdIrpsIf9+ hXQQvBhbYgnrxwQWwCozE1Bp4w== X-Google-Smtp-Source: APXvYqwNwR4l3/DAmp3JaZWSOws1GVis8FdeLU3d6En4/y64kMGC8zx/IeoD93wLolOQGxI5vhfttQ== X-Received: by 2002:a62:b607:: with SMTP id j7mr20921713pff.39.1574467288498; Fri, 22 Nov 2019 16:01:28 -0800 (PST) Received: from localhost ([2601:646:8f00:18d9:d0fa:7a4b:764f:de48]) by smtp.gmail.com with ESMTPSA id u207sm8940594pfc.127.2019.11.22.16.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 16:01:27 -0800 (PST) Date: Fri, 22 Nov 2019 16:01:27 -0800 From: Stanislav Fomichev To: Andrii Nakryiko , 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: <20191123000127.GC3145429@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> <20191122163211.GB3145429@mini-arch.hsd1.ca.comcast.net> <20191122234733.GA2474@khorivan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191122234733.GA2474@khorivan> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On 11/23, Ivan Khoronzhuk wrote: > On Fri, Nov 22, 2019 at 08:32:11AM -0800, Stanislav Fomichev wrote: > > 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 :-) > > I dislike changing things like this, but I was asked while review and > it seemed logical enough. The comment could prevent us from doing this. No worries, I'll add it back with a comment :-) > > > 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++. > > -- > Regards, > Ivan Khoronzhuk