From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 77140A04F3; Tue, 7 Jan 2020 19:59:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4D51E1D989; Tue, 7 Jan 2020 19:59:54 +0100 (CET) Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by dpdk.org (Postfix) with ESMTP id 46B201D60B for ; Tue, 7 Jan 2020 19:59:52 +0100 (CET) Received: by mail-pj1-f68.google.com with SMTP id m13so185718pjb.2 for ; Tue, 07 Jan 2020 10:59:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DcbvssGZUi4dPRHoruMpJckOE2HfIiMPwE6s+JHny4w=; b=zs6GLogBTv8sunnkhM/vwAClaPXrUQmr0vU3weiogKcJMqd9PrF9z/x0ZaOxTxO4p1 aXpl0kLneZL5QUDgzoP9Xi5o0JXNBV5vnagHvZWYs/S6rpIDgRVMxtNI79mDgaTQrPU3 Vspczzoa+0bqA989NlcgfoNIA55Lb73zPyVWvCdFnqZ5hE84eRvtkMb7XHTA11YjKUQ/ dPBnXMV1+NV9+sFcocNCmUI1UOV2JkTTxk2K0yGY7GvkFKtaxyY8YQxZRSGxYZOOYXdf 9Va7KI8rL1QifeoqmbaVdvtxi13Ekva1aSnKcbdImdD4bb0cwheO0WXIgxx/hZBwSi6n mP7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DcbvssGZUi4dPRHoruMpJckOE2HfIiMPwE6s+JHny4w=; b=C0que5nIWVOqj3xujw87aGXTjJRqywdU6nrxSZ2LFmgUh6LTKbFTB0bIfiIcFOqJ+X 1W9MIAs3Afhpa+/BS2IMDjgbMiJl17xygvzZqz5YmM/aorldFt8UFgz05g2vr4QMSIMc YUAUV/S0TypToVVX7wXzsj5+mMHQfW53uHof75jrfb8ZR5Q3AlGfBl7cb1znkn/giaIy Stq2Z5HmM3Ya2lzKRKKqoZvKgOp5D7ne8zWFEP0FClsnrobQhTN3+FF19p8CD36lXkz0 /jFyp63hRqrZAKCUN4ompiO2Qz8scPC8+chVNt3WVfzTLebVrxdy56iRZVGxPlxO4wr1 TpVg== X-Gm-Message-State: APjAAAX4aezWrvtE9tbo3mFuxnRTmiI3H82gi1ElKMUULV9ewBO51eeq ix4IzDHnGo2PMt0wtT+d5Xx06QkjaAo= X-Google-Smtp-Source: APXvYqw24wheJK9uGllofhUD2J33tgIDj5OGcnG7APfQMRlzMIZCJnL7iE7SjhyD5mkXK7yG2UVtww== X-Received: by 2002:a17:902:d711:: with SMTP id w17mr1141278ply.303.1578423590824; Tue, 07 Jan 2020 10:59:50 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id a1sm293684pfo.68.2020.01.07.10.59.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 10:59:50 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 7 Jan 2020 10:59:42 -0800 Message-Id: <20200107185942.21202-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200107174056.9397-1-stephen@networkplumber.org> References: <20200107174056.9397-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] testpmd: call cleanup on exit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 rte_eal_cleanup code is not exercised by testpmd which is the most used DPDK test tool. Add a call at end of program. This helps exercise free and close paths which can be checked with tools like valgrind. Signed-off-by: Stephen Hemminger --- v2 - report errors app/test-pmd/testpmd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index b3746822366f..2eec8afda1ec 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -3570,5 +3570,10 @@ main(int argc, char** argv) return 1; } - return 0; + ret = rte_eal_cleanup(); + if (ret != 0) + rte_exit(EXIT_FAILURE, + "EAL cleanup failed: %s\n", strerror(-ret)); + + return EXIT_SUCCESS; } -- 2.20.1