Message ID | 20230914104215.71408-1-bruce.richardson@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 21F7142596; Thu, 14 Sep 2023 12:42:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC8C7402AD; Thu, 14 Sep 2023 12:42:25 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id A521740289 for <dev@dpdk.org>; Thu, 14 Sep 2023 12:42:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694688143; x=1726224143; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=43P3ejddZSpVbpG8hDZu7OCnHUNYC7qX6Be/wv/MQ3I=; b=C0Ad3TaG3h/MT1BIU9SA6fWDRbBcb+tdrUi54zjlWbSETOh7kyCKcnKe yGeHPNRp6rw7FpfpEXgtnhu9qgz5Ah57Q6bpgZJkUrzZtyHi5QbiZ+HGc ju2TJDCKm9vZdpANVGEjI7bkuSjOJLVkPnGqA24x9hYRqgbQ3xS+DMuxF rTiblLLHBeWqkmajblaEe5IMlmyKXl496QDsP1NCP8D14/GhxywybVv37 8ZQZAkWzPB2hUwJVyCX+t1cdTi2lgPOlbgk1l5MjWElCRmRE2mGkB5ZP4 av0bR+ucm//Byo5IfiWPpMH1bGn9s3sO5KMBk+mdbRiHYK7tos7iyRF7k A==; X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="378834377" X-IronPort-AV: E=Sophos;i="6.02,145,1688454000"; d="scan'208";a="378834377" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 03:42:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="918204052" X-IronPort-AV: E=Sophos;i="6.02,145,1688454000"; d="scan'208";a="918204052" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga005.jf.intel.com with ESMTP; 14 Sep 2023 03:42:21 -0700 From: Bruce Richardson <bruce.richardson@intel.com> To: dev@dpdk.org Cc: Bruce Richardson <bruce.richardson@intel.com> Subject: [PATCH 0/1] make file prefix unit test more resilient Date: Thu, 14 Sep 2023 11:42:14 +0100 Message-Id: <20230914104215.71408-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
make file prefix unit test more resilient
|
|
Message
Bruce Richardson
Sept. 14, 2023, 10:42 a.m. UTC
When examining the IOL testing failures for patch series [1], I observed that the failures reported were in the eal_flags_file_prefix unit test. I was able to reproduce this on my system by passing an additional "--on-pci" flag to the test run, since the log to the test has errors about device availability. Adding the "no-pci" flag to the individual test commands used by the unit tests fixed the issue thereafter, allowing the test to pass in all cases for me. Therefore, I am submitting this patch in the hopes of making the test more robust, since the observed failures seem unrelated to the original patchset [1] I submitted. [1] http://patches.dpdk.org/project/dpdk/list/?series=29406 Bruce Richardson (1): app/test: skip PCI bus scan when testing prefix flags app/test/test_eal_flags.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
Comments
On Thu, Sep 14, 2023 at 12:42 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > When examining the IOL testing failures for patch series [1], I observed > that the failures reported were in the eal_flags_file_prefix unit test. > I was able to reproduce this on my system by passing an additional > "--on-pci" flag to the test run, since the log to the test has errors > about device availability. Adding the "no-pci" flag to the individual Something is not clear to me. While I understand that passing "no-pci" helps avoiding the issue (as described below), I have some trouble understanding this passage (above) with "--on-pci". How did you reproduce the issue? > test commands used by the unit tests fixed the issue thereafter, > allowing the test to pass in all cases for me. Therefore, I am > submitting this patch in the hopes of making the test more robust, since > the observed failures seem unrelated to the original patchset [1] I > submitted. > > [1] http://patches.dpdk.org/project/dpdk/list/?series=29406 > > Bruce Richardson (1): > app/test: skip PCI bus scan when testing prefix flags > > app/test/test_eal_flags.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) Iiuc, the problem is that the file_prefix unit test can fail if any DPDK subsystem forgets to release some memory and some hugepages are left behind at the cleanup step. Passing --no-pci as you suggest hides issues coming from PCI drivers. This is something I tried to fix too, with https://patchwork.dpdk.org/project/dpdk/list/?series=29288 though my fix only handles a part of the issue (here, the ethdev drivers). Another way to make the file prefix more robust would be to remove the check on released memory, or move it to another test.
On Wed, Sep 20, 2023 at 12:00:08PM +0200, David Marchand wrote: > On Thu, Sep 14, 2023 at 12:42 PM Bruce Richardson > <bruce.richardson@intel.com> wrote: > > > > When examining the IOL testing failures for patch series [1], I observed > > that the failures reported were in the eal_flags_file_prefix unit test. > > I was able to reproduce this on my system by passing an additional > > "--on-pci" flag to the test run, since the log to the test has errors > > about device availability. Adding the "no-pci" flag to the individual > > Something is not clear to me. > > While I understand that passing "no-pci" helps avoiding the issue (as > described below), I have some trouble understanding this passage > (above) with "--on-pci". That's a typo for no-pci. When I ran the test on my system with the main process using no-pci, I was able to reproduce the issue seen in the IOL lab. Otherwise I couldn't reproduce it. > How did you reproduce the issue? > > > > test commands used by the unit tests fixed the issue thereafter, > > allowing the test to pass in all cases for me. Therefore, I am > > submitting this patch in the hopes of making the test more robust, since > > the observed failures seem unrelated to the original patchset [1] I > > submitted. > > > > [1] http://patches.dpdk.org/project/dpdk/list/?series=29406 > > > > Bruce Richardson (1): > > app/test: skip PCI bus scan when testing prefix flags > > > > app/test/test_eal_flags.c | 20 ++++++++++---------- > > 1 file changed, 10 insertions(+), 10 deletions(-) > > Iiuc, the problem is that the file_prefix unit test can fail if any > DPDK subsystem forgets to release some memory and some hugepages are > left behind at the cleanup step. > Passing --no-pci as you suggest hides issues coming from PCI drivers. > > This is something I tried to fix too, with > https://patchwork.dpdk.org/project/dpdk/list/?series=29288 though my > fix only handles a part of the issue (here, the ethdev drivers). > > Another way to make the file prefix more robust would be to remove the > check on released memory, or move it to another test. > I actually think the test is a good one to have. Also, taking in your patch to help with the issue is a good idea also. I'd still suggest that this patch be considered anyway, as there is no need to do PCI bus scanning as part of this test. Therefore I'd view it as a harmless addition that may help things. /Bruce
20/09/2023 12:09, Bruce Richardson: > On Wed, Sep 20, 2023 at 12:00:08PM +0200, David Marchand wrote: > > On Thu, Sep 14, 2023 at 12:42 PM Bruce Richardson > > <bruce.richardson@intel.com> wrote: > > > > > > When examining the IOL testing failures for patch series [1], I observed > > > that the failures reported were in the eal_flags_file_prefix unit test. > > > I was able to reproduce this on my system by passing an additional > > > "--on-pci" flag to the test run, since the log to the test has errors > > > about device availability. Adding the "no-pci" flag to the individual > > > > Something is not clear to me. > > > > While I understand that passing "no-pci" helps avoiding the issue (as > > described below), I have some trouble understanding this passage > > (above) with "--on-pci". > > That's a typo for no-pci. When I ran the test on my system with the main > process using no-pci, I was able to reproduce the issue seen in the IOL > lab. Otherwise I couldn't reproduce it. > > > How did you reproduce the issue? > > > > > > > test commands used by the unit tests fixed the issue thereafter, > > > allowing the test to pass in all cases for me. Therefore, I am > > > submitting this patch in the hopes of making the test more robust, since > > > the observed failures seem unrelated to the original patchset [1] I > > > submitted. > > > > > > [1] http://patches.dpdk.org/project/dpdk/list/?series=29406 > > > > > > Bruce Richardson (1): > > > app/test: skip PCI bus scan when testing prefix flags > > > > > > app/test/test_eal_flags.c | 20 ++++++++++---------- > > > 1 file changed, 10 insertions(+), 10 deletions(-) > > > > Iiuc, the problem is that the file_prefix unit test can fail if any > > DPDK subsystem forgets to release some memory and some hugepages are > > left behind at the cleanup step. > > Passing --no-pci as you suggest hides issues coming from PCI drivers. > > > > This is something I tried to fix too, with > > https://patchwork.dpdk.org/project/dpdk/list/?series=29288 though my > > fix only handles a part of the issue (here, the ethdev drivers). > > > > Another way to make the file prefix more robust would be to remove the > > check on released memory, or move it to another test. > > > I actually think the test is a good one to have. Also, taking in your patch > to help with the issue is a good idea also. > > I'd still suggest that this patch be considered anyway, as there is no need > to do PCI bus scanning as part of this test. Therefore I'd view it as a > harmless addition that may help things. I'm hesitating. This test is checking if some memory is left, and I think it is sane. If we add --no-pci, we reduce the coverage of this check. Now that the root cause is fixed by David in ethdev (https://patches.dpdk.org/project/dpdk/patch/20230821085806.3062613-4-david.marchand@redhat.com/) we could continue checking memory freeing with PCI drivers. So I tend to reject this patch. Other opinions?
On Fri, Sep 22, 2023 at 02:57:32PM +0200, Thomas Monjalon wrote: > 20/09/2023 12:09, Bruce Richardson: > > On Wed, Sep 20, 2023 at 12:00:08PM +0200, David Marchand wrote: > > > On Thu, Sep 14, 2023 at 12:42 PM Bruce Richardson > > > <bruce.richardson@intel.com> wrote: > > > > > > > > When examining the IOL testing failures for patch series [1], I observed > > > > that the failures reported were in the eal_flags_file_prefix unit test. > > > > I was able to reproduce this on my system by passing an additional > > > > "--on-pci" flag to the test run, since the log to the test has errors > > > > about device availability. Adding the "no-pci" flag to the individual > > > > > > Something is not clear to me. > > > > > > While I understand that passing "no-pci" helps avoiding the issue (as > > > described below), I have some trouble understanding this passage > > > (above) with "--on-pci". > > > > That's a typo for no-pci. When I ran the test on my system with the main > > process using no-pci, I was able to reproduce the issue seen in the IOL > > lab. Otherwise I couldn't reproduce it. > > > > > How did you reproduce the issue? > > > > > > > > > > test commands used by the unit tests fixed the issue thereafter, > > > > allowing the test to pass in all cases for me. Therefore, I am > > > > submitting this patch in the hopes of making the test more robust, since > > > > the observed failures seem unrelated to the original patchset [1] I > > > > submitted. > > > > > > > > [1] http://patches.dpdk.org/project/dpdk/list/?series=29406 > > > > > > > > Bruce Richardson (1): > > > > app/test: skip PCI bus scan when testing prefix flags > > > > > > > > app/test/test_eal_flags.c | 20 ++++++++++---------- > > > > 1 file changed, 10 insertions(+), 10 deletions(-) > > > > > > Iiuc, the problem is that the file_prefix unit test can fail if any > > > DPDK subsystem forgets to release some memory and some hugepages are > > > left behind at the cleanup step. > > > Passing --no-pci as you suggest hides issues coming from PCI drivers. > > > > > > This is something I tried to fix too, with > > > https://patchwork.dpdk.org/project/dpdk/list/?series=29288 though my > > > fix only handles a part of the issue (here, the ethdev drivers). > > > > > > Another way to make the file prefix more robust would be to remove the > > > check on released memory, or move it to another test. > > > > > I actually think the test is a good one to have. Also, taking in your patch > > to help with the issue is a good idea also. > > > > I'd still suggest that this patch be considered anyway, as there is no need > > to do PCI bus scanning as part of this test. Therefore I'd view it as a > > harmless addition that may help things. > > I'm hesitating. > This test is checking if some memory is left, and I think it is sane. > If we add --no-pci, we reduce the coverage of this check. > > Now that the root cause is fixed by David in ethdev > (https://patches.dpdk.org/project/dpdk/patch/20230821085806.3062613-4-david.marchand@redhat.com/) > we could continue checking memory freeing with PCI drivers. > So I tend to reject this patch. > > Other opinions? > No objection to this patch being rejected if not necessary. However, I'd question if the normal case is actually checking for freeing memory in PCI drivers. I suspect that in EAL cleanup we delete all files we use, irrespective of whether the mappings are still in use. Then when the process exits the hugepages will be completely freed back - even if some components leaked memory. I believe this case is checking for correct EAL cleanup of hugepage files, not for any memory leaks, and in that regard omitting some components should make no difference. /Bruce
22/09/2023 15:23, Bruce Richardson: > On Fri, Sep 22, 2023 at 02:57:32PM +0200, Thomas Monjalon wrote: > > 20/09/2023 12:09, Bruce Richardson: > > > On Wed, Sep 20, 2023 at 12:00:08PM +0200, David Marchand wrote: > > > > On Thu, Sep 14, 2023 at 12:42 PM Bruce Richardson > > > > <bruce.richardson@intel.com> wrote: > > > > > > > > > > When examining the IOL testing failures for patch series [1], I observed > > > > > that the failures reported were in the eal_flags_file_prefix unit test. > > > > > I was able to reproduce this on my system by passing an additional > > > > > "--on-pci" flag to the test run, since the log to the test has errors > > > > > about device availability. Adding the "no-pci" flag to the individual > > > > > > > > Something is not clear to me. > > > > > > > > While I understand that passing "no-pci" helps avoiding the issue (as > > > > described below), I have some trouble understanding this passage > > > > (above) with "--on-pci". > > > > > > That's a typo for no-pci. When I ran the test on my system with the main > > > process using no-pci, I was able to reproduce the issue seen in the IOL > > > lab. Otherwise I couldn't reproduce it. > > > > > > > How did you reproduce the issue? > > > > > > > > > > > > > test commands used by the unit tests fixed the issue thereafter, > > > > > allowing the test to pass in all cases for me. Therefore, I am > > > > > submitting this patch in the hopes of making the test more robust, since > > > > > the observed failures seem unrelated to the original patchset [1] I > > > > > submitted. > > > > > > > > > > [1] http://patches.dpdk.org/project/dpdk/list/?series=29406 > > > > > > > > > > Bruce Richardson (1): > > > > > app/test: skip PCI bus scan when testing prefix flags > > > > > > > > > > app/test/test_eal_flags.c | 20 ++++++++++---------- > > > > > 1 file changed, 10 insertions(+), 10 deletions(-) > > > > > > > > Iiuc, the problem is that the file_prefix unit test can fail if any > > > > DPDK subsystem forgets to release some memory and some hugepages are > > > > left behind at the cleanup step. > > > > Passing --no-pci as you suggest hides issues coming from PCI drivers. > > > > > > > > This is something I tried to fix too, with > > > > https://patchwork.dpdk.org/project/dpdk/list/?series=29288 though my > > > > fix only handles a part of the issue (here, the ethdev drivers). > > > > > > > > Another way to make the file prefix more robust would be to remove the > > > > check on released memory, or move it to another test. > > > > > > > I actually think the test is a good one to have. Also, taking in your patch > > > to help with the issue is a good idea also. > > > > > > I'd still suggest that this patch be considered anyway, as there is no need > > > to do PCI bus scanning as part of this test. Therefore I'd view it as a > > > harmless addition that may help things. > > > > I'm hesitating. > > This test is checking if some memory is left, and I think it is sane. > > If we add --no-pci, we reduce the coverage of this check. > > > > Now that the root cause is fixed by David in ethdev > > (https://patches.dpdk.org/project/dpdk/patch/20230821085806.3062613-4-david.marchand@redhat.com/) > > we could continue checking memory freeing with PCI drivers. > > So I tend to reject this patch. > > > > Other opinions? > > > No objection to this patch being rejected if not necessary. > > However, I'd question if the normal case is actually checking for freeing > memory in PCI drivers. I suspect that in EAL cleanup we delete all files we > use, irrespective of whether the mappings are still in use. Then when the > process exits the hugepages will be completely freed back - even if some > components leaked memory. I believe this case is checking for correct EAL > cleanup of hugepage files, not for any memory leaks, and in that regard > omitting some components should make no difference. You're right, that's why I'm hesitating. Fortunately it helped to discover a memory leak. Do we want to add a new specific test for memory leaks, or is it OK to have it in this one?
On Sat, Sep 23, 2023 at 10:21:04AM +0200, Thomas Monjalon wrote: > 22/09/2023 15:23, Bruce Richardson: > > On Fri, Sep 22, 2023 at 02:57:32PM +0200, Thomas Monjalon wrote: > > > 20/09/2023 12:09, Bruce Richardson: > > > > On Wed, Sep 20, 2023 at 12:00:08PM +0200, David Marchand wrote: > > > > > On Thu, Sep 14, 2023 at 12:42 PM Bruce Richardson > > > > > <bruce.richardson@intel.com> wrote: > > > > > > > > > > > > When examining the IOL testing failures for patch series [1], I observed > > > > > > that the failures reported were in the eal_flags_file_prefix unit test. > > > > > > I was able to reproduce this on my system by passing an additional > > > > > > "--on-pci" flag to the test run, since the log to the test has errors > > > > > > about device availability. Adding the "no-pci" flag to the individual > > > > > > > > > > Something is not clear to me. > > > > > > > > > > While I understand that passing "no-pci" helps avoiding the issue (as > > > > > described below), I have some trouble understanding this passage > > > > > (above) with "--on-pci". > > > > > > > > That's a typo for no-pci. When I ran the test on my system with the main > > > > process using no-pci, I was able to reproduce the issue seen in the IOL > > > > lab. Otherwise I couldn't reproduce it. > > > > > > > > > How did you reproduce the issue? > > > > > > > > > > > > > > > > test commands used by the unit tests fixed the issue thereafter, > > > > > > allowing the test to pass in all cases for me. Therefore, I am > > > > > > submitting this patch in the hopes of making the test more robust, since > > > > > > the observed failures seem unrelated to the original patchset [1] I > > > > > > submitted. > > > > > > > > > > > > [1] http://patches.dpdk.org/project/dpdk/list/?series=29406 > > > > > > > > > > > > Bruce Richardson (1): > > > > > > app/test: skip PCI bus scan when testing prefix flags > > > > > > > > > > > > app/test/test_eal_flags.c | 20 ++++++++++---------- > > > > > > 1 file changed, 10 insertions(+), 10 deletions(-) > > > > > > > > > > Iiuc, the problem is that the file_prefix unit test can fail if any > > > > > DPDK subsystem forgets to release some memory and some hugepages are > > > > > left behind at the cleanup step. > > > > > Passing --no-pci as you suggest hides issues coming from PCI drivers. > > > > > > > > > > This is something I tried to fix too, with > > > > > https://patchwork.dpdk.org/project/dpdk/list/?series=29288 though my > > > > > fix only handles a part of the issue (here, the ethdev drivers). > > > > > > > > > > Another way to make the file prefix more robust would be to remove the > > > > > check on released memory, or move it to another test. > > > > > > > > > I actually think the test is a good one to have. Also, taking in your patch > > > > to help with the issue is a good idea also. > > > > > > > > I'd still suggest that this patch be considered anyway, as there is no need > > > > to do PCI bus scanning as part of this test. Therefore I'd view it as a > > > > harmless addition that may help things. > > > > > > I'm hesitating. > > > This test is checking if some memory is left, and I think it is sane. > > > If we add --no-pci, we reduce the coverage of this check. > > > > > > Now that the root cause is fixed by David in ethdev > > > (https://patches.dpdk.org/project/dpdk/patch/20230821085806.3062613-4-david.marchand@redhat.com/) > > > we could continue checking memory freeing with PCI drivers. > > > So I tend to reject this patch. > > > > > > Other opinions? > > > > > No objection to this patch being rejected if not necessary. > > > > However, I'd question if the normal case is actually checking for freeing > > memory in PCI drivers. I suspect that in EAL cleanup we delete all files we > > use, irrespective of whether the mappings are still in use. Then when the > > process exits the hugepages will be completely freed back - even if some > > components leaked memory. I believe this case is checking for correct EAL > > cleanup of hugepage files, not for any memory leaks, and in that regard > > omitting some components should make no difference. > > You're right, that's why I'm hesitating. > Fortunately it helped to discover a memory leak. > Do we want to add a new specific test for memory leaks, > or is it OK to have it in this one? > Not really sure. I'd tend towards saying that special memory leak checkers like valgrind are better to use than trying to detect them in unit tests directly. However, not an expert in this area. /Bruce
Bruce Richardson <bruce.richardson@intel.com> writes: > On Sat, Sep 23, 2023 at 10:21:04AM +0200, Thomas Monjalon wrote: >> 22/09/2023 15:23, Bruce Richardson: >> > On Fri, Sep 22, 2023 at 02:57:32PM +0200, Thomas Monjalon wrote: >> > > 20/09/2023 12:09, Bruce Richardson: >> > > > On Wed, Sep 20, 2023 at 12:00:08PM +0200, David Marchand wrote: >> > > > > On Thu, Sep 14, 2023 at 12:42 PM Bruce Richardson >> > > > > <bruce.richardson@intel.com> wrote: >> > > > > > >> > > > > > When examining the IOL testing failures for patch series [1], I observed >> > > > > > that the failures reported were in the eal_flags_file_prefix unit test. >> > > > > > I was able to reproduce this on my system by passing an additional >> > > > > > "--on-pci" flag to the test run, since the log to the test has errors >> > > > > > about device availability. Adding the "no-pci" flag to the individual >> > > > > >> > > > > Something is not clear to me. >> > > > > >> > > > > While I understand that passing "no-pci" helps avoiding the issue (as >> > > > > described below), I have some trouble understanding this passage >> > > > > (above) with "--on-pci". >> > > > >> > > > That's a typo for no-pci. When I ran the test on my system with the main >> > > > process using no-pci, I was able to reproduce the issue seen in the IOL >> > > > lab. Otherwise I couldn't reproduce it. >> > > > >> > > > > How did you reproduce the issue? >> > > > > >> > > > > >> > > > > > test commands used by the unit tests fixed the issue thereafter, >> > > > > > allowing the test to pass in all cases for me. Therefore, I am >> > > > > > submitting this patch in the hopes of making the test more robust, since >> > > > > > the observed failures seem unrelated to the original patchset [1] I >> > > > > > submitted. >> > > > > > >> > > > > > [1] http://patches.dpdk.org/project/dpdk/list/?series=29406 >> > > > > > >> > > > > > Bruce Richardson (1): >> > > > > > app/test: skip PCI bus scan when testing prefix flags >> > > > > > >> > > > > > app/test/test_eal_flags.c | 20 ++++++++++---------- >> > > > > > 1 file changed, 10 insertions(+), 10 deletions(-) >> > > > > >> > > > > Iiuc, the problem is that the file_prefix unit test can fail if any >> > > > > DPDK subsystem forgets to release some memory and some hugepages are >> > > > > left behind at the cleanup step. >> > > > > Passing --no-pci as you suggest hides issues coming from PCI drivers. >> > > > > >> > > > > This is something I tried to fix too, with >> > > > > https://patchwork.dpdk.org/project/dpdk/list/?series=29288 though my >> > > > > fix only handles a part of the issue (here, the ethdev drivers). >> > > > > >> > > > > Another way to make the file prefix more robust would be to remove the >> > > > > check on released memory, or move it to another test. >> > > > > >> > > > I actually think the test is a good one to have. Also, taking in your patch >> > > > to help with the issue is a good idea also. >> > > > >> > > > I'd still suggest that this patch be considered anyway, as there is no need >> > > > to do PCI bus scanning as part of this test. Therefore I'd view it as a >> > > > harmless addition that may help things. >> > > >> > > I'm hesitating. >> > > This test is checking if some memory is left, and I think it is sane. >> > > If we add --no-pci, we reduce the coverage of this check. >> > > >> > > Now that the root cause is fixed by David in ethdev >> > > (https://patches.dpdk.org/project/dpdk/patch/20230821085806.3062613-4-david.marchand@redhat.com/) >> > > we could continue checking memory freeing with PCI drivers. >> > > So I tend to reject this patch. >> > > >> > > Other opinions? >> > > >> > No objection to this patch being rejected if not necessary. >> > >> > However, I'd question if the normal case is actually checking for freeing >> > memory in PCI drivers. I suspect that in EAL cleanup we delete all files we >> > use, irrespective of whether the mappings are still in use. Then when the >> > process exits the hugepages will be completely freed back - even if some >> > components leaked memory. I believe this case is checking for correct EAL >> > cleanup of hugepage files, not for any memory leaks, and in that regard >> > omitting some components should make no difference. >> >> You're right, that's why I'm hesitating. >> Fortunately it helped to discover a memory leak. >> Do we want to add a new specific test for memory leaks, >> or is it OK to have it in this one? >> > > Not really sure. I'd tend towards saying that special memory leak checkers > like valgrind are better to use than trying to detect them in unit tests > directly. However, not an expert in this area. I do tend to agree that we should rely on more generic memory infra like valgrind. However, the way we use mempools doesn't always lend itself to leak checkers like valgrind which usually expect to own all the individual blocks. Maybe newer versions can work with our mempools though? > /Bruce