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);