From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 41975A0524; Wed, 14 Apr 2021 08:13:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8BF7161693; Wed, 14 Apr 2021 08:13:05 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 7679F16168D for ; Wed, 14 Apr 2021 08:13:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618380783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DDP+RR7qNmiEBl9aZx7tT1CkT2PtN8EmXGr+L9TdVDc=; b=Bky1AGZLOkUuDLEegiqvp/tAtqpWUE6aRdSYgAw7kz4PidkHftL+3qReTRS4PcrJOwK+dk YhI01i1hS+gQRUK/aH3OcIxMleJk0ajleU9fYAIjKOZtqDYORSNrCx296D6VtW1AZxXmlX IZpv6sQEztNiTW8IiWlwYwaJe7UEN+k= Received: from mail-ua1-f71.google.com (mail-ua1-f71.google.com [209.85.222.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-291-ZWScoXNUM_q3j0F1nB6hUA-1; Wed, 14 Apr 2021 02:13:01 -0400 X-MC-Unique: ZWScoXNUM_q3j0F1nB6hUA-1 Received: by mail-ua1-f71.google.com with SMTP id r5-20020ab033050000b02901dfd093e4dfso502339uao.22 for ; Tue, 13 Apr 2021 23:13:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DDP+RR7qNmiEBl9aZx7tT1CkT2PtN8EmXGr+L9TdVDc=; b=Ozt0xuttbFREAWXDu6V9/YYGDuSGcjuXDihfsrgBXaAnQ8fq1DBb2T2VZgFHe6LWNa k24zH3biXFA4AzfEhC6dPrMbTDVv3hQFO/9gJWPjJSqO1mXNQVb9yGLD0nRNTeI0CrZg GPkQzQsAXqN+UXiPHmWw/LzxfaY3JUvcjnaVq0VYHpWZu3073SoMGt36aIV4aPt+Z7DX eQY0v6BO8yG34rC+10E9+Rx6BkECLT5xGuY+0G+mbAhSyOLQEQKJxtMmqlZqJdcX8TTJ GNfi/0i6arnqKqdrgD5T4EsxvGjhCWCHTlsHOgVHDs02zTHo5n3j4DVma8trR5heq+OE xBEw== X-Gm-Message-State: AOAM532sQ1LCCmStjJgzpGtEwN+3Dypro4R7jaxcjWPuhs/Zw1soVAxn rzhcTFWxVBn1BX85vs73rriipZKf/qFOortH0uglgiJgSxf60P5dtCM23fLL4iqxbO5RjbjJicI I5JEARp1VBA5yLJnYQfM= X-Received: by 2002:a67:efd4:: with SMTP id s20mr24619087vsp.27.1618380781291; Tue, 13 Apr 2021 23:13:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZn5Wv3/H0EZjtkumMRJlgWWEKTXgb/TN26UGo7RmKEEDF0M0+SfzSj7t0AkYV0wuzhU5CH6Y62yM/JqmpMgQ= X-Received: by 2002:a67:efd4:: with SMTP id s20mr24619081vsp.27.1618380781047; Tue, 13 Apr 2021 23:13:01 -0700 (PDT) MIME-Version: 1.0 References: <20210127174255.1671738-1-bruce.richardson@intel.com> <20210409134111.GB1381@bricha3-MOBL.ger.corp.intel.com> <20210413164837.GB1185@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20210413164837.GB1185@bricha3-MOBL.ger.corp.intel.com> From: David Marchand Date: Wed, 14 Apr 2021 08:12:50 +0200 Message-ID: To: Bruce Richardson Cc: dev , Aaron Conole Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] test: allow taking test names from commandline X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Apr 13, 2021 at 6:49 PM Bruce Richardson wrote: > > On Fri, Apr 09, 2021 at 02:41:11PM +0100, Bruce Richardson wrote: > > On Fri, Apr 09, 2021 at 03:27:17PM +0200, David Marchand wrote: > > > On Wed, Jan 27, 2021 at 6:43 PM Bruce Richardson > > > wrote: > > > > > > > > While having the ability to run a test based off the DPDK_TEST environment > > > > variable is useful, it's often easier to specify the test name as a > > > > commandline parameter to a test binary. This also allows the test runs to > > > > be saved as part of the shell cmdline history. > > > > > > I don't get the argument about history: > > > > > > $ history |grep DPDK_TEST > > > 10615 2021-03-24 10:42:11 ninja-build -C build -j4 && > > > DPDK_TEST=logs_autotest ./build/app/test/dpdk-test --no-huge -m 512 > > > --log-level=lib.eal:debug > > > 10636 2021-03-24 10:51:09 ninja-build -C build -j4 && > > > DPDK_TEST=logs_autotest ./build/app/test/dpdk-test --no-huge -m 512 > > > --log-level=lib.eal:debug > > > 10653 2021-03-24 11:17:01 ninja-build -C build -j4 && > > > DPDK_TEST=kvargs_autotest ./build/app/test/dpdk-test --no-huge -m 512 > > > --log-level=lib.eal:debug > > > 10794 2021-03-25 18:37:48 history |grep DPDK_TEST > > > > > > > Sure, if you always specify the test name explicitly for each command, > > rather than running the one test multiple times having set it separately in > > the environment. > > Overall, though I take the point that from a history saving point of view > > it's a minor saving. > > > > > > > > > > > > > This patch adds support for checking all parameters after the EAL ones, and > > > > running all valid autotests requested - either from DPDK_TEST or on the > > > > commandline. This also allows multiple tests to be run in a single > > > > automated session, which is useful for working with components which have > > > > multiple test suites. > > > > > > The same could be achieved splitting DPDK_TEST content with spaces, > > > since test names don't contain one. > > > > > > > Yep, that's a useful enhancement too, but I still thing it's better to just > > have the list of tests appended to the test binary command rather than have > > to be worrying about properly quoting a specific environment variable at > > the start of each command. > > > Ping on this. I have been using the DPDK_TEST= method for quite some time. But I don't think I ever had a need to run multiple tests since I usually track regressions or hard to reproduce failures. When developing a new test, idem, I used DPDK_TEST=. > > Other instances where using cmdline is preferred over environment > > * Calling tests using sudo. I guess calling a shell with the same command would work, something like: $ sudo sh -c 'DPDK_TEST=debug_autotest ..../build/app/test/dpdk-test --no-huge -m 512' > * Calling tests as an execute action when doing a git rebase I am pretty sure I used DPDK_TEST= in rebase execute actions in the past too. This probably works too: $ git rebase -i HEAD^ -x 'DPDK_TEST=debug_autotest build/app/test/dpdk-test --no-huge -m 512' > > Yes, again in both cases, other workarounds are generally available (e.g. > sudo -E, and exporting to environemtn before rebase), but also generally > less convenient. You find it less convenient when you want to run multiple tests. I don't have that use case but I don't mind taking it. Can you simply adjust the commitlog, or propose a new wording I can take when applying? Thanks. -- David Marchand