Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp55112ybc; Fri, 22 Nov 2019 16:02:51 -0800 (PST) X-Google-Smtp-Source: APXvYqynUg9xR845i15xY0n4knDF4svb4V8VI6WDznQldV5/jAlWcHyiuadwO4hiv8MYuha60SED X-Received: by 2002:a17:906:f756:: with SMTP id jp22mr24327526ejb.234.1574467371043; Fri, 22 Nov 2019 16:02:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574467371; cv=none; d=google.com; s=arc-20160816; b=eHcSU1Ij+vHb3cD0ZDp3JHd2WS99xTgydIsc4K0c9ExJS2srVK3NzJXumSp2+roWOz iX/KSld2D2l+yu9f2SPgwMc8gF5J5yW+7Op2fLZfRLxkYcJShfHRZyEXGgCFqQ9iUWVs YCHR7vYZpIwV8Br/GQN8u+phJw/5OYhsBGKVpYZ31ftF0wALgVC0K9EsaMhoTNgGJxUY R5eShJoziiHYlWQLPlEAJ/g667by7HXPms6lykbqqTJjCxG7mM7G5GDL1ixb2iM1z1hB qP84fjkfQZlr6a7FFn9xUKrZ5YfPs0VcnoMLBV9UKMA1XkYJMZvjIQRzdhi9Rd7yhCtY 6dKw== 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:to :from:date:dkim-signature; bh=8+yuRo8leBwiMoTIdlspRuC+nuf9tPvJBSaoVlCYcr0=; b=LWJ2QXXUc9azDQxtTyJzDHXF7Q24bAUzNUpBC9oIwMl6zfEKTl5MYuzeFAeNncd+vN InETCnZEQkvLcOxucd1iKtesVJnPxHKUkflRxUwcrWkVUsS37PvVkLhRRsVGL26waX8/ WsJVtbOH1Zt7gqmtLA6fLYyuGgu4ulogKnQPf3Pq6iXSb6awRBfr8//6Q9T/B9by2Lfe ygMW4lR08K9W71K4SypkXCo/lhScndLee6ZdCuGHRZ2R5d3DGt7Po6IyEy3GSlJE21mt hf7J4MucLk/RaIpEf94Qk0UfBmbuCM8AbULQQ3huE1jfjaxwsISQTHZHERJ+/khBGr5V lTFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fomichev-me.20150623.gappssmtp.com header.s=20150623 header.b=ufnbRqcp; 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 d25si360713edv.242.2019.11.22.16.02.26; Fri, 22 Nov 2019 16:02:51 -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=ufnbRqcp; 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 S1726802AbfKWAB3 (ORCPT + 99 others); Fri, 22 Nov 2019 19:01:29 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:46354 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726666AbfKWAB3 (ORCPT ); Fri, 22 Nov 2019 19:01:29 -0500 Received: by mail-pg1-f195.google.com with SMTP id r18so4072327pgu.13 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=sFyblAmE+yF4UaHou6oXQlj3Djocgwha3oGUxI57PHnvMfralfqC0jztjQtpwlyXFK mj59NEDbbp3Il4eHt/vJhOrH28Kua7VCIUulhijkQu1kcUL5bRyjyQVjGrYH2GTwIDKn Db+QUbfcKwPz4j6Kk66epVqxo2CE8cPslJGMtpB1k6bSga4zH2gl7SgyTQX24nP5QHay gMOfPjzuZ8Vdudp9s1SYMUidJNSPIVo61u86rdG98jtEBkadht8Il4Jg6z9FN6MDdijg POA2ZI/B5rJ+oq3J5L0CN9XMt8zALSd6/2DXDZpY+ZqkwiRRrVt7j6+2p0NuajjL9GAp h3nA== X-Gm-Message-State: APjAAAWgf95uqMZofDT2ijzsZsesgPk4CtJCVSaFn0FMlGE9wd7lxfCR AVKmEYdGXBcRzDG1ihE3c/wIcA== 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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