From patchwork Fri Sep 17 15:09:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 99209 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: 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 193D9A0C43; Fri, 17 Sep 2021 17:09:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CBFDC410EC; Fri, 17 Sep 2021 17:09:32 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 20110410EC for ; Fri, 17 Sep 2021 17:09:30 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10110"; a="286498949" X-IronPort-AV: E=Sophos;i="5.85,301,1624345200"; d="scan'208";a="286498949" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2021 08:09:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,301,1624345200"; d="scan'208";a="554669939" Received: from silpixa00399126.ir.intel.com ([10.237.223.29]) by fmsmga002.fm.intel.com with ESMTP; 17 Sep 2021 08:09:28 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , anatoly.burakov@intel.com, Brandon Lo Date: Fri, 17 Sep 2021 16:09:17 +0100 Message-Id: <20210917150917.90892-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] app/test: fix memory autotests on FreeBSD 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" The memory autotests were failing on FreeBSD, due to an incorrect errno variable being checked for ENOTSUP. The test checked "errno" while the DPDK API sets "rte_errno". Changing to check the right variable makes the test behave properly. Fixes: c3e35a0966b8 ("test/mem: check segment fd API") Cc: anatoly.burakov@intel.com Reported-by: Brandon Lo Signed-off-by: Bruce Richardson Reviewed-by: David Marchand --- app/test/test_memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test/test_memory.c b/app/test/test_memory.c index 7d5ae99bab..dbf6871e71 100644 --- a/app/test/test_memory.c +++ b/app/test/test_memory.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -53,7 +54,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms, /* ENOTSUP means segment is valid, but there is not support for * segment fd API (e.g. on FreeBSD). */ - if (errno == ENOTSUP) + if (rte_errno == ENOTSUP) return 1; /* all other errors are treated as failures */ return -1;