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 C35DD45CFB; Thu, 14 Nov 2024 01:14:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96A2D41143; Thu, 14 Nov 2024 01:14:19 +0100 (CET) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id 282324067C for ; Thu, 14 Nov 2024 01:14:17 +0100 (CET) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-71e8235f0b6so6396513b3a.3 for ; Wed, 13 Nov 2024 16:14:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731543256; x=1732148056; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5J0AEPySDYKvwiuIGkMnL2AQd0ED4CI0LHWtrePkeSc=; b=ieQMerh1cXHNSV6yyLsOwMiMK3IopzFwwGXv3pBNvvJI14rXmEsEZ+kzctnh+WpLNH nIm8hZ4Qf4fuKtcylhAx6iFx/7HenofuO6O2K0RQgybHTM4avPH5pCIkbAAyxuq8slVc c+Lu3SGEpFcdI08H5IWUpEtJyed+KdBcz+6tQW/M9c4UbYq0LXgi88RKyw4LM5ps1Pcb iP8kjHJhB5Fh4DRwokc4teSeZfRsKHRAj2y90N7y7APX0TTfYElospEK4DUwRTMKNa4V mxObSHVCZxHNfM/BP0EzhcFynyKJSMukrPX2yx7pqUnohpbkKXhzwWhSZe/ZmHC2bHOG KSrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731543256; x=1732148056; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5J0AEPySDYKvwiuIGkMnL2AQd0ED4CI0LHWtrePkeSc=; b=aUNGvSoH3St2B9/2hfdHC+QaZp/blvc/LRhjk53Pq5todTzEMJbG7hU8/6vdd1p1ya 7J5uGzt/p8Se8lu87IUbtErq1Gs7NahQzgb0zBNahlURF/0Tes7XA3AcORsRc8hA2V1r Z+uqe3Gd+qBYZS4rE+rbn7QKfBr7EigYlm07Q8NT8rkSwZPEbVW94UY1PvAlHMRp3w62 uhSIDPQr4y9QDseMRko0vVMbm3jwGnCRQQW8fYTaZBX8FBaSMqu6rhAof6nBCSqGn2kx Y4i8DdDEGg3FyfoFXMm9o0vN+jIsuh8lVqSoSK06bjB7HBELKEDUZ5FzEK6RafQvv32Q vj5g== X-Gm-Message-State: AOJu0YyyfBaxgGtmPjwO6UIS1oRy4NL6poh0keprhujnKvZGPqQLZbm5 QMLTAyenzGBUnB9FYc2JBH8YWbG5Q+v6v7fryBoboC8LpNqGBqrT2bhEnPnPMDU4/DmowYQZulh T X-Google-Smtp-Source: AGHT+IECjo5AA9KN3nszRCnYRa/Itv6NLSu84T+ys5tqnpf+8Jne4pDBvmzqEBPSPQRfKWWR9wxe4A== X-Received: by 2002:a05:6a00:14c3:b0:71e:77e7:d60 with SMTP id d2e1a72fcca58-72457a77da9mr6595008b3a.23.1731543256365; Wed, 13 Nov 2024 16:14:16 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7246a9a81a9sm9280b3a.99.2024.11.13.16.14.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2024 16:14:15 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , declan.doherty@intel.com, Chas Williams , "Min Hu (Connor)" , Pablo de Lara Subject: [RFC 02/10] app/test: fix typo in mac address compare Date: Wed, 13 Nov 2024 16:12:14 -0800 Message-ID: <20241114001403.147609-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114001403.147609-1-stephen@networkplumber.org> References: <20241114001403.147609-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The first argument of 'memcmp' function was equal to the second argument. Therefore ASSERT would always be true. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: 92073ef961ee ("bond: unit tests") Cc: declan.doherty@intel.com Signed-off-by: Stephen Hemminger --- app/test/test_link_bonding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index 805613d7dd..b752a5ecbf 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -792,7 +792,7 @@ test_set_primary_member(void) &read_mac_addr), "Failed to get mac address (port %d)", test_params->bonding_port_id); - TEST_ASSERT_SUCCESS(memcmp(&read_mac_addr, &read_mac_addr, + TEST_ASSERT_SUCCESS(memcmp(expected_mac_addr, &read_mac_addr, sizeof(read_mac_addr)), "bonding port mac address not set to that of primary port\n"); -- 2.45.2