Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811413/?format=api
{ "id": 811413, "url": "http://patchwork.ozlabs.org/api/patches/811413/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170908091700.14867-6-famz@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170908091700.14867-6-famz@redhat.com>", "list_archive_url": null, "date": "2017-09-08T09:16:58", "name": "[RFC,5/7] tests: Build fix for linux-test", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "db908cc81ef9832ee1c6c35fff711eaa20179f85", "submitter": { "id": 24872, "url": "http://patchwork.ozlabs.org/api/people/24872/?format=api", "name": "Fam Zheng", "email": "famz@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170908091700.14867-6-famz@redhat.com/mbox/", "series": [ { "id": 2149, "url": "http://patchwork.ozlabs.org/api/series/2149/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2149", "date": "2017-09-08T09:16:53", "name": "Proof of concept to power up \"make test\" with docker", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2149/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811413/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811413/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)", "ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com", "ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=famz@redhat.com" ], "Received": [ "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpWzd5Kckz9s82\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 8 Sep 2017 19:21:49 +1000 (AEST)", "from localhost ([::1]:44053 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dqFTv-0000cz-PX\n\tfor incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 05:21:47 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:52632)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dqFPw-0006Co-JR\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:45 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dqFPr-0000ix-76\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:40 -0400", "from mx1.redhat.com ([209.132.183.28]:57990)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <famz@redhat.com>) id 1dqFPq-0000hp-UW\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:35 -0400", "from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 0395D356E8;\n\tFri, 8 Sep 2017 09:17:34 +0000 (UTC)", "from lemon.redhat.com (ovpn-12-98.pek2.redhat.com [10.72.12.98])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 74AC960241;\n\tFri, 8 Sep 2017 09:17:30 +0000 (UTC)" ], "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 0395D356E8", "From": "Fam Zheng <famz@redhat.com>", "To": "qemu-devel@nongnu.org", "Date": "Fri, 8 Sep 2017 17:16:58 +0800", "Message-Id": "<20170908091700.14867-6-famz@redhat.com>", "In-Reply-To": "<20170908091700.14867-1-famz@redhat.com>", "References": "<20170908091700.14867-1-famz@redhat.com>", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.12", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.30]);\n\tFri, 08 Sep 2017 09:17:34 +0000 (UTC)", "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]", "X-Received-From": "209.132.183.28", "Subject": "[Qemu-devel] [PATCH RFC 5/7] tests: Build fix for linux-test", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Cc": "peter.maydell@linaro.org, thuth@redhat.com, Fam Zheng <famz@redhat.com>, \n\t=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>,\n\tprogrammingkidx@gmail.com, crosa@redhat.com, pbonzini@redhat.com, \n\t=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, rth@twiddle.net", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "To keep the compiler happy, and to fit in our buildsys flags:\n\n- Include \"qemu/osdep.h\" first\n- Make local functions \"static\"\n- #ifdef out unused functions\n\nSigned-off-by: Fam Zheng <famz@redhat.com>\n---\n tests/tcg/linux-test.c | 67 +++++++++++++++++---------------------------------\n 1 file changed, 22 insertions(+), 45 deletions(-)", "diff": "diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c\nindex 5070d31446..2a7b8c2d05 100644\n--- a/tests/tcg/linux-test.c\n+++ b/tests/tcg/linux-test.c\n@@ -17,6 +17,7 @@\n * along with this program; if not, see <http://www.gnu.org/licenses/>.\n */\n #define _GNU_SOURCE\n+#include \"qemu/osdep.h\"\n #include <stdarg.h>\n #include <stdlib.h>\n #include <stdio.h>\n@@ -31,6 +32,7 @@\n #include <utime.h>\n #include <time.h>\n #include <sys/time.h>\n+#include <sys/resource.h>\n #include <sys/uio.h>\n #include <sys/socket.h>\n #include <netinet/in.h>\n@@ -45,7 +47,7 @@\n #define TESTPORT 7654\n #define STACK_SIZE 16384\n \n-void error1(const char *filename, int line, const char *fmt, ...)\n+static void error1(const char *filename, int line, const char *fmt, ...)\n {\n va_list ap;\n va_start(ap, fmt);\n@@ -56,7 +58,7 @@ void error1(const char *filename, int line, const char *fmt, ...)\n exit(1);\n }\n \n-int __chk_error(const char *filename, int line, int ret)\n+static int __chk_error(const char *filename, int line, int ret)\n {\n if (ret < 0) {\n error1(filename, line, \"%m (ret=%d, errno=%d)\",\n@@ -73,7 +75,7 @@ int __chk_error(const char *filename, int line, int ret)\n \n #define FILE_BUF_SIZE 300\n \n-void test_file(void)\n+static void test_file(void)\n {\n int fd, i, len, ret;\n uint8_t buf[FILE_BUF_SIZE];\n@@ -210,7 +212,7 @@ void test_file(void)\n chk_error(rmdir(TESTPATH));\n }\n \n-void test_fork(void)\n+static void test_fork(void)\n {\n int pid, status;\n \n@@ -224,7 +226,7 @@ void test_fork(void)\n error(\"waitpid status=0x%x\", status);\n }\n \n-void test_time(void)\n+static void test_time(void)\n {\n struct timeval tv, tv2;\n struct timespec ts, rem;\n@@ -251,34 +253,7 @@ void test_time(void)\n error(\"getrusage\");\n }\n \n-void pstrcpy(char *buf, int buf_size, const char *str)\n-{\n- int c;\n- char *q = buf;\n-\n- if (buf_size <= 0)\n- return;\n-\n- for(;;) {\n- c = *str++;\n- if (c == 0 || q >= buf + buf_size - 1)\n- break;\n- *q++ = c;\n- }\n- *q = '\\0';\n-}\n-\n-/* strcat and truncate. */\n-char *pstrcat(char *buf, int buf_size, const char *s)\n-{\n- int len;\n- len = strlen(buf);\n- if (len < buf_size)\n- pstrcpy(buf + len, buf_size - len, s);\n- return buf;\n-}\n-\n-int server_socket(void)\n+static int server_socket(void)\n {\n int val, fd;\n struct sockaddr_in sockaddr;\n@@ -298,7 +273,7 @@ int server_socket(void)\n \n }\n \n-int client_socket(void)\n+static int client_socket(void)\n {\n int fd;\n struct sockaddr_in sockaddr;\n@@ -312,9 +287,9 @@ int client_socket(void)\n return fd;\n }\n \n-const char socket_msg[] = \"hello socket\\n\";\n+static const char socket_msg[] = \"hello socket\\n\";\n \n-void test_socket(void)\n+static void test_socket(void)\n {\n int server_fd, client_fd, fd, pid, ret, val;\n struct sockaddr_in sockaddr;\n@@ -348,9 +323,10 @@ void test_socket(void)\n chk_error(close(server_fd));\n }\n \n+#if 0\n #define WCOUNT_MAX 512\n \n-void test_pipe(void)\n+static void test_pipe(void)\n {\n fd_set rfds, wfds;\n int fds[2], fd_max, ret;\n@@ -391,10 +367,10 @@ void test_pipe(void)\n chk_error(close(fds[1]));\n }\n \n-int thread1_res;\n-int thread2_res;\n+static int thread1_res;\n+static int thread2_res;\n \n-int thread1_func(void *arg)\n+static int thread1_func(void *arg)\n {\n int i;\n for(i=0;i<5;i++) {\n@@ -404,7 +380,7 @@ int thread1_func(void *arg)\n return 0;\n }\n \n-int thread2_func(void *arg)\n+static int thread2_func(void *arg)\n {\n int i;\n for(i=0;i<6;i++) {\n@@ -435,27 +411,28 @@ void test_clone(void)\n thread2_res != 6)\n error(\"clone\");\n }\n+#endif\n \n /***********************************/\n \n volatile int alarm_count;\n jmp_buf jmp_env;\n \n-void sig_alarm(int sig)\n+static void sig_alarm(int sig)\n {\n if (sig != SIGALRM)\n error(\"signal\");\n alarm_count++;\n }\n \n-void sig_segv(int sig, siginfo_t *info, void *puc)\n+static void sig_segv(int sig, siginfo_t *info, void *puc)\n {\n if (sig != SIGSEGV)\n error(\"signal\");\n longjmp(jmp_env, 1);\n }\n \n-void test_signal(void)\n+static void test_signal(void)\n {\n struct sigaction act;\n struct itimerval it, oit;\n@@ -510,7 +487,7 @@ void test_signal(void)\n \n #define SHM_SIZE 32768\n \n-void test_shm(void)\n+static void test_shm(void)\n {\n void *ptr;\n int shmid;\n", "prefixes": [ "RFC", "5/7" ] }