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 8DD71A04FD; Fri, 29 Jul 2022 13:53:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32A6B4069C; Fri, 29 Jul 2022 13:53:21 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id CB6BD40151 for ; Fri, 29 Jul 2022 13:53:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659095598; 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=RwdSAWXryfvosqK6NZoO/+27d38G0nx4QAoTSGKK5Yw=; b=Vn9OIlFh9r8aoVr7D0nuyhSptMIz2sFxrMUfS7vdMsSQpBAQBxr0JNPbkKWKJIT9nGWDLW rfhiCoAbGTb2hVWX+svK70hYKMMpj224OBy8q/l0W6xJymGsXUkoTGnL0q0vCZBS+5NqIq Ejl+3cTB1DLUHF+ijQ9tysHiaD9sD8Y= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-568-RIuWQnbhNhqmyCO1sX6X4A-1; Fri, 29 Jul 2022 07:53:17 -0400 X-MC-Unique: RIuWQnbhNhqmyCO1sX6X4A-1 Received: by mail-lj1-f198.google.com with SMTP id h21-20020a2e9ed5000000b0025d516572f4so936369ljk.12 for ; Fri, 29 Jul 2022 04:53:16 -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=RwdSAWXryfvosqK6NZoO/+27d38G0nx4QAoTSGKK5Yw=; b=1Iqmw+YUQ4JilpcPvaKrqS2So7h+KjPGpJFZkz6bvS/buWL1ID7B0LNJj/h8hWdf0w 1ZcpZONQDNXkRo8WPuaElyxnj5SXu4SFj5AMyx8UmEIoB4FwrM4NmrtwaSi1o1LkstVi +9pRLPwhj50mk2juL541fz40kBnbYkY9nLmJUJouhUFvcVZ2DIv2OCK3E9sXBiOEX+pf dzqKV4lg4jmDQLX1pG8/wZy8OoVWBvAonMUNblS9iFMxdDxXj3Yo7QX0E+6QVtMrJStu ToFgsol87pXNoZdFfEmbpD2nwCgHyjEyrB4XZlT6dFbpRvUIuujqJmEgmlJ1ofVavcXs reGw== X-Gm-Message-State: AJIora+BS59XN3SRetoUczs20N6tvCDA/nq9Gb0UlHULwX0KDSAesmH5 K1d1KizXyl/8rWmEyR7N+EUsbOO4ERA7dvGwmPKeqz3/xVy9W9YiPfWljEBqfCoIx4xPDrEFC1M 0uOIwFJw2yuPrqsz7+aM= X-Received: by 2002:a05:6512:b8b:b0:48a:d380:b089 with SMTP id b11-20020a0565120b8b00b0048ad380b089mr995589lfv.560.1659095595503; Fri, 29 Jul 2022 04:53:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sAoHDL5BrDfCKMJqItZ8RNjFu7wPPQmUR5t6eAnMut998UY3ZkBHAMi52Nkdqft5grRbDylwysGDiTVpOQugU= X-Received: by 2002:a05:6512:b8b:b0:48a:d380:b089 with SMTP id b11-20020a0565120b8b00b0048ad380b089mr995582lfv.560.1659095595237; Fri, 29 Jul 2022 04:53:15 -0700 (PDT) MIME-Version: 1.0 References: <20220729095400.774303-1-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Fri, 29 Jul 2022 13:53:04 +0200 Message-ID: Subject: Re: [PATCH] app/test: invoke all telemetry commands To: Bruce Richardson Cc: dev , Chengwen Feng , Aaron Conole , Michael Santana , Ciara Power 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 Fri, Jul 29, 2022 at 12:20 PM Bruce Richardson wrote: > > On Fri, Jul 29, 2022 at 11:54:00AM +0200, David Marchand wrote: > > Try and call all possible telemetry commands. > > Each commands is tested with no argument, 0 (for command that accepts > > a single integer like for a port identifier) and z (to catch commands > > not properly validating input). > > Fake cryptodev, dmadev, ethdev, eventdev and rawdev devices are created > > using dummy drivers. > > > > Output of the commands is not checked, the point of this test is mainly > > to catch simple issues and leaks (when coupled with ASan in the CI). > > > > Signed-off-by: David Marchand > > Acked-by: Chengwen Feng > > --- > > .github/workflows/build.yml | 2 +- > > app/test/meson.build | 35 ++++++++++++++++++++++++++++++++++- > > app/test/test_telemetry.sh | 28 ++++++++++++++++++++++++++++ > > 3 files changed, 63 insertions(+), 2 deletions(-) > > create mode 100755 app/test/test_telemetry.sh > > > > diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml > > index 6f04e7071c..bf17d2b278 100644 > > --- a/.github/workflows/build.yml > > +++ b/.github/workflows/build.yml > > @@ -140,7 +140,7 @@ jobs: > > run: sudo apt install -y crossbuild-essential-riscv64 > > - name: Install test tools packages > > if: env.AARCH64 != 'true' || env.PPC64LE != 'true' || env.RISCV64 != 'true' || env.RUN_TESTS == 'true' > > - run: sudo apt install -y gdb > > + run: sudo apt install -y gdb jq > > - name: Install doc generation packages > > if: env.BUILD_DOCS == 'true' > > run: sudo apt install -y doxygen graphviz python3-sphinx > > diff --git a/app/test/meson.build b/app/test/meson.build > > index 431c5bd318..e60fc64a37 100644 > > --- a/app/test/meson.build > > +++ b/app/test/meson.build > > @@ -473,12 +473,14 @@ message('hugepage availability: @0@'.format(has_hugepage)) > > timeout_seconds = 600 > > timeout_seconds_fast = 10 > > > > +test_no_huge_args = ['--no-huge', '-m', '2048'] > > + > > foreach arg : fast_tests > > test_args = [] > > run_test = true > > if not has_hugepage > > if arg[1] > > - test_args += ['--no-huge', '-m', '2048'] > > + test_args += test_no_huge_args > > else > > run_test = false > > endif > > @@ -520,6 +522,37 @@ foreach arg : fast_tests > > endif > > endforeach > > > > +if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') > > + test_args = [dpdk_test] > > + test_args += test_no_huge_args > > + if get_option('default_library') == 'shared' > > + foreach drv:dpdk_drivers > > + test_args += ['-d', drv.full_path().split('.a')[0] + '.so'] > > + endforeach > > Rather than looping for each driver and building a huge cmdline, we should > just be able to pass in the path to the drivers directory, and have DPDK > auto-load all .so files there. Passing in "meson.project_build_root() + > '/drivers'" should probably work. If we want a more correct way to get the > drivers build directory, we can call meson.current_build_dir() when > processing the drivers and save off that value to be reused here. Or simply resolve this with a: test_args += ['-d', fs.parent(dpdk_drivers[0].full_path())] But the problem is that the fs meson module comes with version 0.53 afaics. Any elegant alternative idea? -- David Marchand