From patchwork Wed Oct 10 05:19:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 981690 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42VMsD6nb5z9sBk for ; Wed, 10 Oct 2018 16:21:36 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42VMsD5YC7zF31R for ; Wed, 10 Oct 2018 16:21:36 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42VMqQ3KzPzF33P for ; Wed, 10 Oct 2018 16:20:02 +1100 (AEDT) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9A5IreN082057 for ; Wed, 10 Oct 2018 01:19:59 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0b-001b2d01.pphosted.com with ESMTP id 2n17jqxqkj-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 10 Oct 2018 01:19:59 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 Oct 2018 23:19:58 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 9 Oct 2018 23:19:56 -0600 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w9A5JtMH49610850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 9 Oct 2018 22:19:55 -0700 Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 16CA17805E for ; Tue, 9 Oct 2018 23:19:55 -0600 (MDT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9B2F97805C for ; Tue, 9 Oct 2018 23:19:54 -0600 (MDT) Received: from birb.localdomain (unknown [9.81.205.182]) by b03ledav004.gho.boulder.ibm.com (Postfix) with SMTP for ; Tue, 9 Oct 2018 23:19:54 -0600 (MDT) Received: by birb.localdomain (Postfix, from userid 1000) id 242DC4EC629; Wed, 10 Oct 2018 16:19:51 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Wed, 10 Oct 2018 16:19:46 +1100 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181010051950.13202-1-stewart@linux.ibm.com> References: <20181010051950.13202-1-stewart@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18101005-0020-0000-0000-00000E75FD1C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009852; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000268; SDB=6.01100468; UDB=6.00569370; IPR=6.00880516; MB=3.00023688; MTD=3.00000008; XFM=3.00000015; UTC=2018-10-10 05:19:57 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18101005-0021-0000-0000-00006352124D Message-Id: <20181010051950.13202-2-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-10-10_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810100053 Subject: [Skiboot] [PATCH 1/5] gcov: Fix building with GCC8 X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- core/Makefile.inc | 1 + core/gcov-profiling.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/core/Makefile.inc b/core/Makefile.inc index d36350590edb..779dd635ec93 100644 --- a/core/Makefile.inc +++ b/core/Makefile.inc @@ -13,6 +13,7 @@ CORE_OBJS += pci-dt-slot.o direct-controls.o cpufeatures.o ifeq ($(SKIBOOT_GCOV),1) CORE_OBJS += gcov-profiling.o +CFLAGS_SKIP_core/gcov-profiling.o = -Wno-suggest-attribute=const endif CORE=core/built-in.a diff --git a/core/gcov-profiling.c b/core/gcov-profiling.c index 136f563f689b..3ff7e6ee1a2c 100644 --- a/core/gcov-profiling.c +++ b/core/gcov-profiling.c @@ -51,13 +51,13 @@ struct gcov_info *gcov_info_list; void __gcov_init(struct gcov_info* f); void skiboot_gcov_done(void); -void __gcov_flush(void) __attrconst; -void __gcov_merge_add(gcov_type *counters, unsigned int n_counters) __attrconst; -void __gcov_merge_single(gcov_type *counters, unsigned int n_counters) __attrconst; -void __gcov_merge_delta(gcov_type *counters, unsigned int n_counters) __attrconst; -void __gcov_merge_ior(gcov_type *counters, unsigned int n_counters) __attrconst; -void __gcov_merge_time_profile(gcov_type *counters, unsigned int n_counters) __attrconst; -void __gcov_exit(void) __attrconst; +void __gcov_flush(void); +void __gcov_merge_add(gcov_type *counters, unsigned int n_counters); +void __gcov_merge_single(gcov_type *counters, unsigned int n_counters); +void __gcov_merge_delta(gcov_type *counters, unsigned int n_counters); +void __gcov_merge_ior(gcov_type *counters, unsigned int n_counters); +void __gcov_merge_time_profile(gcov_type *counters, unsigned int n_counters); +void __gcov_exit(void); void __gcov_init(struct gcov_info* f) { From patchwork Wed Oct 10 05:19:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 981692 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42VMsm5t6qz9sB7 for ; Wed, 10 Oct 2018 16:22:04 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42VMsm4gr1zF31F for ; Wed, 10 Oct 2018 16:22:04 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42VMqR31qFzF2Dx for ; Wed, 10 Oct 2018 16:20:03 +1100 (AEDT) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9A5Isol032483 for ; Wed, 10 Oct 2018 01:20:00 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0b-001b2d01.pphosted.com with ESMTP id 2n1631hqd6-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 10 Oct 2018 01:19:59 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 Oct 2018 23:19:58 -0600 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 9 Oct 2018 23:19:56 -0600 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w9A5Jti363701164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 9 Oct 2018 22:19:55 -0700 Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 15AB6136059 for ; Tue, 9 Oct 2018 23:19:55 -0600 (MDT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9B9E4136055 for ; Tue, 9 Oct 2018 23:19:54 -0600 (MDT) Received: from birb.localdomain (unknown [9.81.205.182]) by b03ledav002.gho.boulder.ibm.com (Postfix) with SMTP for ; Tue, 9 Oct 2018 23:19:54 -0600 (MDT) Received: by birb.localdomain (Postfix, from userid 1000) id 2A1E24EC632; Wed, 10 Oct 2018 16:19:51 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Wed, 10 Oct 2018 16:19:47 +1100 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181010051950.13202-1-stewart@linux.ibm.com> References: <20181010051950.13202-1-stewart@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18101005-0016-0000-0000-0000093EB6EB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009852; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000268; SDB=6.01100468; UDB=6.00569371; IPR=6.00880516; MB=3.00023689; MTD=3.00000008; XFM=3.00000015; UTC=2018-10-10 05:19:57 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18101005-0017-0000-0000-000040A64362 Message-Id: <20181010051950.13202-3-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-10-10_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810100053 Subject: [Skiboot] [PATCH 2/5] core/device: Add test for duplicate nodes with dt_attach_root() X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- core/test/run-device.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/test/run-device.c b/core/test/run-device.c index c3e46793f120..c317d4cc76f3 100644 --- a/core/test/run-device.c +++ b/core/test/run-device.c @@ -103,7 +103,7 @@ const char **props_to_fix(struct dt_node *node) int main(void) { - struct dt_node *root, *c1, *c2, *gc1, *gc2, *gc3, *ggc1, *ggc2; + struct dt_node *root, *other_root, *c1, *c2, *gc1, *gc2, *gc3, *ggc1, *ggc2; struct dt_node *addrs, *addr1, *addr2; struct dt_node *i, *subtree, *ev1, *ut1, *ut2; const struct dt_property *p; @@ -388,6 +388,13 @@ int main(void) assert(is_sorted(root)); + /* Now test dt_attach_root */ + other_root = dt_new_root("other_root"); + dt_new(other_root, "d@1"); + + assert(dt_attach_root(root, other_root)); + other_root = dt_new_root("other_root"); + assert(!dt_attach_root(root, other_root)); dt_free(root); /* Test child node sorting */ From patchwork Wed Oct 10 05:19:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 981688 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42VMrW3wkGz9sB7 for ; Wed, 10 Oct 2018 16:20:59 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42VMrW2T5pzF2QM for ; Wed, 10 Oct 2018 16:20:59 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42VMqP10XGzF31q for ; Wed, 10 Oct 2018 16:20:00 +1100 (AEDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9A5IujH038784 for ; Wed, 10 Oct 2018 01:19:58 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2n1ax28kpg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 10 Oct 2018 01:19:58 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 10 Oct 2018 01:19:58 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 10 Oct 2018 01:19:56 -0400 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w9A5JtdH20447234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 10 Oct 2018 05:19:55 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 36064AC05B for ; Wed, 10 Oct 2018 01:19:03 -0400 (EDT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AA121AC059 for ; Wed, 10 Oct 2018 01:19:02 -0400 (EDT) Received: from birb.localdomain (unknown [9.81.205.182]) by b01ledav006.gho.pok.ibm.com (Postfix) with SMTP for ; Wed, 10 Oct 2018 01:19:02 -0400 (EDT) Received: by birb.localdomain (Postfix, from userid 1000) id 32BB04EC636; Wed, 10 Oct 2018 16:19:51 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Wed, 10 Oct 2018 16:19:48 +1100 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181010051950.13202-1-stewart@linux.ibm.com> References: <20181010051950.13202-1-stewart@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18101005-0060-0000-0000-000002BE3EDB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009852; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000268; SDB=6.01100468; UDB=6.00569371; IPR=6.00880516; MB=3.00023689; MTD=3.00000008; XFM=3.00000015; UTC=2018-10-10 05:19:56 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18101005-0061-0000-0000-000046CAF72E Message-Id: <20181010051950.13202-4-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-10-10_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810100053 Subject: [Skiboot] [PATCH 3/5] core/device: add test for dt_new() a duplicate node X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- core/test/run-device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/test/run-device.c b/core/test/run-device.c index c317d4cc76f3..727b14fffe43 100644 --- a/core/test/run-device.c +++ b/core/test/run-device.c @@ -122,6 +122,7 @@ int main(void) check_path(c1, "/c1"); assert(dt_find_by_name(root, "c1") == c1); assert(dt_find_by_path(root, "/c1") == c1); + assert(dt_new(root, "c1") == NULL); c2 = dt_new(root, "c2"); assert(!list_top(&c2->properties, struct dt_property, list)); From patchwork Wed Oct 10 05:19:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 981687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42VMrC1b3fz9sB7 for ; Wed, 10 Oct 2018 16:20:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42VMrB5XZjzDrTQ for ; Wed, 10 Oct 2018 16:20:42 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42VMqN69MbzF2R7 for ; Wed, 10 Oct 2018 16:20:00 +1100 (AEDT) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9A5Iq5O146100 for ; Wed, 10 Oct 2018 01:19:58 -0400 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2n1a4rt6t7-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 10 Oct 2018 01:19:58 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 10 Oct 2018 01:19:57 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 10 Oct 2018 01:19:56 -0400 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w9A5Jtc245613248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 10 Oct 2018 05:19:55 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 53523112064 for ; Wed, 10 Oct 2018 01:19:17 -0400 (EDT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C6384112062 for ; Wed, 10 Oct 2018 01:19:16 -0400 (EDT) Received: from birb.localdomain (unknown [9.81.205.182]) by b01ledav004.gho.pok.ibm.com (Postfix) with SMTP for ; Wed, 10 Oct 2018 01:19:16 -0400 (EDT) Received: by birb.localdomain (Postfix, from userid 1000) id 393874EC64D; Wed, 10 Oct 2018 16:19:51 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Wed, 10 Oct 2018 16:19:49 +1100 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181010051950.13202-1-stewart@linux.ibm.com> References: <20181010051950.13202-1-stewart@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18101005-0064-0000-0000-0000035D0969 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009852; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000268; SDB=6.01100468; UDB=6.00569370; IPR=6.00880516; MB=3.00023689; MTD=3.00000008; XFM=3.00000015; UTC=2018-10-10 05:19:57 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18101005-0065-0000-0000-00003AEDEEC9 Message-Id: <20181010051950.13202-5-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-10-10_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=949 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810100053 Subject: [Skiboot] [PATCH 4/5] core/device: increase test coverage for dt_new_addr and dt_new_2addr X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- core/test/run-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/test/run-device.c b/core/test/run-device.c index 727b14fffe43..076ec2489def 100644 --- a/core/test/run-device.c +++ b/core/test/run-device.c @@ -166,12 +166,14 @@ int main(void) assert(dt_find_by_name(root, "addr@1337") == addr1); assert(dt_find_by_name_addr(root, "addr", 0x1337) == addr1); assert(dt_find_by_path(root, "/addrs/addr@1337") == addr1); + assert(dt_new_addr(addrs, "addr", 0x1337) == NULL); addr2 = dt_new_2addr(addrs, "2addr", 0xdead, 0xbeef); assert(!list_top(&addr2->properties, struct dt_property, list)); check_path(addr2, "/addrs/2addr@dead,beef"); assert(dt_find_by_name(root, "2addr@dead,beef") == addr2); assert(dt_find_by_path(root, "/addrs/2addr@dead,beef") == addr2); + assert(dt_new_2addr(addrs, "2addr", 0xdead, 0xbeef) == NULL); /* Test walking the tree, checking and setting values */ for (n = 0, i = dt_first(root); i; i = dt_next(root, i), n++) { From patchwork Wed Oct 10 05:19:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 981691 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42VMsV497pz9sC7 for ; Wed, 10 Oct 2018 16:21:50 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42VMsV2kVczF324 for ; Wed, 10 Oct 2018 16:21:50 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42VMqQ4p0yzF35K for ; Wed, 10 Oct 2018 16:20:02 +1100 (AEDT) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9A5IpAT146046 for ; Wed, 10 Oct 2018 01:20:00 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2n1a4rt6um-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 10 Oct 2018 01:20:00 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 10 Oct 2018 01:19:59 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 10 Oct 2018 01:19:58 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w9A5JvAA28704906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 10 Oct 2018 05:19:57 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 00620124053 for ; Wed, 10 Oct 2018 02:19:45 -0400 (EDT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 73197124052 for ; Wed, 10 Oct 2018 02:19:44 -0400 (EDT) Received: from birb.localdomain (unknown [9.81.205.182]) by b01ledav002.gho.pok.ibm.com (Postfix) with SMTP for ; Wed, 10 Oct 2018 02:19:44 -0400 (EDT) Received: by birb.localdomain (Postfix, from userid 1000) id 41EEE4EC653; Wed, 10 Oct 2018 16:19:51 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Wed, 10 Oct 2018 16:19:50 +1100 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181010051950.13202-1-stewart@linux.ibm.com> References: <20181010051950.13202-1-stewart@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18101005-2213-0000-0000-00000300E91A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009852; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000268; SDB=6.01100468; UDB=6.00569371; IPR=6.00880516; MB=3.00023689; MTD=3.00000008; XFM=3.00000015; UTC=2018-10-10 05:19:59 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18101005-2214-0000-0000-00005BD7B2C6 Message-Id: <20181010051950.13202-6-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-10-10_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810100053 Subject: [Skiboot] [PATCH 5/5] core/device: Test dt_new_check() X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- core/test/run-device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/test/run-device.c b/core/test/run-device.c index 076ec2489def..287d5a8747f0 100644 --- a/core/test/run-device.c +++ b/core/test/run-device.c @@ -103,7 +103,7 @@ const char **props_to_fix(struct dt_node *node) int main(void) { - struct dt_node *root, *other_root, *c1, *c2, *gc1, *gc2, *gc3, *ggc1, *ggc2; + struct dt_node *root, *other_root, *c1, *c2, *c2_c, *gc1, *gc2, *gc3, *ggc1, *ggc2; struct dt_node *addrs, *addr1, *addr2; struct dt_node *i, *subtree, *ev1, *ut1, *ut2; const struct dt_property *p; @@ -117,7 +117,7 @@ int main(void) assert(!list_top(&root->properties, struct dt_property, list)); check_path(root, "/"); - c1 = dt_new(root, "c1"); + c1 = dt_new_check(root, "c1"); assert(!list_top(&c1->properties, struct dt_property, list)); check_path(c1, "/c1"); assert(dt_find_by_name(root, "c1") == c1); @@ -125,6 +125,8 @@ int main(void) assert(dt_new(root, "c1") == NULL); c2 = dt_new(root, "c2"); + c2_c = dt_new_check(root, "c2"); + assert(c2 == c2_c); assert(!list_top(&c2->properties, struct dt_property, list)); check_path(c2, "/c2"); assert(dt_find_by_name(root, "c2") == c2);