From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by sourceware.org (Postfix) with ESMTPS id 853CC3858D20 for ; Fri, 4 Nov 2022 07:58:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 853CC3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2A473i88012526; Fri, 4 Nov 2022 08:58:03 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=YFGd82eInpNv1pRBgvWt1Z81YYj+MKl0zps9ZG0TQ5I=; b=Y974kct25n9Y1kweT9Urq5K4bCfnm4KJlf/Fd9mBlzysrMjWU1Z+4tVR2HjgTmf0E0xV O6vXuOtx8Pzk8nseeOYWCK37TT/wqQcylI6z682EZO87L5PS/cuuuMcHqXtC16CRnKKD HPwwIpQL40PgLdvQ3uDz4FBZdN0cW+8AYzzDRrjobwN5GnHJfCcIzxJNI7VF6aWEWkGG Ps3D+lHOuMa6UghR8PbDzrILSFbbhLaN1VaPxAy8sozhIRqemMoX5MehiBJLqA4uSx2t 0wzzKLwS88raXci1C4L3sM0/zCdMHYlOHkoQ1ft7DD6ARxDy80kmP0V0wOP/9+oPOFt7 jg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3kmq1saex3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Nov 2022 08:58:03 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 880A110002A; Fri, 4 Nov 2022 08:57:56 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id C8660212FB7; Fri, 4 Nov 2022 08:57:56 +0100 (CET) Received: from [10.252.13.210] (10.252.13.210) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 4 Nov 2022 08:57:56 +0100 Message-ID: <190d7b55-fb09-4ba3-4063-2a0cb9a288e6@foss.st.com> Date: Fri, 4 Nov 2022 08:57:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v2] c++: Use in-process client when networking is disabled Content-Language: en-US To: Nathan Sidwell , CC: References: <20221103093748.2671754-1-torbjorn.svensson@foss.st.com> <700a9410-c69d-93da-5975-69cae5db33db@acm.org> <59ba7141-5c9d-6aa0-bbde-9740c7e0671a@acm.org> From: Torbjorn SVENSSON In-Reply-To: <59ba7141-5c9d-6aa0-bbde-9740c7e0671a@acm.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.252.13.210] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-04_02,2022-11-03_01,2022-06-22_01 X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2022-11-03 15:09, Nathan Sidwell wrote: > On 11/3/22 09:48, Torbjorn SVENSSON wrote: >> Hello Nathan, >> >> On 2022-11-03 14:13, Nathan Sidwell wrote: >>> On 11/3/22 05:37, Torbjörn SVENSSON wrote: >>>> v1 -> v2: >>>> Updated expression in bad-mapper-3.C >>>> >>>> Ok for trunk? >>>> >>>> --- >>>> >>>> Without the patch, the output for bad-mapper-3.C would be: >>>> >>>> /src/gcc/gcc/testsuite/g++.dg/modules/bad-mapper-3.C:2:1: error: >>>> unknown Compiled Module Interface: no such module >>>> >>>> As this line is unexpected, the test case would fail. >>>> The same problem can also be seen for g++.dg/modules/bad-mapper-2.C. >>>> >>>> gcc/cp/ChangeLog: >>>> >>>>     * mapper-client.cc: Use in-process client when networking is >>>>     disabled. >>>> >>>> gcc/testsuite/ChangeLog: >>>> >>>>     * g++.dg/modules/bad-mapper-3.C: Update dg-error pattern. >>>> >>>> Tested on Windows with arm-none-eabi for Cortex-M3 in gcc-11 tree. >>>> >>>> Co-Authored-By: Yvan ROUX >>>> Signed-off-by: Torbjörn SVENSSON >>>> --- >>>>   gcc/cp/mapper-client.cc                     | 4 ++++ >>>>   gcc/testsuite/g++.dg/modules/bad-mapper-3.C | 2 +- >>>>   2 files changed, 5 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/gcc/cp/mapper-client.cc b/gcc/cp/mapper-client.cc >>>> index fe9544b5ba4..4dcb3a03660 100644 >>>> --- a/gcc/cp/mapper-client.cc >>>> +++ b/gcc/cp/mapper-client.cc >>>> @@ -227,6 +227,8 @@ module_client::open_module_client (location_t >>>> loc, const char *o, >>>>           int fd = -1; >>>>   #if CODY_NETWORKING >>>>           fd = Cody::OpenLocal (&errmsg, name.c_str () + 1); >>>> +#else >>>> +        errmsg = "CODY_NETWORKING disabled"; >>> >>> CODY_NETWORKING is implementor speak. I think just "disabled" is >>> sufficient here? >> >> Ok for trunk if I change to just "disabled" here and in the other >> places below? > > yes, thanks >> >> Kind regards, >> Torbjörn >> >>> >>>>   #endif >>>>           if (fd >= 0) >>>>             c = new module_client (fd, fd); >>>> @@ -254,6 +256,8 @@ module_client::open_module_client (location_t >>>> loc, const char *o, >>>>               int fd = -1; >>>>   #if CODY_NETWORKING >>>>               fd = Cody::OpenInet6 (&errmsg, name.c_str (), port); >>>> +#else >>>> +            errmsg = "CODY_NETWORKING disabled"; >>>>   #endif >>>>               name[colon] = ':'; >>>> diff --git a/gcc/testsuite/g++.dg/modules/bad-mapper-3.C >>>> b/gcc/testsuite/g++.dg/modules/bad-mapper-3.C >>>> index 9dab332ccb2..c91bb4e260c 100644 >>>> --- a/gcc/testsuite/g++.dg/modules/bad-mapper-3.C >>>> +++ b/gcc/testsuite/g++.dg/modules/bad-mapper-3.C >>>> @@ -1,6 +1,6 @@ >>>>   //  { dg-additional-options "-fmodules-ts >>>> -fmodule-mapper=localhost:172477262" } >>>>   import unique3.bob; >>>> -// { dg-error {failed connecting mapper 'localhost:172477262'} "" { >>>> target *-*-* } 0 } >>>> +// { dg-error {failed (connecting|CODY_NETWORKING disabled) mapper >>>> 'localhost:172477262'} "" { target *-*-* } 0 } >>>>   // { dg-prune-output "fatal error:" } >>>>   // { dg-prune-output "failed to read" } >>>>   // { dg-prune-output "compilation terminated" } >>> > Pushed.