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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 8CBDAC10F14 for ; Fri, 12 Apr 2019 15:42:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 376602083E for ; Fri, 12 Apr 2019 15:42:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=6wind.com header.i=@6wind.com header.b="PEn/bSuW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727052AbfDLPmU (ORCPT ); Fri, 12 Apr 2019 11:42:20 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36691 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726785AbfDLPmU (ORCPT ); Fri, 12 Apr 2019 11:42:20 -0400 Received: by mail-wr1-f65.google.com with SMTP id y13so12579355wrd.3 for ; Fri, 12 Apr 2019 08:42:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=reply-to:subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xBE+oh72UMqugQ7gejDOBe1wZtvYGIP8gydMFl92lzM=; b=PEn/bSuWm8bP6RhxDwQ3a3Lu15j+GFBfKRQl9pSm4nuSvzKZ6Hxo3qrKzr/Ir+y/vJ 3vOhTX7y7Cug0UKtyfjihKQJ6nvES8jhaYaThdmhX7loEhNbW9IkdXF6mhgO4Y9w9s+c ftWDHXwbrMxkDd32ux7unZRa3ixIl0xYRTLvxaL/ii6BtniNSRVWRKuWP8UqDeSCAWoh l1bPuDPuN9K7tkyU1k3RwizrzV4IkX6xGZ6rmR3XpZFgzJeW2WlUfYW4OUFZCHe7sRVo Q55uKiObnWqmdd6+RfjfEEmRIWfpQAzoanzd3UblFzSzkAz2zVGfuTa+5cCa99kvPb4A fzOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=xBE+oh72UMqugQ7gejDOBe1wZtvYGIP8gydMFl92lzM=; b=BgA8yGxSAot60OCQFKZDKJXseJMWSAV1/W/YlcFczlCYgqt6mpg/Csy1YX7LrwvwXl 23iTyM5tUoM3sJKw+lUtJTDG8FLfsRC1pK7LXHB4Dxi+KlbwAngHNA02OdG9iNaPsWpF 747bzTFrAAYoDQXTjfMiSvxSLHX/vvq6a9l/Y/r0qxm9x7QQupaQrHNXpnTKCfYYwPMt F9DHuWSbG0DFfgCqD94Eg+mprINm1kaped7Hie7KRNRpTVTm82fEnZF+Mo0KClpcdell dFMEmwo+NjS/S2DTBM4i5mfsPE228Mljq2dTrAEZ+2BG5bxsr4CDYixnMx2QU4S0e8mm nFrw== X-Gm-Message-State: APjAAAXT4ISEiaBnicCWSYBWrwvd9c186Kxt6lwPtfiqzV31+BF+CCgY t0mdMF/vl1+W185arn4vXmzwCg== X-Google-Smtp-Source: APXvYqw+Pv0MIgpaLMb6Kilrm3z32y516/w7T5ML3xpZS2ChzwXI3D9aX8peWGGjXPOzkXG5hPfsig== X-Received: by 2002:a5d:414c:: with SMTP id c12mr37748303wrq.106.1555083738077; Fri, 12 Apr 2019 08:42:18 -0700 (PDT) Received: from ?IPv6:2a01:e35:8b63:dc30:242d:743e:ef68:938e? ([2a01:e35:8b63:dc30:242d:743e:ef68:938e]) by smtp.gmail.com with ESMTPSA id o10sm64192481wru.54.2019.04.12.08.42.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 08:42:16 -0700 (PDT) Reply-To: nicolas.dichtel@6wind.com Subject: Re: [RFC net-next 1/1] tdc.py: Introduce required plugins To: Lucas Bates Cc: Linux Kernel Network Developers , David Miller , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Marcelo Ricardo Leitner , Vlad Buslov , Davide Caratti , kernel@mojatatu.com References: <1554846285-20657-1-git-send-email-lucasb@mojatatu.com> <10a8c95a-7285-9918-c607-67ed827a9959@6wind.com> From: Nicolas Dichtel Organization: 6WIND Message-ID: Date: Fri, 12 Apr 2019 17:42:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Le 12/04/2019 à 17:21, Lucas Bates a écrit : > On Fri, Apr 12, 2019 at 4:31 AM Nicolas Dichtel > wrote: >>> in our tri-weekly tc test meeting and the general consensus to address >>> what you brought up is leaning towards the following: >>> >>> - adding a symlink to nsPlugin >> I don't understand why a symlink is needed. Just load it by default and use it >> when needed. A property can be added to each test to tell which plugin (in fact, >> which topology) is needed to run it. >> Thus, if a new complex test is added, it can define another topology. > > I'm loathe to hard-code it into the script, but we can avoid the > symlink if we specify some default plugins to load in the > tdc_config.py file. Why is it a problem to specify the plugin in the test description? The fw tests depend on a specific topology, thus it's better explicitly state that. > >>> - Changing default behaviour so that unless an option is explicitly >>> specified, all the tests will be run under a namespace with automatic >>> creation of the ports >> Yes. >> >>> - If the user chooses /not/ to use namespaces, it will still create >>> the veth pair to use. >> In fact, I would say an option so that the user can choose another topology. > > Quite possibly, but for traffic generation (upcoming using scapy) > we're just reusing the simple topology right now. I was thinking you were arguing for this option. If nobody need it, let's just remove it. > >>>> After your patch, I got the following error: >>>> $ ./tdc.py >>>> Traceback (most recent call last): >>>> File "./tdc.py", line 740, in >>>> main() >>>> File "./tdc.py", line 734, in main >>>> set_operation_mode(pm, args) >>>> File "./tdc.py", line 692, in set_operation_mode >>>> check_required_plugins(pm, alltests) >>>> File "./tdc.py", line 583, in check_required_plugins >>>> os.chown('plugins/{}'.format(fname), uid=int(os.getenv('SUDO_UID')), >>>> TypeError: int() argument must be a string or a number, not 'NoneType' >>> >>> That would be expected if you aren't running tdc with sudo or as root >>> or as a user with network admin capability. >> I was root for the test. > > Ah. That environment variable is probably not present on your system. > Out of curiosity, what shell/distribution are you using? > It was on a debian 8.11 / bash. Regards, Nicolas