Message ID | 20220505171146.557773-4-sean.anderson@seco.com |
---|---|
State | Accepted |
Commit | df33fd28897b044166b7aae7e5dd5860c6f79af4 |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=seco.com header.i=@seco.com header.a=rsa-sha256 header.s=selector1 header.b=BLEn+qof; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KvKyX2p6dz9sCq for <incoming@patchwork.ozlabs.org>; Fri, 6 May 2022 03:12:52 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 40BD784057; Thu, 5 May 2022 19:12:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=seco.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=seco.com header.i=@seco.com header.b="BLEn+qof"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5635383F99; Thu, 5 May 2022 19:12:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20609.outbound.protection.outlook.com [IPv6:2a01:111:f400:7d00::609]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CAD1F83FEC for <u-boot@lists.denx.de>; Thu, 5 May 2022 19:12:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=seco.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sean.anderson@seco.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nAciVtQXdweD/a5yJi0w00OAdJm/gfhb4oEBAipsWohOx4EXuby3K2+PQIPFgGLqXf186SoEs1pyEJXSKCMwdEir2E8ZZifMwHGn2XEX8vvb4EEhvPE5m8fKUhTP7TjeHGjOFYYAdwrjnzbYWauDySy2KM1uptJ2WHI4KuR4dhpdaq/tY1RoJlG9mzzH9FsDLxAyGpHtQsKE4Yr1k+VWyzR6eMs82ZkZV5cQFceE9DYHGFA5AWQnFoEiLKbFQtTD5GSJ395ZAp+G4bWx+5G+UQ9rwHaXbRjUZsUENKtIwV8ycQkNLEntixIiwD9xzB2AgD5etgzpf/rQ6aVR/K8pUw== 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=xwZWPfrLbVn8+NrU+QQw21TZVhUeYlkN8RNnWvWRwmc=; b=bSixazsqQbrG3n+3YLSKTWcOLDkKS8ST0hB5dgNPxdcBCwNyh2s5srlav07Me8b/cFsQHOx3MwSPh6Y0ewSkJqHf+jJdZ6xoPMW+9vGYw+LX/zZIUE3Anof2cox0LUJtTLq2E66tp/zqBjRJIaNad33z+ANhkY4ZdybUumjagcgKJNQmLxBTklqY/zcXm24L8kexa2m+xvzyga26rrk5vImFDqCjUeruEw/s3Z6XmPQCqyjX4gQrct2upDOnTex+HBPR8++7lcwLC26PxXRcChbz9Sk/1Vj2YTRbZhoVc182o+n4kLWv7C6+5X2mLo5/sE8qLWWZKSRg/veAstDeoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xwZWPfrLbVn8+NrU+QQw21TZVhUeYlkN8RNnWvWRwmc=; b=BLEn+qofwa4tAalP2Y67IOWL9J4+UTiPStQZx4qmu88rzNITBaVsyvOJvKyWhbs/9ihKpzMsguAuE50+vfP1GyDbFqLlArxVKmr9TZcIkC7LDguc6d6Y+qq2aN0qnKfBO1Ay4Hmd7Kr+PCe1/TDVoIAz9Im/fTDJCFVFqRp8MDWAeusEoNSlATrshxqIWNcNcXCI1VLytmSr6tf8he2RxDdbUvdIx9uZ2k1w8yUin9h88wD3LyC5kqM5xNKjeKdATl0VRbAmxH1FZT0MLRcyUjPy2rAlJvM62sLdhS8uKrBmL19WUxlTzD44ZFmBtqE97eswy/JeVXQa9kq8Qe7Rqw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from VI1PR03MB4973.eurprd03.prod.outlook.com (2603:10a6:803:c5::12) by VI1PR03MB4397.eurprd03.prod.outlook.com (2603:10a6:803:51::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.27; Thu, 5 May 2022 17:12:12 +0000 Received: from VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::dc24:d72c:4fe6:847e]) by VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::dc24:d72c:4fe6:847e%7]) with mapi id 15.20.5206.027; Thu, 5 May 2022 17:12:12 +0000 From: Sean Anderson <sean.anderson@seco.com> To: u-boot@lists.denx.de, Simon Glass <sjg@chromium.org> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>, Mario Six <mario.six@gdsys.cc>, Ramon Fried <rfried.dev@gmail.com>, Tom Rini <trini@konsulko.com>, Joe Hershberger <joe.hershberger@ni.com>, Sean Anderson <sean.anderson@seco.com> Subject: [PATCH v4 03/16] test: eth: Add test for ethernet addresses Date: Thu, 5 May 2022 13:11:32 -0400 Message-Id: <20220505171146.557773-4-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220505171146.557773-1-sean.anderson@seco.com> References: <20220505171146.557773-1-sean.anderson@seco.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MN2PR05CA0044.namprd05.prod.outlook.com (2603:10b6:208:236::13) To VI1PR03MB4973.eurprd03.prod.outlook.com (2603:10a6:803:c5::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 31ee56f3-7228-40bc-7f55-08da2eba64ea X-MS-TrafficTypeDiagnostic: VI1PR03MB4397:EE_ X-Microsoft-Antispam-PRVS: <VI1PR03MB4397244E5D7A1097277499F196C29@VI1PR03MB4397.eurprd03.prod.outlook.com> X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PznS7LxKXIZJDRMf+OhKVelSbayWMKa10VK+cqVGJVPOO69ZqaXT6GbWajyifrr7ztxZR4Q/NOEMOTcPoSghjga1eEf8SQxsxM96V3fslglPb5qJUj9H2wzpk5gOftEYUZ6jnwmLJ4xutrJ0N4+dhDkk4vFr/NCIqjdhwTFtF8evdDzdnDtkX0XbCymnbHKDxISWlo1Q0/BZiUHy+HvPzUP/V4+Ycy5B4Pu/CoVG54Lr6oQymy8VjzARPaVnXzGkanJVDzOIhm9av95kAJPHTJeEogVWJ4+9nxDA8BOs4XLzWM3pgIFKNzoA27t7woSoiU7/8lLoOhAOGart3wBSBc2AznXY5McQ5QRxiV41ou1F4oPZdgMC0vVqNeMYrho5zyloOPWCCoI0ZWYJGeLWUDRbHwt1zLhhPxpJrkROf3imjJHr+G1wImR+8bBdLV9a0iiveEEj1kTxmkGSQxGtvWkyvismZ7CxuDpOI9UGgIpLNtSsxhZn8h/70cSY5WI5wSstsV7hBZnzQAhv+JWUaW2D5lP0F3J76LZJOJ4d/Gx39G7Iev1OW7KcJcBlnDQJ7H8WXhrNF7WvK83bFyJ+dCMsXX9xk7vAsLcu+36M1PLmEx5xt/aVBosoU/9CoOx6DcTdF22caKZ+vJEUA9CUvHYdm/rBeRmlW1/vOZPzZT9IxTIi7hey3TIfjkFGhQrfUpGA8HFJtqX/DGGyiyrk8Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR03MB4973.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(8936002)(4326008)(66476007)(86362001)(66946007)(66556008)(8676002)(44832011)(2906002)(5660300002)(38350700002)(38100700002)(52116002)(54906003)(6916009)(508600001)(316002)(186003)(26005)(2616005)(6506007)(6512007)(6666004)(6486002)(1076003)(107886003)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lSQE//pV4OVB23CADMKVEEycrgLDq+0ecak6w9XdC1QaUBI3z7AJoD4MGEiaZ77jhE3dNergmK4kcY2G+3DFGMaQEAUvEWvp7fGB9VaTKKjBj14xNfuJ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uhgxO7KmdepBCQd1Bu+kAYiJYgFGEIkm5Fhq/GNsy98Sr/z1d+ztH1nz4d2gp+lzHzTLPWIXRXOIzstKbzWOu0/GNiZU3mZUgNv8kM0q7mLu25AspJ7aj2T7rRiYdnn8dHWvIU6G5lDuLQZBvulmQ2u3AL8OZOhUJjR83445ScafWsQlFAXXn9esimPvqIOLp87cJQt6VrslFSzGTM3ioZ8F9ybI0wtON19VeDmm0eC7rMmMX3//XTn+mNCNR6Fk/izhV085YegOiaUb0vhkyUi5x4L/DxMDYqZj5TvTxXrBTBE2FANPUC3jomxClMr5KAP2CRxs5efFFbewik1Uiy4ZSONatbzHU1+/VSQqJSiUKYiqY7cXQ7+sUt543QfWfDC0BcikAu4DMS486Xkgcm0yVlPckyVR+LmaPSNfRJB8gWNXpf1A0X1ZKnuVB/v/pkc0gDm95cXLtNovV7kTvaV0pf1ZUyvXX/k37UDzxCyaxgslSsyN/OVzJkmsvBnS8lEvVsA7DmO8xJ0tRbnBmXG+XBUQVGwVv2RJQRZNjnJgEglPAne4I96FZPEFzXJxg= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31ee56f3-7228-40bc-7f55-08da2eba64ea X-MS-Exchange-CrossTenant-AuthSource: VI1PR03MB4973.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2022 17:12:11.9637 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BcDxv/xj8ogXntTAyrHtWWTwcaVIvs2vFcOlPM3CWdJn5/pwrBoyWyDU9IQQkdlRILxp4O9VaFGHjbOdPsb6eA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR03MB4397 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean |
Series |
Add support for NVMEM API
|
expand
|
diff --git a/test/dm/eth.c b/test/dm/eth.c index e4ee695610..5437f9ea4a 100644 --- a/test/dm/eth.c +++ b/test/dm/eth.c @@ -147,6 +147,35 @@ static int dm_test_eth_act(struct unit_test_state *uts) } DM_TEST(dm_test_eth_act, UT_TESTF_SCAN_FDT); +/* Ensure that all addresses are loaded properly */ +static int dm_test_ethaddr(struct unit_test_state *uts) +{ + static const char *const addr[] = { + "02:00:11:22:33:44", + "02:00:11:22:33:48", /* dsa slave */ + "02:00:11:22:33:45", + "02:00:11:22:33:48", /* dsa master */ + "02:00:11:22:33:46", + "02:00:11:22:33:47", + "02:00:11:22:33:48", /* dsa slave */ + "02:00:11:22:33:49", + }; + int i; + + for (i = 0; i < ARRAY_SIZE(addr); i++) { + char addrname[10]; + + if (i) + snprintf(addrname, sizeof(addrname), "eth%daddr", i + 1); + else + strcpy(addrname, "ethaddr"); + ut_asserteq_str(addr[i], env_get(addrname)); + } + + return 0; +} +DM_TEST(dm_test_ethaddr, UT_TESTF_SCAN_FDT); + /* The asserts include a return on fail; cleanup in the caller */ static int _dm_test_eth_rotate1(struct unit_test_state *uts) {