From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.77]) by mx.groups.io with SMTP id smtpd.web10.27858.1669849347163195264 for ; Wed, 30 Nov 2022 15:02:27 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nvidia.com header.s=selector2 header.b=bZl19jOz; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.93.77, mailfrom: jeshuas@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JhIqkXNCunX9lJYe5UVc6NrFdRZD3LZ/4l/8AFqwYqHpcaWdj7wWeH56k/KKWbU8OUK2WFmYYHmv4T+aGmy2dKxpW/41aclKcQlWt+itfJ+VYeYP0UQrE3lrhi1Uv6Q/SqyoDVz/UEOw2dBshWRCarxmJX0NDFOtIEqjA7R2zkNDAGQ23iUQ5YswUItG9GYwr0+xM+FNZt1YI1j4zmbalMVwOVy2qvw6H+oNR5PxICHeaIOBe7r+qoHdFPd1ifdt+pLBxV6YSv0d0a+1M36yV8CyZ8NJ1mLavLSv4m1liv8olV4KXg2Q66gMr6zMXi71aZ5+CW3eM1lNXeJbKLHRqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vwjHY8VSWXouKtGsfvGZ2XB1AO8EA0ck2gbYglKuNeY=; b=AcK39i92CN3y0Ktx+vr3hXbDaDCAi1SPuBYa5NZEpFt1fxQ3MXJsZwvu6OGHSrWCefAXr1yO8H0o0FhH3B12Ds6Urj3L61o4AMFN7Rk7XuRHE45dHt5ORcCWkbIHwQvTcUsnAvrXXk86ICvKmtDRjJT/OsJm9CsC6vkBGzaB+BqGsiphcfhh2ll+5aIFnfpmHTP95xVcgFI6e50bowVfo5DbUQMY0VObtccK1/3LmWaCjEVc0zunns5Xw+3WvCx4S/THJDla9jdQYOrsTzR02FvJ9n1/+e6Y8qRHBB98mQtdj2WunoYmUeuiPv5fL01D9blUwnaqhTni2hAr8e/uXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vwjHY8VSWXouKtGsfvGZ2XB1AO8EA0ck2gbYglKuNeY=; b=bZl19jOzl6L0XbVZrjHmWLtAzqN/E/PQCR5XvxD2rHTbvnQdpSQ297XTGJKHAZ4isyAcFKC6/i+0NIpBr6CpC4fJC60hiSnyLHPNSOtBM3vXgQzqutSnL2DhNKLENU8mPWsc0Ac41KGHzvhr3AwcnvbDX9J37X4FJvZBaicnys+4LOUf6Jeo6wgvIIQ4rtBAkuO6j9OyO4CvoYspzkUW7ZrU7pn4B7N1Tx9kS4X5qkGhlJ2tv7vlnDNOAIeWyvq2xJpLN18ypGACaaCcCM1Q2ekHE/NYxuFZMST9NlflS/RJdxNqkYo/Y4T2FiGMoiaQ6MCn+u3CgtGGxvI0YSoTlw== Received: from DS7PR03CA0286.namprd03.prod.outlook.com (2603:10b6:5:3ad::21) by SJ0PR12MB5661.namprd12.prod.outlook.com (2603:10b6:a03:422::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Wed, 30 Nov 2022 23:02:25 +0000 Received: from DM6NAM11FT065.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3ad:cafe::89) by DS7PR03CA0286.outlook.office365.com (2603:10b6:5:3ad::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23 via Frontend Transport; Wed, 30 Nov 2022 23:02:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by DM6NAM11FT065.mail.protection.outlook.com (10.13.172.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.17 via Frontend Transport; Wed, 30 Nov 2022 23:02:24 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 30 Nov 2022 15:02:17 -0800 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 30 Nov 2022 15:02:17 -0800 Received: from build-jeshuas-20220912T090427831.internal (10.127.8.9) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Wed, 30 Nov 2022 15:02:17 -0800 From: "Jeshua Smith" To: CC: , , , Jeshua Smith Subject: [PATCH v3] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail Date: Wed, 30 Nov 2022 23:02:15 +0000 Message-ID: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-NVConfidentiality: public Return-Path: jeshuas@nvidia.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT065:EE_|SJ0PR12MB5661:EE_ X-MS-Office365-Filtering-Correlation-Id: 62ce947b-815c-4c13-1993-08dad326f20b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i7N8pGYST1vu7fZfz48NuCyOyqMjTjMk8Ye2dWpZQv5FFrgJHwSJGIAitUUgu9R/fw4R68WuxSJpU9LK1D5desqYRvAbKReTXVuyc1HBEcuji7FAUxhYc0sEaWRyz7TX0ajKQ3CD9+98atysN1Pgv66zg7WBDeoclxd9da4clpgm1E+liV2eBc0ma6JiG4f0nh9Niod1ggELDhuoRcVgnMIFnUSvViQDT9FUZugafr9db5gmMEiKuWVs5/gSg4htG4xEiBCbV/JA806iDXqFuXdxwSXsBIg5ZZxAwn9nWXHFWyBkRrH2fvUJHfb0BUG/9yIVQE6/fumHaAK2cOV6mP0XpccZC5+3PCtVutNp3PYXaQcXF/NS/SWnRVCjPVwJfsqV+VhkrkHfIROni3wH56L2JTpJyNA9UUI2dZmXGfGdWJeXkQAgoeXhbfuda/WQEw/nJXz8Hf/53b4e0onmF40ySnahEHMxiGrWbu2Gp/VG+JNGtbC8VBPhsd08sqOvK8hLLrk6Obx7xuM8FOGln4XxXBeMSK/x96XfSVAQspiPjh3rCJOPYSZpZcpAOYQxxIvMyK+2/avMjvf4QsE+qbvVDJpYEQ7PpyuB3UggcMTSMAtB98bmtW1ywCr1E7YnUC20uzz7CK+KQLBjEdu5SMJ2RYZs+Q1AgBUE61rnuNng//+dq+zdc9XLlNSZfNRmWcvCFQ4z+KtC88+4amx9og== X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(376002)(396003)(39860400002)(136003)(346002)(451199015)(40470700004)(36840700001)(46966006)(40480700001)(86362001)(426003)(7636003)(82740400003)(36756003)(6916009)(40460700003)(356005)(54906003)(316002)(70586007)(41300700001)(478600001)(5660300002)(2906002)(4326008)(8936002)(4744005)(70206006)(8676002)(83380400001)(82310400005)(26005)(36860700001)(107886003)(336012)(186003)(2616005)(47076005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2022 23:02:24.7972 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62ce947b-815c-4c13-1993-08dad326f20b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT065.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5661 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Update the UnitTestAssertStatusEqual error message to print out the expected value in addition to the seen value. Signed-off-by: Jeshua Smith --- UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c b/Unit= TestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c index dc05bbd438..0d8e36c938 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c @@ -290,7 +290,7 @@ UnitTestAssertStatusEqual ( { CHAR8 TempStr[MAX_STRING_SIZE]; =20 - snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p)", De= scription, (VOID *)Status); + snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p expec= ted:%p)", Description, (VOID *)Status, (VOID *)Expected); _assert_true ((Status =3D=3D Expected), TempStr, FileName, (INT32)LineNu= mber); =20 return (Status =3D=3D Expected); --=20 2.25.1