From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 56037A0C47;
	Tue, 26 Oct 2021 04:27:02 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id F388B41160;
	Tue, 26 Oct 2021 04:26:52 +0200 (CEST)
Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182])
 by mails.dpdk.org (Postfix) with ESMTP id 887C840E3C
 for <dev@dpdk.org>; Tue, 26 Oct 2021 04:26:49 +0200 (CEST)
Received: from
 linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net
 (linux.microsoft.com [13.77.154.182])
 by linux.microsoft.com (Postfix) with ESMTPSA id DC71D20A5047;
 Mon, 25 Oct 2021 19:26:48 -0700 (PDT)
DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DC71D20A5047
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;
 s=default; t=1635215208;
 bh=pepWjjVIbE2tSGy72zZCgpSt9v1VtfzH7pXoS5SfXBQ=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=n3UZo1gXWSmQyDOrFmbyCmOLHcsJGvAXO3i6/Nnbr37i8ty6iom+kGmoKKX8VKDa+
 eBM3TbrA7KH3LOyaQSb4bOOxjlcCK1/Yu0EdQbXnk1Lb34/gW6CY/925CPTsLWFzje
 Li4plsMlZkD/I2QAVp1k9gUZL8MpkolSy7KJhOEs=
From: Jie Zhou <jizh@linux.microsoft.com>
To: dev@dpdk.org
Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com,
 navasile@linux.microsoft.com, dmitrym@microsoft.com,
 pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net,
 aconole@redhat.com
Date: Mon, 25 Oct 2021 19:26:37 -0700
Message-Id: <1635215204-20604-5-git-send-email-jizh@linux.microsoft.com>
X-Mailer: git-send-email 1.8.3.1
In-Reply-To: <1635215204-20604-1-git-send-email-jizh@linux.microsoft.com>
References: <1634228502-14701-1-git-send-email-jizh@linux.microsoft.com>
 <1635215204-20604-1-git-send-email-jizh@linux.microsoft.com>
Subject: [dpdk-dev] [PATCH v7 04/11] app/test: exclude ENOTSUP as failure
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
Sender: "dev" <dev-bounces@dpdk.org>

Check rte_errno to exclude ENOTSUP as failures in test_memory.c

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 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 dbf6871e71..379b0f99ca 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -10,6 +10,7 @@
 #include <rte_memory.h>
 #include <rte_common.h>
 #include <rte_memzone.h>
+#include <rte_errno.h>
 
 #include "test.h"
 
@@ -63,7 +64,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
 	/* we're able to get memseg fd - try getting its offset */
 	ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
 	if (ret < 0) {
-		if (errno == ENOTSUP)
+		if (rte_errno == ENOTSUP)
 			return 1;
 		return -1;
 	}
-- 
2.32.0.windows.2