Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6308982imm; Mon, 23 Jul 2018 15:37:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeb/d4+7LMMsmpEcYPUQpwRWapE3DOa9cL161nOEh7oKXpkBdKZDGCrzjhaNezSnaJNLC+m X-Received: by 2002:a17:902:b594:: with SMTP id a20-v6mr14682581pls.140.1532385437020; Mon, 23 Jul 2018 15:37:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532385436; cv=none; d=google.com; s=arc-20160816; b=DVWiqFfs77J468XWhDyL9kqW3ndAvymA1ldv/+y8/F/6xfSN8Z1bpS0i9pEtBfcIsk 1GXcXsWJuR8yiO3UFkUz2mrimOvFaXiTvQOzFUoyvuuSd6IYqbEG4Y3dxYF0bnoHuQ73 OpNIY/e3bZ2Xeva57meIqjngGYx6p7vaC1CYRyrkrKbygRA7M0geYLcj8dg/vGeCOHXt 7iJE0neF3p31b0qh5oJ2rePUPZYvdYU1s9L80kt4s57UelohTlh3Z7wMN43vFO4pjb46 fmVFPUg4mFI0Kkhrc2O7NoUF3JDQo7Gc3cakwjpxD2mrjVgFja0/s4jgc0XawdavOj6T YX5Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=Kcoi217ICssH3aQ7CSVcGaBpcTDUXSjzHrZrm6mCE0g=; b=kfb+W3RY4/tHDExaJoQH6mTF1qfKqQEMhmocjNI7uCzATTxj1End+XF2Pn5P/ynKkp GaMa9VIg5LGkhezG3FH7F57MVkoopVfbZ0AeaDv9/j9xxMibXOroPuSGJcJOO1AWVSDg +hfa+GndptEXByEmKKvluNdM1oCuEGxtXzKMTEjucUl9OPuqie80pQUiNRpfEkgL4KYe eSHSN5jwpunJBLP4er6y+Hg6C0Ii57kuDXHm/L5Xgcmckq5/maewkxx52WZ0A+c8CbSB Et2AjrQ+vk8MADFCn1/MSWzMWOzfh+uPFwjJoQSk148GONEMUEJb91ItT4wiBUPhXgW2 L/LA== ARC-Authentication-Results: i=1; mx.google.com; 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 31-v6si8758697plk.191.2018.07.23.15.37.02; Mon, 23 Jul 2018 15:37:16 -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; 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 S2388283AbeGWXjc (ORCPT + 99 others); Mon, 23 Jul 2018 19:39:32 -0400 Received: from www62.your-server.de ([213.133.104.62]:36471 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388088AbeGWXjc (ORCPT ); Mon, 23 Jul 2018 19:39:32 -0400 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1fhjQz-0002Yv-Rj; Tue, 24 Jul 2018 00:36:05 +0200 Received: from [99.0.85.34] (helo=localhost.localdomain) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1fhjQz-000Aib-Ib; Tue, 24 Jul 2018 00:36:05 +0200 Subject: Re: [PATCH] bpf: Add Python 3 support to selftests scripts for bpf To: Dan Rue , Jeremy Cline Cc: Alexei Starovoitov , Shuah Khan , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Lawrence Brakmo , jakub.kicinski@netronome.com References: <20180718213610.19618-1-jcline@redhat.com> <1aa3dc98-2ab1-7386-d5d9-afd3dbb3fde9@iogearbox.net> <20180723173313.ri2uz7srtdtno2hl@linode.therub.org> From: Daniel Borkmann Message-ID: Date: Tue, 24 Jul 2018 00:36:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180723173313.ri2uz7srtdtno2hl@linode.therub.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.0/24776/Mon Jul 23 18:44:17 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/23/2018 07:33 PM, Dan Rue wrote: > On Mon, Jul 23, 2018 at 10:08:57AM -0400, Jeremy Cline wrote: >> On 07/20/2018 04:45 PM, Daniel Borkmann wrote: >>> On 07/18/2018 11:36 PM, Jeremy Cline wrote: >>>> Adjust tcp_client.py and tcp_server.py to work with Python 3 by using >>>> the print function, marking string literals as bytes, and using the >>>> newer exception syntax. This should be functionally equivalent and >>>> support Python 2.6 through Python 3.7. >>>> >>>> Signed-off-by: Jeremy Cline >>> >>> Thanks for the patch, Jeremy! Given we also have test_offload.py in BPF >>> kselftests and it is written for python 3 only, it would probably make >>> sense to adapt the tcp_{client,server}.py towards python 3 as well, so >>> we wouldn't need to keep extra compat for 2 and have a consistent version >>> dependency. Lawrence / Jeremy, any objections? >> >> I certainly don't object to Python 3 only and I'm happy to drop the >> Python 2 compatibility from this patch if that's okay. Sounds good, lets do it, please respin with that. > This (well, along with introducing python in the first place, which took > me by surprise), sounds like a policy decision that should be made clear > in the kselftest documentation (Documentation/dev-tools/kselftest.rst). > Currently, that file does not mention any python requirement. Right now each selftest subdir has a config file which lists dependencies, perhaps it makes sense to have another standardized file there (e.g. 'deps') which lists user space dependencies, so it's immediately visible what is needed to run all tests from there. Thoughts? > That said, I agree that python2 support is no longer necessary. > > My use-case (which may be unusual?): We try to run all of kselftest > against a variety of kernels and architectures for every push to next, > mainline, and stable/lts branches. It seems that this is not a common > usecase, but shouldn't it be? As far as I'm aware the intel lkp-tests bot seems also to regularly run the kselftests for x86, if also done from arm side e.g. on latest mainline, even better. Thanks, Daniel