Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1444210/?format=api
{ "id": 1444210, "url": "http://patchwork.ozlabs.org/api/patches/1444210/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1614244979-48216-15-git-send-email-bmeng.cn@gmail.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1614244979-48216-15-git-send-email-bmeng.cn@gmail.com>", "list_archive_url": null, "date": "2021-02-25T09:22:35", "name": "[v3,14/38] test: cmd: Add a basic test for 'addrmap' command", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "5a4312e9650224adf75a37e6b25cd5c3351b29c0", "submitter": { "id": 64981, "url": "http://patchwork.ozlabs.org/api/people/64981/?format=api", "name": "Bin Meng", "email": "bmeng.cn@gmail.com" }, "delegate": { "id": 87636, "url": "http://patchwork.ozlabs.org/api/users/87636/?format=api", "username": "priyankajain", "first_name": "Priyanka", "last_name": "Jain", "email": "priyanka.jain@nxp.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1614244979-48216-15-git-send-email-bmeng.cn@gmail.com/mbox/", "series": [ { "id": 230985, "url": "http://patchwork.ozlabs.org/api/series/230985/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=230985", "date": "2021-02-25T09:22:22", "name": "ppc: qemu: Convert qemu-ppce500 to driver model and enable additional driver support", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/230985/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1444210/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1444210/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20161025 header.b=JlAOMUDt;\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.b=\"JlAOMUDt\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=bmeng.cn@gmail.com" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4DmS8z0VKSz9s1l\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 25 Feb 2021 20:26:42 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id B37AC812A5;\n\tThu, 25 Feb 2021 10:26:34 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 1181C81C73; Thu, 25 Feb 2021 10:24:38 +0100 (CET)", "from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com\n [IPv6:2a00:1450:4864:20::62c])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id CB678819F3\n for <u-boot@lists.denx.de>; Thu, 25 Feb 2021 10:24:26 +0100 (CET)", "by mail-ej1-x62c.google.com with SMTP id do6so7658775ejc.3\n for <u-boot@lists.denx.de>; Thu, 25 Feb 2021 01:24:26 -0800 (PST)", "from pek-vx-bsp2.wrs.com\n (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180])\n by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.22\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Thu, 25 Feb 2021 01:24:26 -0800 (PST)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham\n autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=from:to:cc:subject:date:message-id:in-reply-to:references;\n bh=PPHRD30o34Yo8pz1AgnjyvjHg/M0lVACwzCxyl+/srY=;\n b=JlAOMUDtFLMSrVhgOu77e10FTP0HBkXr7nx4HJUn7YSDjrIYFl2t5++UZj8AES7JZR\n yKMNEqn3qS7e0A8WHV6XytxoKzP6JPRvmf/nY5OdL9vzCriAE4DeffVKC611zHEVSj+8\n ohSOA7UEVyZ+kUJy0Wz1FxtpFCcnHrvaaUbQDeMBXFfkMzBvQB1h71tvOR7s8PHnFeI/\n 4ytsK/Kixkb0h3Y6uyvm9w3U3vvkS98EFyMxCrHWCf8Lfu9npaSWqRIq70eso7nVtfUZ\n gqaCEu1u5clcS+5krv+YdgvuRNXUBpedUfKly3aIasLO5E5dTM/eJgALkFP7POSSObW5\n XMnQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references;\n bh=PPHRD30o34Yo8pz1AgnjyvjHg/M0lVACwzCxyl+/srY=;\n b=gMfpzBtUVa8mOcroWCCepyggb2dIt3q4Nc7uevily0Mrr61ZgmM78Zl9S4cK49p6tl\n 2aTPBYm+xWtWMOXB7fIP8pmN69DmavQgFkheD8nQuaLGp3uE7rU1wAdAwiZ3JRsUqNLk\n /ga+aHzbuMlgGG2cTqPI27ob9bHOoyIq9ZWsQsHP/fF3mF4TS/YJLTbNjNNO0oX44Sv7\n v4Ijw3uQ7uOz+Y94LASdbEZefOjA0weCmiAC21bXkqwkFgMgF29Zf03pq9NUJk3sSyg1\n L1QSLEHC7TRtCzz0M+nH1GcVO9DI1yslaOUSz+WWojQ8D85aUUQ3RuQzpc/I0LE1seci\n c/UQ==", "X-Gm-Message-State": "AOAM530Wtvr4nyO5PyLdczn0wrjoG/8m51HtHUm/mbB3hNPQvO9QwdKH\n 8apwUpYgtL4CA5vWz2XygwM=", "X-Google-Smtp-Source": "\n ABdhPJyXH813Nh8yzlrmRCoMk3XPSshoZk018o+INz/UQyfIHm320pMB/3q3aUgppdVlNBfh0pxgXg==", "X-Received": "by 2002:a17:906:38b:: with SMTP id\n b11mr1740018eja.78.1614245066539;\n Thu, 25 Feb 2021 01:24:26 -0800 (PST)", "From": "Bin Meng <bmeng.cn@gmail.com>", "To": "Simon Glass <sjg@chromium.org>, Alexander Graf <agraf@csgraf.de>,\n Priyanka Jain <priyanka.jain@nxp.com>", "Cc": "U-Boot Mailing List <u-boot@lists.denx.de>, Tom Rini <trini@konsulko.com>", "Subject": "[PATCH v3 14/38] test: cmd: Add a basic test for 'addrmap' command", "Date": "Thu, 25 Feb 2021 17:22:35 +0800", "Message-Id": "<1614244979-48216-15-git-send-email-bmeng.cn@gmail.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1614244979-48216-1-git-send-email-bmeng.cn@gmail.com>", "References": "<1614244979-48216-1-git-send-email-bmeng.cn@gmail.com>", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.34", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <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>,\n <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.102.4 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "This adds a basic test for the newly introduced 'addrmap' command.\n\nSigned-off-by: Bin Meng <bmeng.cn@gmail.com>\nReviewed-by: Simon Glass <sjg@chromium.org>\n\n---\n\n(no changes since v2)\n\nChanges in v2:\n- new patch: test: cmd: Add a basic test for 'addrmap' command\n\n include/test/suites.h | 2 ++\n test/cmd/Makefile | 1 +\n test/cmd/addrmap.c | 38 ++++++++++++++++++++++++++++++++++++++\n test/cmd_ut.c | 6 ++++++\n 4 files changed, 47 insertions(+)\n create mode 100644 test/cmd/addrmap.c", "diff": "diff --git a/include/test/suites.h b/include/test/suites.h\nindex 52e8fc8..f5d8e13 100644\n--- a/include/test/suites.h\n+++ b/include/test/suites.h\n@@ -26,6 +26,8 @@ int cmd_ut_category(const char *name, const char *prefix,\n \t\t struct unit_test *tests, int n_ents,\n \t\t int argc, char *const argv[]);\n \n+int do_ut_addrmap(struct cmd_tbl *cmdtp, int flag, int argc,\n+\t\t char *const argv[]);\n int do_ut_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);\n int do_ut_bloblist(struct cmd_tbl *cmdtp, int flag, int argc,\n \t\t char *const argv[]);\ndiff --git a/test/cmd/Makefile b/test/cmd/Makefile\nindex 5451e9e..8699976 100644\n--- a/test/cmd/Makefile\n+++ b/test/cmd/Makefile\n@@ -6,6 +6,7 @@ ifdef CONFIG_HUSH_PARSER\n obj-$(CONFIG_CONSOLE_RECORD) += test_echo.o\n endif\n obj-y += mem.o\n+obj-$(CONFIG_CMD_ADDRMAP) += addrmap.o\n obj-$(CONFIG_CMD_MEM_SEARCH) += mem_search.o\n obj-$(CONFIG_CMD_PWM) += pwm.o\n obj-y += setexpr.o\ndiff --git a/test/cmd/addrmap.c b/test/cmd/addrmap.c\nnew file mode 100644\nindex 0000000..fb74448\n--- /dev/null\n+++ b/test/cmd/addrmap.c\n@@ -0,0 +1,38 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/*\n+ * Tests for addrmap command\n+ *\n+ * Copyright (C) 2021, Bin Meng <bmeng.cn@gmail.com>\n+ */\n+\n+#include <common.h>\n+#include <console.h>\n+#include <test/suites.h>\n+#include <test/ut.h>\n+\n+/* Declare a new addrmap test */\n+#define ADDRMAP_TEST(_name, _flags)\tUNIT_TEST(_name, _flags, addrmap_test)\n+\n+/* Test 'addrmap' command output */\n+static int addrmap_test_basic(struct unit_test_state *uts)\n+{\n+\tut_assertok(console_record_reset_enable());\n+\tut_assertok(run_command(\"addrmap\", 0));\n+\tut_assert_nextline(\" vaddr paddr size\");\n+\tut_assert_nextline(\"================ ================ ================\");\n+\t/* There should be at least one entry */\n+\tut_assertok(!ut_check_console_end(uts));\n+\n+\treturn 0;\n+}\n+ADDRMAP_TEST(addrmap_test_basic, UT_TESTF_CONSOLE_REC);\n+\n+int do_ut_addrmap(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])\n+{\n+\tstruct unit_test *tests = ll_entry_start(struct unit_test,\n+\t\t\t\t\t\t addrmap_test);\n+\tconst int n_ents = ll_entry_count(struct unit_test, addrmap_test);\n+\n+\treturn cmd_ut_category(\"cmd_addrmap\", \"cmd_addrmap_\", tests, n_ents,\n+\t\t\t argc, argv);\n+}\ndiff --git a/test/cmd_ut.c b/test/cmd_ut.c\nindex 90674d5..8404309 100644\n--- a/test/cmd_ut.c\n+++ b/test/cmd_ut.c\n@@ -91,6 +91,9 @@ static struct cmd_tbl cmd_ut_sub[] = {\n \tU_BOOT_CMD_MKENT(bootm, CONFIG_SYS_MAXARGS, 1, do_ut_bootm, \"\", \"\"),\n #endif\n \tU_BOOT_CMD_MKENT(str, CONFIG_SYS_MAXARGS, 1, do_ut_str, \"\", \"\"),\n+#ifdef CONFIG_CMD_ADDRMAP\n+\tU_BOOT_CMD_MKENT(addrmap, CONFIG_SYS_MAXARGS, 1, do_ut_addrmap, \"\", \"\"),\n+#endif\n };\n \n static int do_ut_all(struct cmd_tbl *cmdtp, int flag, int argc,\n@@ -166,6 +169,9 @@ static char ut_help_text[] =\n \t!defined(CONFIG_SPL_BUILD) && !defined(API_BUILD)\n \t\"ut unicode [test-name] - test Unicode functions\\n\"\n #endif\n+#ifdef CONFIG_CMD_ADDRMAP\n+\t\"ut addrmap - Very basic test of addrmap command\\n\"\n+#endif\n \t;\n #endif /* CONFIG_SYS_LONGHELP */\n \n", "prefixes": [ "v3", "14/38" ] }