Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/777580/?format=api
{ "id": 777580, "url": "http://patchwork.ozlabs.org/api/patches/777580/?format=api", "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/20170619060138.5314-3-oohall@gmail.com/", "project": { "id": 44, "url": "http://patchwork.ozlabs.org/api/projects/44/?format=api", "name": "skiboot firmware development", "link_name": "skiboot", "list_id": "skiboot.lists.ozlabs.org", "list_email": "skiboot@lists.ozlabs.org", "web_url": "http://github.com/open-power/skiboot", "scm_url": "http://github.com/open-power/skiboot", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170619060138.5314-3-oohall@gmail.com>", "list_archive_url": null, "date": "2017-06-19T06:01:35", "name": "[3/6] core/test: add more test stubs", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "c538d53e440a7a1ab80c6bcda015dbfe981fcfa8", "submitter": { "id": 68108, "url": "http://patchwork.ozlabs.org/api/people/68108/?format=api", "name": "Oliver O'Halloran", "email": "oohall@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/20170619060138.5314-3-oohall@gmail.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/777580/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/777580/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3wrgPd32hcz9s76\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 19 Jun 2017 16:03:01 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3wrgPd1mfbzDqgy\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 19 Jun 2017 16:03:01 +1000 (AEST)", "from mail-pf0-x241.google.com (mail-pf0-x241.google.com\n\t[IPv6:2607:f8b0:400e:c00::241])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3wrgPH17DXzDq7c\n\tfor <skiboot@lists.ozlabs.org>; Mon, 19 Jun 2017 16:02:43 +1000 (AEST)", "by mail-pf0-x241.google.com with SMTP id y7so15081122pfd.3\n\tfor <skiboot@lists.ozlabs.org>; Sun, 18 Jun 2017 23:02:43 -0700 (PDT)", "from flat-canetoad.ozlabs.ibm.com ([122.99.82.10])\n\tby smtp.gmail.com with ESMTPSA id\n\tx64sm19638626pff.123.2017.06.18.23.02.39\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 18 Jun 2017 23:02:40 -0700 (PDT)" ], "Authentication-Results": [ "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"dV9ieLeM\"; dkim-atps=neutral", "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"dV9ieLeM\"; dkim-atps=neutral", "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"dV9ieLeM\"; dkim-atps=neutral" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=GicmQ0i9BG8AiPGbssiUn42k0Mpi4QPYPAOoyYYfg7E=;\n\tb=dV9ieLeMB/03vpV/KecH/gwndSePjgCGTrAj6f8NgO7qMyc4KK1+7KfaiWtCb1JMn8\n\tw6NN1juELaS0zZ/gY8x6dH98+W8ufQS2Fl4lamLSGwzLiJxXbU8RWTe8aH7fLq5+iDEi\n\t4nI0jE/K+6mK3Vow2qLl9eycr7GOaxBafYlEBexy64OFqCYiIlO18fgWcy/XgU3IiKUj\n\tcEqWgBouX+HpvKot55IbuVh+HdNmDCv1mL1RuHFFlyazYHSKtvyxcsw1CPEs5yMmSdsx\n\t9RyPIzqJSAE5H+/3ykORQs7PBIJ5WBBY2k46i9Q1dsvJycPKT0q6ZkPfnxxtm5n0i8mQ\n\tuzIw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=GicmQ0i9BG8AiPGbssiUn42k0Mpi4QPYPAOoyYYfg7E=;\n\tb=T5O+vWcNOS4N9bfO6+6OZ39BqUkHz7h78dZFeiiiSkbez3QuiJM9jLV6euccIS3xrB\n\tCv1Q/XzDNGJU47kfV8Z0eaWykYYzjVkzdRecQwDEUJiOIWA/AMnIBK/20jBXv2bMhxzV\n\tExTvZ0Ph0dzQ14E1O54qOgu5qz6OJlyJRnJb1U0M2Mc+PMzSUn5WDX5cUaWKbo3pI4A8\n\t5h1Hv4NzQf6mtZic3C49RVqIZobcjXQ2U4moftvvLfCNjq6vG+tEyjucEDzZOgtTGRSD\n\tczzUG82mkiH/oCTOO5kymEaSaWw+aHJmwl0MPjuh5YYwmGE8riGwZnw/j4Gc6FJnqn/9\n\tVZMw==", "X-Gm-Message-State": "AKS2vOwvodsg9JnlTQJ6mqI8mI/j4JtUnXxREgAmF8f7vJNgQY5BKQT0\n\tSnK5AjXSV9riuAQy", "X-Received": "by 10.99.97.5 with SMTP id v5mr21042913pgb.77.1497852161177;\n\tSun, 18 Jun 2017 23:02:41 -0700 (PDT)", "From": "Oliver O'Halloran <oohall@gmail.com>", "To": "skiboot@lists.ozlabs.org", "Date": "Mon, 19 Jun 2017 16:01:35 +1000", "Message-Id": "<20170619060138.5314-3-oohall@gmail.com>", "X-Mailer": "git-send-email 2.9.3", "In-Reply-To": "<20170619060138.5314-1-oohall@gmail.com>", "References": "<20170619060138.5314-1-oohall@gmail.com>", "Subject": "[Skiboot] [PATCH 3/6] core/test: add more test stubs", "X-BeenThere": "skiboot@lists.ozlabs.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "Mailing list for skiboot development <skiboot.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/skiboot/>", "List-Post": "<mailto:skiboot@lists.ozlabs.org>", "List-Help": "<mailto:skiboot-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org", "Sender": "\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>" }, "content": "Adds a new kind of stub, the no-op stub which does nothing rather than\ncalling abort(). Also redefines them as weak symbols so that if the\nthing being tested changes to require a normally stubbed function we\ncan just add the actual function to the test.\n\nSigned-off-by: Oliver O'Halloran <oohall@gmail.com>\n---\n core/test/Makefile.check | 5 -----\n core/test/run-api-test.c | 1 -\n core/test/run-msg.c | 3 ---\n core/test/stubs.c | 38 +++++++++++++++++++++++++++++++++++++-\n 4 files changed, 37 insertions(+), 10 deletions(-)", "diff": "diff --git a/core/test/Makefile.check b/core/test/Makefile.check\nindex 1467a9f6c27c..813bd0207d8c 100644\n--- a/core/test/Makefile.check\n+++ b/core/test/Makefile.check\n@@ -25,11 +25,6 @@ CORE_TEST := \\\n \n HOSTCFLAGS+=-I . -I include\n \n-CORE_TEST_NOSTUB := core/test/run-console-log\n-CORE_TEST_NOSTUB += core/test/run-console-log-buf-overrun\n-CORE_TEST_NOSTUB += core/test/run-console-log-pr_fmt\n-CORE_TEST_NOSTUB += core/test/run-api-test\n-\n LCOV_EXCLUDE += $(CORE_TEST:%=%.c) core/test/stubs.c\n LCOV_EXCLUDE += $(CORE_TEST_NOSTUB:%=%.c) /usr/include/*\n \ndiff --git a/core/test/run-api-test.c b/core/test/run-api-test.c\nindex 583910dfd6c7..10f4cec8f11e 100644\n--- a/core/test/run-api-test.c\n+++ b/core/test/run-api-test.c\n@@ -28,7 +28,6 @@\n #include <opal-internal.h>\n \n #define __TEST__\n-unsigned long top_of_ram;\t/* Fake it here */\n int main(void)\n {\n \tunsigned long addr = 0xd000000000000000;\ndiff --git a/core/test/run-msg.c b/core/test/run-msg.c\nindex 3a7b7dd395f2..66b8429729ea 100644\n--- a/core/test/run-msg.c\n+++ b/core/test/run-msg.c\n@@ -23,9 +23,6 @@\n static bool zalloc_should_fail = false;\n static int zalloc_should_fail_after = 0;\n \n-/* Fake top_of_ram -- needed for API's */\n-unsigned long top_of_ram = 16ULL * 1024 * 1024 * 1024;\n-\n static void *zalloc(size_t size)\n {\n if (zalloc_should_fail && zalloc_should_fail_after == 0) {\ndiff --git a/core/test/stubs.c b/core/test/stubs.c\nindex 39ff18d8f103..426abe2e36e6 100644\n--- a/core/test/stubs.c\n+++ b/core/test/stubs.c\n@@ -17,6 +17,8 @@\n #include <stdio.h>\n #include <stdarg.h>\n \n+#define __weak __attribute__((weak))\n+\n #include \"../../ccan/list/list.c\"\n \n void _prlog(int log_level __attribute__((unused)), const char* fmt, ...) __attribute__((format (printf, 2, 3)));\n@@ -24,9 +26,11 @@ void _prlog(int log_level __attribute__((unused)), const char* fmt, ...) __attri\n #ifndef pr_fmt\n #define pr_fmt(fmt) fmt\n #endif\n+\n+#ifndef prlog\n #define prlog(l, f, ...) do { _prlog(l, pr_fmt(f), ##__VA_ARGS__); } while(0)\n \n-void _prlog(int log_level __attribute__((unused)), const char* fmt, ...)\n+void __attribute__((weak)) _prlog(int log_level __attribute__((unused)), const char* fmt, ...)\n {\n va_list ap;\n \n@@ -34,6 +38,7 @@ void _prlog(int log_level __attribute__((unused)), const char* fmt, ...)\n vprintf(fmt, ap);\n va_end(ap);\n }\n+#endif\n \n /* Add any stub functions required for linking here. */\n static void stub_function(void)\n@@ -41,9 +46,17 @@ static void stub_function(void)\n \tabort();\n }\n \n+static int noop_function(void)\n+{\n+\treturn 0;\n+}\n+\n #define STUB(fnname) \\\n \tvoid fnname(void) __attribute__((weak, alias (\"stub_function\")))\n \n+#define NOOP_STUB(fnname) \\\n+\tvoid fnname(void) __attribute__((weak, alias (\"noop_function\")))\n+\n STUB(fdt_begin_node);\n STUB(fdt_property);\n STUB(fdt_end_node);\n@@ -61,3 +74,26 @@ STUB(dt_next);\n STUB(dt_has_node_property);\n STUB(dt_get_address);\n STUB(add_chip_dev_associativity);\n+\n+STUB(__dt_add_property_cells);\n+STUB(dt_add_property_string);\n+STUB(dt_del_property);\n+STUB(dt_find_by_name);\n+STUB(__dt_find_property);\n+STUB(dt_new);\n+STUB(dt_new_addr);\n+STUB(opal_add_poller);\n+STUB(__opal_register);\n+\n+/* stop the stubbed lock functions from clashing with the real prototypes */\n+#define __LOCK_H\n+\n+NOOP_STUB(lock_recursive);\n+NOOP_STUB(lock);\n+NOOP_STUB(unlock);\n+NOOP_STUB(opal_update_pending_evt);\n+\n+unsigned long __weak top_of_ram = 16ULL * 1024 * 1024 * 1024;\n+\n+struct dt_node *opal_node = NULL;\n+struct dt_node *dt_chosen = NULL;\n", "prefixes": [ "3/6" ] }