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 B0DE2A0547; Thu, 26 Aug 2021 17:19:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 155AE41240; Thu, 26 Aug 2021 17:19:19 +0200 (CEST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by mails.dpdk.org (Postfix) with ESMTP id 95F3141222 for ; Thu, 26 Aug 2021 17:19:15 +0200 (CEST) Received: by mail-lf1-f41.google.com with SMTP id o10so7559553lfr.11 for ; Thu, 26 Aug 2021 08:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tzOEu8/g9NHoVjhaT5GbQFAUYdTV9TiEty8W0TRL0Ks=; b=HB5WLWjNUzD10DTv5M+LdsxiocQEdx8MwzvXtp+X8cM6Ium2f1vgrwBzjOp9EQq1RL UJlf58EdRtA6skmN7U/8oeo6rCbqq60H+wLbtPU62xOjGX/XypiOfy+VLDDaVtdo+18+ +mHW/Ok//sLodNZYXY6Bf2tV+S8QPCUUOWpw2PCfoDFS4APKKHdKo3sqlOg5cNaySKhV nyErfbqSdfNioYhfy7KgmwKHwlh8qZ1zPPOB0rrDbzYhI6gdCggGMyVVWPJa1ryPsfHW AuEw7mweAj+JD6Iemzpy74mreziewgPaC/FvuC6heNLW5oDXxKZQwPVJswt7Iqm3QTyF baPg== 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=tzOEu8/g9NHoVjhaT5GbQFAUYdTV9TiEty8W0TRL0Ks=; b=AVzV0Nnf7wZmDdLyNdP2rUWJ4812LJq58LA2DUWfWqCV0Au3TJ6wSRY1Y1aY/mLKWQ BRwhO2AHtBcKBT6/plPBPI7hXQ+6+jI/orJh75CgkSFuSZWBG4XrZKwPnpxV0+Oiljzc WO+KAAVO2a+n8sRZHTwzDERmxoyS4CNSX31MsGRze8e3dMyRNaCUv8JREUIjeHQpLoct stsaRh4Tq3ZGw43UaR7EtnMjrWF+n2GAY+xFvajEHjgWYB/IZ+wZ42X1/2wjJo8f8TM8 h+qwvnpxo7S2Cl1xU3x1QLjlcAN0/n8q4e6IKxFFg1GRerdriTX1r768yODfrMQ42H7T i/eQ== X-Gm-Message-State: AOAM532f4kmcYIib8CBYyZ4KQrHwOyVmBIBTiSVBMA8y6LPzbP0NiLyY brzgcy9Xufobyz46PgcBhiH4Bta+ago87g== X-Google-Smtp-Source: ABdhPJx43gY90PagqMB211fj3wy+x2dw+rDfS8JjYJJsyvXOyYRgSLwTxT3NyKiGuAV9CnFO1PwZOw== X-Received: by 2002:ac2:4c56:: with SMTP id o22mr3123081lfk.240.1629991154879; Thu, 26 Aug 2021 08:19:14 -0700 (PDT) Received: from localhost.localdomain ([212.48.63.198]) by smtp.gmail.com with ESMTPSA id z13sm377267lfu.0.2021.08.26.08.19.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Aug 2021 08:19:14 -0700 (PDT) From: Igor Ryzhov To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Thu, 26 Aug 2021 18:19:11 +0300 Message-Id: <20210826151911.15699-3-iryzhov@nfware.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210826151911.15699-1-iryzhov@nfware.com> References: <20210704160610.62682-1-iryzhov@nfware.com> <20210826151911.15699-1-iryzhov@nfware.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 3/3] app/test: fix return value of test_kni_link_change 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" If the child process returns -1, WEXITSTATUS converts to 255 because it takes only 8 least significant bits. As a result, the test is not considered failed when it should. Signed-off-by: Igor Ryzhov --- app/test/test_kni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_kni.c b/app/test/test_kni.c index 0df028696f36..70c81f4af0f4 100644 --- a/app/test/test_kni.c +++ b/app/test/test_kni.c @@ -214,7 +214,7 @@ test_kni_link_change(void) p_ret = waitpid(pid, &status, WNOHANG); if (p_ret != 0) { if (WIFEXITED(status)) - return WEXITSTATUS(status); + return WEXITSTATUS(status) ? -1 : 0; return -1; } rte_delay_ms(10); -- 2.33.0