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 D31E2A0548; Wed, 15 Jun 2022 16:01:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4DC240F1A; Wed, 15 Jun 2022 16:01:00 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 71D8740F19 for ; Wed, 15 Jun 2022 16:00:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655301659; 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=fqBHYJHAg3KkFiWK5dsX9QcWRX7KoXonQrzttmWDNws=; b=ICW09GyrMo1mV+xDnO2XqrfYcmUjWPBBecJZf3cHMsX1/eGe6yafjrDGjgCVnxRLhsDBPL RNHwi/04aBW6IWYGM40vOjOTBc2Edx7KDLtf17KcHQ2elZALh5PiNekVP7DqdKLg7ueLTI BR38iMKKJxoPT89k2lYewYy7nObEHcM= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-517-20nK4fGpPjCy5_RxCKTQGA-1; Wed, 15 Jun 2022 10:00:58 -0400 X-MC-Unique: 20nK4fGpPjCy5_RxCKTQGA-1 Received: by mail-lf1-f69.google.com with SMTP id j3-20020a05651231c300b0047dbea7b031so6038557lfe.19 for ; Wed, 15 Jun 2022 07:00:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fqBHYJHAg3KkFiWK5dsX9QcWRX7KoXonQrzttmWDNws=; b=KqQVKtxxlJFNU2hvBiQXbd7mZuixHTQEerE7NcuC9fQ5LzowMsLfx+BjhF8VkYFiT3 gsRfkNexKVccdzs4FS4v5jPleCLXX/2W3cWipnR27Dn9I/HonnnrbLB9+UKc+hT7Wbea 7dUZbaSVo/DmJs2DsrcCnd1q0RwZ0PWUfva2vz9lGhNO8Prp2PckL1+f8NZVYyet2Flw aH0Hp8ev2II957VCYKfEuF+ZWLc2X0L3SbXnwrrMfBSLeYOTVeXL7/SefrxwlmHxXXG6 vbiuquuBOxEGV3bOBUetJl03MXlv5rPsbugSx/pG+ycWA7Y1tNNRYVbx0EJ7dkcbTiFq DZDw== X-Gm-Message-State: AJIora8Nji3NlbWdqHGTL37Luv9m8guzhqWlix+KHURJFvFAl7XGNAqE fbKq+3oxdT9/pTFWJhSSJSuKTPCHONiytrarpxXtzC/ernV41H8ZKjU06dE6Ti6R/ozQMZlh07m D/qZ9+/IlyXjtJDJK7Ns= X-Received: by 2002:ac2:5201:0:b0:479:3923:9559 with SMTP id a1-20020ac25201000000b0047939239559mr6162810lfl.553.1655301656388; Wed, 15 Jun 2022 07:00:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVoJdhyNBCBq5KypY+Q6wW5ARUuFSSEQdDVCi/0bZ6wib3yPcbXIWaNLknQOM7jE4EZ9u8ojb1RvgW81m9Im4= X-Received: by 2002:ac2:5201:0:b0:479:3923:9559 with SMTP id a1-20020ac25201000000b0047939239559mr6162793lfl.553.1655301656099; Wed, 15 Jun 2022 07:00:56 -0700 (PDT) MIME-Version: 1.0 References: <20220607120014.49823-1-fengchengwen@huawei.com> <20220614055900.22848-1-fengchengwen@huawei.com> <20220614055900.22848-4-fengchengwen@huawei.com> In-Reply-To: <20220614055900.22848-4-fengchengwen@huawei.com> From: David Marchand Date: Wed, 15 Jun 2022 16:00:44 +0200 Message-ID: Subject: Re: [PATCH v2 3/3] test: support trace-autotest when enable trace To: Chengwen Feng , Aaron Conole Cc: Thomas Monjalon , dev , "Burakov, Anatoly" , Jerin Jacob Kollanukkaran , Bruce Richardson 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" 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 On Tue, Jun 14, 2022 at 8:06 AM Chengwen Feng wrote: > > There are a bug[1] when exit application while enable tracing, this > bug has not been discovered for a long time, to quickly detect such > bugs, this patch was introduced. > > This patch adds a testcase with trace enabling, it also depends on > patch[2] because it has a long file-prefix. > > [1] eal: fix segment fault when exit trace > [2] eal: fix trace init fail with long file-prefix This commitlog feels more like a cover letter. Please describe what the impact of the patch is, like mention that the trace_autotest unit test is being called twice, once with traces disabled, and once with traces enabled. And that the traces file is being written in a directory part of the build directory. > > Signed-off-by: Chengwen Feng > --- > app/test/meson.build | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/app/test/meson.build b/app/test/meson.build > index 7fe261cae8..eb37aa632a 100644 > --- a/app/test/meson.build > +++ b/app/test/meson.build > @@ -509,6 +509,17 @@ foreach arg : fast_tests > is_parallel : false, > suite : 'fast-tests') > endif > + > + if run_test and arg[0] == 'trace_autotest' and (not is_windows) Calling this test on Windows should not be an issue. Is it not the case? > + test_args += ['--trace=.*'] > + test_args += ['--trace-dir=@0@'.format(meson.current_build_dir())] > + test(arg[0], dpdk_test, 58/68 DPDK:fast-tests / trace_autotest OK 0.16s 59/68 DPDK:fast-tests / trace_autotest OK 0.16s By using the same test name, it's hard to tell what the difference is between those two lines. And practically, as a developer reproducing/troubleshooting a test failure, you can't call only one of the test case. I am not sure what could be done to enhance this.., how about using a dedicated test name? Like below snippet, replacing the whole proposed patch: @@ -508,6 +508,16 @@ foreach arg : fast_tests timeout : timeout_seconds_fast, is_parallel : false, suite : 'fast-tests') + if arg[0] == 'trace_autotest' + test_args += ['--trace=.*'] + test_args += ['--trace-dir=@0@'.format(meson.current_build_dir())] + test(arg[0] + '_with_traces', dpdk_test, + env : ['DPDK_TEST=' + arg[0]], + args : test_args, + timeout : timeout_seconds_fast, + is_parallel : false, + suite : 'fast-tests') + endif endif endforeach -- David Marchand