From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.66]) by mx.groups.io with SMTP id smtpd.web10.23857.1669840792894705153 for ; Wed, 30 Nov 2022 12:39:53 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nvidia.com header.s=selector2 header.b=NHHpsMQD; 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.95.66, mailfrom: jeshuas@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bOXnHlNkoqk1YLjCToFVClwEX2oGQpVK6YHLMxh0gQ4XFBhQmK4NkpLIC4/B/xlzAKLInYr/TyDoobzDIWqRo+mhHmEb+vwHpMqb2nQ0rz0TkxlXt5LeV2kouyrMg3yEhQEURVDWcfBuy4P2kZWn416DY8d2VMqv+U66WgoNZ9UeGK/c2NMVLA1WO13f7yGginVrUA0DDLbiQWkZRLB88oInJGigCBJ8KbwNBKn59Fe0oLU+BCdpbAYvuVcafRgOdw2jgTrBxp/tvqosUWi5xuLMGRZBV70mdovxcE2gAjTzr7vs+RKP1mtt8zlYsQEigQtAqjhGG3+EO+J7g+nKhQ== 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=rw23qnhWoUyup7QNXDJmSWKdXGL7ByQNz9g//Bdw0xA=; b=iC5XEb9iL8G9VDlI4D4//i5pT2SOEFGiD6tJE46YX3wV9GRiyO37yoxsghluDr+z/RafVsR5JMH9CC3AHSF4uabYKx1rXMBppNwKYHMGop/XMfRYOzIxn+/UE6JKi502USkHWDcN2tHFoJmUGzdhEi4drKE4ubx/bh1rYT3Nqt9B7L5lgpbqkCredGn0uBeKD4e9/JzQRuUJknbgZPtK9DO7zgB2ODep6eGwHQNT/6KyrVoY+GYzyPUmk0QegMgr0aJuHSeFKZPqLkZT9Hu0vKbsjMfLhXgGl59yM1kSCFYBsN1VYEb2NIhx/MqlsQcyKqqcX5WSaoRYRcm5v8BWdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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=rw23qnhWoUyup7QNXDJmSWKdXGL7ByQNz9g//Bdw0xA=; b=NHHpsMQD8Bh3fh4ZaWu2mPAHffnDe2+UrA3wFfs0D5Z4bCimh137SHil/z/yGamZOtnp4VyCUPt9EXRHkx69Z8fuHAXsSX5gmDhbe2BsVC6m/Fga6womEUYdCw3EZwwgwzZl3v9sryBR/1xkppwG3JblA4TJZWIy8WAfkR/vJCT7qg+n7Rvw5Plp+pTHnYrt4agQYq9p44A7YXAqNTtdOvSSHcNZIivUyoIP8pjr11CADAEaWFugAmardBH0uT9eQKxeAt2pFLXcYWS4nx8wrssNy+8Qc3Gf1UUBG+pnIOM9qFenI/Gm2288UmHq9VfljeBm3GwjHA+NJ6hYJ8hUfA== Received: from DS7PR03CA0150.namprd03.prod.outlook.com (2603:10b6:5:3b4::35) by SA0PR12MB4400.namprd12.prod.outlook.com (2603:10b6:806:95::13) 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 20:39:50 +0000 Received: from DM6NAM11FT012.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b4:cafe::2a) by DS7PR03CA0150.outlook.office365.com (2603:10b6:5:3b4::35) 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 20:39:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT012.mail.protection.outlook.com (10.13.173.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.22 via Frontend Transport; Wed, 30 Nov 2022 20:39:50 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) 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 12:39:42 -0800 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail201.nvidia.com (10.126.190.180) 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 12:39:42 -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 12:39:42 -0800 From: "Jeshua Smith" To: CC: , , , Jeshua Smith Subject: [PATCH] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail Date: Wed, 30 Nov 2022 20:39:18 +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: DM6NAM11FT012:EE_|SA0PR12MB4400:EE_ X-MS-Office365-Filtering-Correlation-Id: e3428a02-d7f9-4684-4495-08dad313072e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +J7C05NuXBpf2ofu2Ys6t7SGS1VQV0NItDiiimum++RzeTDs/QWSXNBHPnH2r83KKFhwfdUD2sAjCBdlGxzZ1CGhsaW4xUDexEdLRSlHAFDepbL/+WNk09n5gGgyOhgXF897nl+BiNFf2S/qhSTZ6In1E3qGbvZTTlECgu038HFfEZyc9O9uxli81lTMTRqe7W9JmA2F6+QljGg20ar0dp7j+dD3IOb46n0prC8dzXic8RHohZXJbW8Mk2RQ+Xaj8ajlkaXOpRnsynqpnblPySq5p4JD8B3Ax+phxpLOyUl0RoNYt+uVha6pnOLPBicfNbgRXc7D/Mj90zbw+Uywfyt9t7qQpt2KjwcVt/rvtxSQNz9O3Xgc22ziDwziTkfUF309d5d1r75uam1QmjqVvGL/JmzDPRPWe0y6kxUqTnpU5AaXYoyp8hGAqO6i88GVtSryHDnqJVDOBsvGqaBv1TvcM7C4M9vzZDtgEMH3ttHoMMwcRTZFbbm1oQuPm/nwIlgOpEGjYSMFiQ3RDyYugtbWM5N4RvwiDDMarN893WiN8EKirVPuVTho6xSBva7kj2reoAbhaZKCkHQBKslG9Vce5l3Y/9gI1PbbxbGLJF3pjAZYEtWEIYTwfZ6ebqfuldz0/Y/XoffpmM8Ht9ksru6K5s104+HcnfSMzYp3xYOMuapo9yUJNK9lm29Lq5kkVqL9QwUIFujeEacNlvfH2g== X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(346002)(376002)(396003)(136003)(451199015)(46966006)(36840700001)(40470700004)(70586007)(47076005)(4326008)(6666004)(70206006)(478600001)(6916009)(316002)(36756003)(40460700003)(8676002)(36860700001)(83380400001)(54906003)(7636003)(82310400005)(40480700001)(82740400003)(26005)(86362001)(107886003)(356005)(426003)(186003)(2616005)(336012)(8936002)(2906002)(4744005)(5660300002)(41300700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2022 20:39:50.3096 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e3428a02-d7f9-4684-4495-08dad313072e 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.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT012.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4400 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..322daf318a 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:0x%llx e= xpected:0x%llx)", Description, Status, Expected); _assert_true ((Status =3D=3D Expected), TempStr, FileName, (INT32)LineNu= mber); =20 return (Status =3D=3D Expected); --=20 2.25.1