From patchwork Fri Apr 14 13:55:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "O'Donovan, Saoirse" X-Patchwork-Id: 126098 X-Patchwork-Delegate: gakhil@marvell.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 3C61542941; Fri, 14 Apr 2023 15:56:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1CEF540144; Fri, 14 Apr 2023 15:56:08 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 82EB1400D5; Fri, 14 Apr 2023 15:56:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681480565; x=1713016565; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5rMCi1AYhauLbzwXIkPUhUZliD8n+k3WGuuYqyD53zk=; b=lWGvelosBFLsONQNdt6rvF32LXAVChRGoYniS0n1YMGOdhqGaPr3/6ic PTkH2FbDyYOM/e2t3QHxihQYJzYDmwjLsjjz742KLvxfPrL5AhWUSakRK Ksozwx8Lg9nBGTbKScl2qApBMqN3F3/tLxiKDIo1zQbOAqMjEajRJ+KGg uLD3eemWaaG+Bmv2iBx9tkDGeyI3OSwPHBLL5vHtUmStcftnT25viF14X oHgbxQkIz72Uc9fXcSPXIQBAtuz+Y51GngdH9sxpo8FUzZCvnlWTOeVz/ gzxckqNs5Eg31yrkAwsBrdxPaWeto731HbACTkUluY6uTVLAlzxXwXLkz A==; X-IronPort-AV: E=McAfee;i="6600,9927,10680"; a="407341539" X-IronPort-AV: E=Sophos;i="5.99,195,1677571200"; d="scan'208";a="407341539" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2023 06:56:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10680"; a="864227719" X-IronPort-AV: E=Sophos;i="5.99,195,1677571200"; d="scan'208";a="864227719" Received: from unknown (HELO silpixa00400902.ir.intel.com) ([10.243.23.123]) by orsmga005.jf.intel.com with ESMTP; 14 Apr 2023 06:56:02 -0700 From: Saoirse O'Donovan To: Akhil Goyal , Fan Zhang Cc: dev@dpdk.org, Saoirse O'Donovan , kai.ji@intel.com, stable@dpdk.org Subject: [PATCH] test/crypto: fix return value for snow3g testcase Date: Fri, 14 Apr 2023 13:55:26 +0000 Message-Id: <20230414135526.4271-1-saoirse.odonovan@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 Unit tests were failing due to the return value of the decryption and authentication functions not being handled correctly. This has now been modified to return the expected test status. Fixes: e23eccfd281e ("test/crypto: fix bitwise operator in a SNOW3G case") Cc: kai.ji@intel.com Cc: stable@dpdk.org Signed-off-by: Saoirse O'Donovan Acked-by: Ciara Power --- app/test/test_cryptodev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 9c670e9a35..0713187d14 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -6944,6 +6944,7 @@ snow3g_hash_test_vector_setup(const struct snow3g_test_data *pattern, static int test_snow3g_decryption_with_digest_test_case_1(void) { + int ret; struct snow3g_hash_test_data snow3g_hash_data; struct rte_cryptodev_info dev_info; struct crypto_testsuite_params *ts_params = &testsuite_params; @@ -6962,8 +6963,9 @@ test_snow3g_decryption_with_digest_test_case_1(void) */ snow3g_hash_test_vector_setup(&snow3g_test_case_7, &snow3g_hash_data); - if (test_snow3g_decryption(&snow3g_test_case_7)) - return TEST_FAILED; + ret = test_snow3g_decryption(&snow3g_test_case_7); + if (ret != 0) + return ret; return test_snow3g_authentication_verify(&snow3g_hash_data); }