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 027E4A00C2; Mon, 26 Sep 2022 14:52:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E84FF4069B; Mon, 26 Sep 2022 14:52:49 +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 6362F40695 for ; Mon, 26 Sep 2022 14:52:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664196767; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zlOK6h9GuNsdd9Bh7W1axdRSP/we+QaLtZJVKs4H+FU=; b=bbVAcSuzxQQiQWd0iZ1NHVo7+crkqhqNWvIwZd6jUf1ZSv8yfUxcHeSy6PB5MB0a+UR0pt Q6ZRN0pcF8Jh9NSJc4dfdOTG2D2wt7lSUY8elSiUmKBmT43DFDVXuFGv70HxN/hixyQKW8 59Kbx3M7O0MtTJbjysGHa+J8uWuhYEg= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-663-JcZ7eyuePCKZe-KQDlxCJA-1; Mon, 26 Sep 2022 08:52:47 -0400 X-MC-Unique: JcZ7eyuePCKZe-KQDlxCJA-1 Received: by mail-wm1-f69.google.com with SMTP id f25-20020a7bc8d9000000b003b4768dcd9cso1813248wml.9 for ; Mon, 26 Sep 2022 05:52:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date; bh=zlOK6h9GuNsdd9Bh7W1axdRSP/we+QaLtZJVKs4H+FU=; b=K4dqGZYgHjTyi4ZVWkCq9aIIEB6moAkopS+26r3Fq/iSbYxA2dtkG8RZl2JtbMejsL Acx+wzpRaqzk43BDLNdCgSjC2zcGXX0oi275FF8LXfkpB+dQLmDaiSlHYKwtW9MFP2AE CgLqxwqcsbmnFPUizPIwg+Kpti1/VWxNEMXBcqCLekmM/GNPe36AV3SQmaD8gHitAsr0 G68uoOa0QYEXipg0dbQJDbzNG9up504G6b0Du16gMpvrRtrFAzDcWvLaG5EOCSUcUB6v 8UlR32GUsjfYvKGjfGvDqGpyI3teseq+7rzZmAIDsyHbx4SH+lVauMPPj6LhZooAxfi4 pJPA== X-Gm-Message-State: ACrzQf1z8uFa089bTOgKcJFz1cbbQX7RhkUWj/szaOsWPwPZA0W9opga 0JXsUwfSKX5QOZSB94R6Z6opUeMw1TrfzbDml/RBfB3DLIK/9bB+v5UaZtqPBWxynmq014e+ysT iK35rIR7sS8TMT6oKj+ENus66FAL/yRdv0359tNdaJUqQtkacAVXU X-Received: by 2002:a05:6000:781:b0:22a:f30a:721f with SMTP id bu1-20020a056000078100b0022af30a721fmr13734790wrb.676.1664196765522; Mon, 26 Sep 2022 05:52:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Zn8JM3AYvjl+fD9xmy2dRagrcWcdSon2EQrp+clJQYxB3LNO630Wa+/po9gWEm+v14I9hug== X-Received: by 2002:a05:6000:781:b0:22a:f30a:721f with SMTP id bu1-20020a056000078100b0022af30a721fmr13734776wrb.676.1664196765244; Mon, 26 Sep 2022 05:52:45 -0700 (PDT) Received: from localhost (2a01cb000f483e0055ae3800781b5cbc.ipv6.abo.wanadoo.fr. [2a01:cb00:f48:3e00:55ae:3800:781b:5cbc]) by smtp.gmail.com with ESMTPSA id w21-20020a1cf615000000b003a604a29a34sm10782287wmc.35.2022.09.26.05.52.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Sep 2022 05:52:44 -0700 (PDT) Mime-Version: 1.0 Date: Mon, 26 Sep 2022 14:52:44 +0200 Message-Id: To: Cc: "Olivier Matz" , "Ferruh Yigit" , "Bruce Richardson" Subject: Re: [PATCH v5] usertools: rewrite pmdinfo From: "Robin Jarry" X-Mailer: aerc/0.12.0-57-g870a7453e1db References: <20220913105811.84384-1-robin@jarry.cc> <20220922115802.32744-1-rjarry@redhat.com> In-Reply-To: <20220922115802.32744-1-rjarry@redhat.com> X-Mimecast-Spam-Score: 1 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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 Robin Jarry, Sep 22, 2022 at 13:58: > +# ----------------------------------------------------------------------= ------ > +def ld_so_path() -> Iterator[str]: > + """ > + Return the list of directories where dynamic libraries are loaded ba= sed > + on the contents of /etc/ld.so.conf/*.conf. > + """ > + for conf in glob.iglob("/etc/ld.so.conf/*.conf"): I just noticed that this folder path is invalid. I did not encounter any errors since I did not test with librte_*.so libs installed in /usr/*. > + try: > + with open(conf, "r", encoding=3D"utf-8") as f: > + for line in f: > + line =3D line.strip() > + if os.path.isdir(line): > + yield line > + except OSError: > + pass > + > + > +LD_SO_CONF_PATH =3D ld_so_path() Also, this is stupid. The iterator will be exhausted after iterating once over it and the SO path folders will be empty on subsequent lookups. I'll submit a v6 with a fix for these two bugs.