From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id AB9363858C27 for ; Wed, 24 Nov 2021 18:53:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AB9363858C27 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AOHsiHH012791; Wed, 24 Nov 2021 18:53:12 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3chj7g34nk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Nov 2021 18:53:03 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1AOIosRR142297; Wed, 24 Nov 2021 18:52:59 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2176.outbound.protection.outlook.com [104.47.56.176]) by userp3030.oracle.com with ESMTP id 3cep52629e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Nov 2021 18:52:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AQIlPqkMOnxMQT9uZllAPZ9CzdIn6FfA1Qo4GT0dqi1U5KOG+LSH1W+JN5Ey770RoC7JJy02CWHSyjC9tSarv/iFvrDTYQAX8cxzZ1flIJACobiX+hHNIPbtvJ/kpo4Mp3F8sPvYepvaeVTD0foMXiipv/EmPpfx/3LvCfRZqj1E7u6auhAlBW+oVeURtKvw+Mb4SS+squ1hIpAXO7xeo7lcVoKOlcLiOn0tGC1ZMYqxvXLhyii1yxECsBUpoxQ6zJlqHOVCwYLWZcNsy/F0IAHR++0Cdupyui/36UhgMjdQnkmhZdeFJTZeh5ixYYdfNMJ39oI/KTKnyUBEQnkszA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fPU0sK0ZqEDPB+Kdj2dxll2BtHSePWZ30qhi71tK5Ks=; b=BlbMvGIx/vVfjSomrJMgdi2dsa+kYLz9RsVIscTVlhQuA5t+B5lcU7cweK3SpVyEeJiIW7x3TMfDq6XR/PE6pDxIC3sLFPbTk6z24GuI0b6q4t+or/JeI3yKaBUXSoU/VK/xgRysfYCGVuq0TMOHPdYkhtA9r2qBtGqLbrKYlCK8w2udaKPHKiR1Qe62zDovyXbhvU5B9DUVcLLiVoVj/AbDfSHyXMgf+uReGU3AxvCV9CQGxKyYVFvHlan7Jn/Q59BZTWyGUXZU6KK1GTkeEs7P4+hZbVYmxoA2tvWUQErjSWzMVejH0p+KJyEpAeB69aQHFJ8srZqWpxPKxethQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from BL0PR10MB2852.namprd10.prod.outlook.com (2603:10b6:208:76::22) by BLAPR10MB5140.namprd10.prod.outlook.com (2603:10b6:208:320::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.20; Wed, 24 Nov 2021 18:52:56 +0000 Received: from BL0PR10MB2852.namprd10.prod.outlook.com ([fe80::7126:e98e:9cff:8765]) by BL0PR10MB2852.namprd10.prod.outlook.com ([fe80::7126:e98e:9cff:8765%7]) with mapi id 15.20.4713.025; Wed, 24 Nov 2021 18:52:56 +0000 From: Guillermo Martinez To: "Guillermo E. Martinez via Libabigail" , Dodji Seketeli Subject: Re: [PATCH v2] Add regression tests for ctf reading Thread-Topic: [PATCH v2] Add regression tests for ctf reading Thread-Index: AQHX3+i0sxPxY2A1xE+yYqgUFCa9sqwS4vZ2gAAmMgA= Date: Wed, 24 Nov 2021 18:52:56 +0000 Message-ID: <4678181.mFG4eHPlM4@sali> References: <20211118041625.622972-1-guillermo.e.martinez@oracle.com> <20211122213353.2456208-1-guillermo.e.martinez@oracle.com> <87ee75tsst.fsf@seketeli.org> In-Reply-To: <87ee75tsst.fsf@seketeli.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 41791c2c-c4f0-4afd-e292-08d9af7ba11e x-ms-traffictypediagnostic: BLAPR10MB5140: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1148; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: d/X0YG817EGiY3sX9ZIHcjZuDXEonShwftlTwSw0CqWgh5MsVL2FDs2a03OG5Q+lRkH0ZKRp5n0wUo2CW11DGysmKNpAbY/FYY6PNIbXbJzgne61hYNETkT5kDu8Nref+d+m4fgCUVmnqXBoPboNaVhLAIgfqjaeUUIPfyrtcJ4E8/YjqLSzGCywqSmo7+LiQQdiHrU4vuzJnGmAkSEvQl/P1rf8THYeAujOkRRgIADFtywKCtlOLezAvED6U64BEdTWzwOqjUbM3JBOg3Rgb9cnIYaSX/EoYYSRWJPryB1gY1RtYkVykNsP8xmLCP9FXWjSryoLC0bhPt+ib0v28JzaaTU8glvEFm8F/jK/f2hcX79Uc9Gi8C4EEN7kyOr7E6ERTJxwKcb0w0dW1NzXgvKOe/CVfG+oA0vrodjQfgC3fkSfbvQ9uC+u+QMSyHtaXmd8tTCCn1o+oVVX/TSgSAn5Gbp+2PeYPxzfF1TWSPBdrZh+fK+3vGRWXty19AA6r9bfHhexn5RUv7jqJw5ZwvPEx+f7TY93GeXTCaAtXEQczYOt237zjwx0j8JVYY4bHwwyCs/rLl678VibDmKrJewg5t1GIpoFBVAaoKdsd6CK+mYDYjl9/DGcyTC3L8kQT7wv/tg0rTDt91y/arVPi+n0AqNw1YBEB21uSpc3UpAOIOlfZEBWosIk83S2B2AM9FUl/RTrEQBQQbWkio1DVrmPYihSxXeUAp8ekKrBAJdcrGFGppfYd1msOGUTBtdw//NEJHqB5QKO9k/WomFMCcG5/h8VK119ouTZKMZOUy0USO4D4cTJRMCdb2/nXBsIKuy3tVcM6zPbfjJ3UZhqUA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR10MB2852.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(7916004)(366004)(9686003)(86362001)(33716001)(110136005)(91956017)(30864003)(186003)(8936002)(6512007)(83380400001)(53546011)(2906002)(316002)(966005)(8676002)(5660300002)(508600001)(26005)(66946007)(6486002)(38070700005)(122000001)(76116006)(66556008)(64756008)(66446008)(6506007)(38100700002)(66476007)(71200400001)(39026012); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ASMwA/1SbKOo9HAKkfW4IoWUeJxUPREWsLXXSRxdsigh2MyFK1v9+Vg4JKHq?= =?us-ascii?Q?tZJhxNw11sQI7rGBcv8bROLsiAxKlxKgFATi8GvrRUX9GGLyaihXxTlLq6EG?= =?us-ascii?Q?uv+whikzMeW/omJfIIjYvmzbRjRUoYGNIb08tQXzgjr3pI8GYScmZCHP1yK2?= =?us-ascii?Q?cxed3kctkGXp4acAFEyHYLQlzgPyuAkbyH8pQg5LrFjHt0UDDql2CuzgW5l0?= =?us-ascii?Q?ivpYRI1GJlkTnQv+E830ev4vEmgiI6Z8pDWakSWmKOtdpYSJYJxmOh5KOHRZ?= =?us-ascii?Q?UBrlqB7Q1/9GLVd9UfldELJO/GIJwwl1x0O97JVB5XoLGF+noOZYX38954v/?= =?us-ascii?Q?KR233vWayyvi2QEpsXc7xxhnYYqzg+mLm9UwNuQaJ9BTfZwsXGfq1aV+ohAn?= =?us-ascii?Q?rMCDhRDEODMVb9rBwVZtXH8LJ6i0D45ET77376YHdU0T/owTPdH0mvCe2if2?= =?us-ascii?Q?7BeMF7PSWsWeY+6YIWP25s8Ht+OoAFNg0oUtgcvBD/6tk/aSqbuSoyz9/qG8?= =?us-ascii?Q?OvI7qA8Vo4vpSeFO1bPU3VWUHvrFcMtnnwdbD1DzzO3B3tl0LGHY4MYnICqg?= =?us-ascii?Q?F6L+KUwYDk9nKqa/KQ4TmIbCD9w1MDlZQoTBMAkuioVXanaaBY6qUsuqWxY/?= =?us-ascii?Q?hAuuzmc7tsm/UCo/QeDCoV/aONVTkg7agvGaP+spIDlazER1RuaN2BC3K08F?= =?us-ascii?Q?5tZYiJ2+BBikzxJZ+egztqfbFgudXIEssAN/ZecILjMXTsEZoepyd+SlS0uP?= =?us-ascii?Q?OtUYrTxkKWi6smZQ10zeDLNrXNFkyjptTocKWXo6+IRfa0S0AZtoWPkm6Tgt?= =?us-ascii?Q?lV1QQSpEXhspDO1ypxMGPw1lqbNugFajWzwK07oyX1bz5v61F8Fbi+YMe7by?= =?us-ascii?Q?bVJFjKrgbd+8t4mDpkX2COS5WlPZN09RoSUuZjEW7rNL796TRQzUhyf5MBvC?= =?us-ascii?Q?5EqujQldwM8GZNKeMYdXKEuXDyAQaG6otgrIqmzWMKox68VPwORDTp/oZAoj?= =?us-ascii?Q?oBHQkK8wNVI4OEhKIVBOk9MjPgo2sYzRS9hvTusrxfjE9B9fAUcVnADVOWcI?= =?us-ascii?Q?QS16iutIZy9Cp2ksVMWBMo795TSoTAjF624HPZ6eEjeEgyzylNPmZOZ7Gq4K?= =?us-ascii?Q?hFQMAjQ+fmlqr9IakfmsiALn8UWAKzh0/AD5ffP4XOxHd/VQ7/XdLT4ylXq0?= =?us-ascii?Q?ATqpYdyGU9UaaSDTe0+SBtT/R/1nD5M6wfdXsRIOC0eyLVKflLnC2PRUw6c4?= =?us-ascii?Q?xZ5oLbc43/XbDHrm8xYuGSOz84w23OY9GU/gtIJUnIXFPzK3OF6QtGccXyyD?= =?us-ascii?Q?Dv4WCscXRKT3qDAEKSOGstQj+CKbbIdy60FRplXrH7vKKoEy6vRS4NrAoBbC?= =?us-ascii?Q?3sRISoGcKiL7dbhij49eOS3rPn43/6OEIKDW9HbfIxgBM+HCvkX2fMmieWN5?= =?us-ascii?Q?jJKcrqwTPVg/RyjW8fRGf56/4+8YdbBPkBxTZX36NPffUvzFkWpnkBwx83JD?= =?us-ascii?Q?2ktmyM4N5cDCYnS8S7QEZUu9yhWPE3pjTuZ/FeNq7ud5Xk4veCbcpROCHBqK?= =?us-ascii?Q?iosQNC2FwNLzLem32NKNROFh6GeYZ5oUnRTkZMHBKkIDdn9+YIeWXZYYiGj5?= =?us-ascii?Q?9TWSMqJ0XzBtTZLgUOA55lkENafWB1mjaxLyn39YlNm8gAgRYbFQiWXfCkj1?= =?us-ascii?Q?50yX6MbyeyBt/jPiuRSLDPPr4iY=3D?= Content-Type: text/plain; charset="us-ascii" Content-ID: <21F426A3399FE343AF4910791EE62DAC@namprd10.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL0PR10MB2852.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 41791c2c-c4f0-4afd-e292-08d9af7ba11e X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Nov 2021 18:52:56.7620 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Yz9wMp99w6Apbh5GIhiHHweUpCxSwyQ91i14JbsOeHjj6vmWdJ0z3CZ0PZCUkj7wmh7A/zg61MwIxaZ4UHVJ+/DirdAgAOFVdCyoBi/fz7g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB5140 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10178 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111240098 X-Proofpoint-ORIG-GUID: zrWq5vOCw--Skx8YwdSpMsvNo8L99aDs X-Proofpoint-GUID: zrWq5vOCw--Skx8YwdSpMsvNo8L99aDs X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2021 18:53:18 -0000 Hello Dodji,=0A= =0A= Thanks for your comments!!=0A= =0A= > On Wednesday, November 24, 2021 10:36:02 AM CST Dodji Seketeli wrote:=0A= > Hello,=0A= > =0A= > [...]=0A= > =0A= > Thanks for working on this. Nice patch, by the way! I like its=0A= > direction.=0A= good to know it :-)=0A= =0A= > I have a few comments and I believe that when they are addressed, we'll= =0A= > be able to apply the patch.=0A= > =0A= > [...]=0A= > =0A= > > Dependencies/limitations:=0A= > > =0A= > > * It was worked on the top of the following patches:=0A= > > https://sourceware.org/pipermail/libabigail/2021q4/003853.html=0A= > > =0A= > > * Some CTF tests were *disabled* because it generates the XML ABI=0A= > > corpus with *same information* but the XML nodes *are not* always=0A= > > in the *same order*, so using diff command fails. Details here:=0A= > > https://sourceware.org/pipermail/libabigail/2021q4/003824.html=0A= > =0A= > In those cases where the abixml file generated from CTF is different=0A= > from the one generated from DWARF, I think we should have two=0A= > different reference abixml files to diff against. No CTF test should=0A= > be disabled, I think.=0A= > =0A= > So:=0A= > =0A= > This:=0A= > =0A= > {=0A= > "data/test-read-dwarf/test0",=0A= > "",=0A= > "",=0A= > SEQUENCE_TYPE_ID_STYLE,=0A= > "data/test-read-dwarf/test0.abi",=0A= > "output/test-read-dwarf/test0.abi"=0A= > },=0A= > =0A= > would be changed into:=0A= > =0A= > {=0A= > "data/test-read-common/test0",=0A= > "",=0A= > "",=0A= > SEQUENCE_TYPE_ID_STYLE,=0A= > "data/test-read-dwarf/test0.abi",=0A= > "output/test-read-dwarf/test0.abi"=0A= > },=0A= > =0A= > For the DWARF test entry in test-read-dwarf.cc, and it would be=0A= > changed into:=0A= > =0A= > {=0A= > "data/test-read-common/test0",=0A= > "",=0A= > "",=0A= > SEQUENCE_TYPE_ID_STYLE,=0A= > "data/test-read-ctf/test0.abi",=0A= > "output/test-read-ctf/test0.abi"=0A= > },=0A= > =0A= > for the CTF test netry in test-read-ctf.cc.=0A= > =0A= > By the way, I am seeing entries like this in test-read-ctf.cc:=0A= > =0A= > > + "data/test-read-common/test3.so",=0A= > > + "",=0A= > > + "",=0A= > > + SEQUENCE_TYPE_ID_STYLE,=0A= > > + "data/test-read-common/test3-ctf.so.abi",=0A= > > + "output/test-read-common/test3-ctf.so.abi"=0A= > =0A= > Here this entry does exactly what I am suggesting, even if=0A= > test3-ctf.so.abi is stored in data/test-read-common.=0A= perfect, then I'll move the expected abixml file to accurate directory=0A= and I'll remove the suffix depending of which reader we are testing,=0A= instead of store it in common directory.=0A= > So where exactly is the CTF test disabled?=0A= I remove those test entries, so the possible problem detected using externa= l diff=0A= command in CTF is, for instance, in: test-read-common/test-PR26568-1-ctf.o.= abi,=0A= the first time that runtestreadctf is executed an abixml file is generated= :=0A= =0A= ...=0A= = =0A= =0A= = =0A= =0A= =0A= = =0A= =0A= = =0A= =0A= =0A= =0A= and this is second execution:=0A= ...=0A= = =0A= =0A= = =0A= =0A= =0A= = =0A= =0A= = =0A= =0A= =0A= =0A= As we can see both abixml files have *same nodes information* but the node= s=0A= are in a different order, so the test should be marked as passed, however u= sing=0A= the external diff command the test fails. so my question is should we rely = in diff=0A= command to compare the corpus of the ELF input files (abixml files)?=0A= =0A= https://sourceware.org/pipermail/libabigail/2021q4/003885.html=0A= =0A= > [...]=0A= > =0A= > =0A= > > diff --git a/tests/test-read-common.cc b/tests/test-read-common.cc=0A= > =0A= > [...]=0A= > =0A= > > +=0A= > > +namespace abigail=0A= > > +{=0A= > > +namespace tests=0A= > > +{=0A= > > +namespace read_common=0A= > > +{=0A= > =0A= > Because this file now contains an API definition that is to be used be=0A= > some tests, every single function of the file should be documented=0A= > using doxygen comments, just like we have in src/abg-*.cc files.=0A= Ok, will wok on in in the next patch version.=0A= > For instance:=0A= > =0A= > > +=0A= > > +test_task::test_task(const InOutSpec &s,=0A= > > + string& a_out_abi_base,=0A= > > + string& a_in_elf_base,=0A= > > + string& a_in_abi_base)=0A= > =0A= > This function should be fully doxygen-documented.=0A= > =0A= > > + : is_ok(true),=0A= > > + spec(s),=0A= > > + out_abi_base(a_out_abi_base),=0A= > > + in_elf_base(a_in_elf_base),=0A= > > + in_abi_base(a_in_abi_base)=0A= > > + {}=0A= > > +=0A= > > +bool=0A= > > +test_task::serialize_corpus(const string& out_abi_path,=0A= > > + corpus_sptr corp)=0A= > =0A= > Likewise.=0A= Ok,=0A= > > +{=0A= > > + ofstream of(out_abi_path.c_str(), std::ios_base::trunc);=0A= > > + if (!of.is_open())=0A= > > + {=0A= > > + error_message =3D string("failed to read ") + out_abi_path + "\= n";=0A= > > + return false;=0A= > > + }=0A= > > +=0A= > > + write_context_sptr write_ctxt=0A= > > + =3D create_write_context(corp->get_environment(), of);=0A= > > + set_type_id_style(*write_ctxt, spec.type_id_style);=0A= > > + is_ok =3D write_corpus(*write_ctxt, corp, /*indent=3D*/0);=0A= > > + of.close();=0A= > > +=0A= > > + return true;=0A= > > +}=0A= > > +=0A= > > +bool=0A= > > +test_task::run_abidw(const string& extargs)=0A= > =0A= > Likewise.=0A= Ok, =0A= > > +{=0A= > > + string abidw =3D string(get_build_dir()) + "/tools/abidw";=0A= > > + string drop_private_types;=0A= > > + if (!in_public_headers_path.empty())=0A= > > + drop_private_types +=3D "--headers-dir " + in_public_headers_path = +=0A= > > + " --drop-private-types";=0A= > > + string cmd =3D abidw + " " + drop_private_types + " --abidiff " + ex= targs +=0A= > > + in_elf_path;=0A= > > + if (system(cmd.c_str()))=0A= > > + {=0A= > > + error_message =3D string("ABIs differ:\n")=0A= > > + + in_elf_path=0A= > > + + "\nand:\n"=0A= > > + + out_abi_path=0A= > > + + "\n";=0A= > > +=0A= > > + return false;=0A= > > + }=0A= > > +=0A= > > + return true;=0A= > > +}=0A= > > +=0A= > > +bool=0A= > > +test_task::run_diff()=0A= > =0A= > Likewise.=0A= Ok,=0A= > > +{=0A= > > + set_in_abi_path();=0A= > > + string cmd =3D "diff -u " + in_abi_path + " " + out_abi_path;=0A= > > + if (system(cmd.c_str()))=0A= > > + {=0A= > > + error_message =3D string("ABIs differ:\n")=0A= > > + + in_abi_path=0A= > > + + "\nand:\n"=0A= > > + + out_abi_path=0A= > > + + "\n";=0A= > > +=0A= > > + return false;=0A= > > + }=0A= > > +=0A= > > + return true;=0A= > > +}=0A= > > +=0A= > > +void=0A= > > +display_usage(const string& prog_name, ostream& out)=0A= > =0A= > Likewise.=0A= Ok,=0A= > > +{=0A= > > + emit_prefix(prog_name, out)=0A= > > + << "usage: " << prog_name << " [options]\n"=0A= > > + << " where options can be: \n"=0A= > > + << " --help|-h display this message\n"=0A= > > + << " --no-parallel execute testsuite is a sigle thread\n"=0A= > > + ;=0A= > > +}=0A= > > +=0A= > > +bool=0A= > > +parse_command_line(int argc, char* argv[], options& opts)=0A= > =0A= > Likewise.=0A= Ok,=0A= > > +{=0A= > > + for (int i =3D 1; i < argc; ++i)=0A= > > + {=0A= > > + if (!strcmp(argv[i], "--no-parallel"))=0A= > > + opts.parallel =3D false;=0A= > > + else if (!strcmp(argv[i], "--help")=0A= > > + || !strcmp(argv[i], "--h"))=0A= > > + return false;=0A= > > + else=0A= > > + {=0A= > > + if (strlen(argv[i]) >=3D 2 && argv[i][0] =3D=3D '-' && argv[= i][1] =3D=3D '-')=0A= > > + opts.wrong_option =3D argv[i];=0A= > > + return false;=0A= > > + }=0A= > > + }=0A= > > +=0A= > > + return true;=0A= > > +}=0A= > > +=0A= > > +bool=0A= > > +run_tests(const size_t num_tests, const InOutSpec* specs,=0A= > > + const options& opts, create_new_test new_test)=0A= > =0A= > Likewise.=0A= Ok,=0A= > > +{=0A= > =0A= > [...]=0A= > =0A= > =0A= > > diff --git a/tests/test-read-common.h b/tests/test-read-common.h=0A= > =0A= > [...]=0A= > =0A= > > +/// This is an aggregate that specifies where a test shall get its=0A= > > +/// input from, and where it shall write its ouput to.=0A= > > +struct InOutSpec=0A= > > +{=0A= > > + const char* in_elf_path;=0A= > > + const char* in_suppr_spec_path;=0A= > > + const char* in_public_headers_path;=0A= > > + type_id_style_kind type_id_style;=0A= > > + const char* in_abi_path;=0A= > > + const char* out_abi_path;=0A= > > +};// end struct InOutSpec=0A= > > +=0A= > > +/// The task that peforms the tests.=0A= > > +struct test_task : public abigail::workers::task=0A= > > +{=0A= > > + bool is_ok;=0A= > > + InOutSpec spec;=0A= > > + string error_message;=0A= > > + string out_abi_base;=0A= > > + string in_elf_base;=0A= > > + string in_abi_base;=0A= > > +=0A= > > + string in_elf_path;=0A= > > + string in_abi_path;=0A= > > + string in_suppr_spec_path;=0A= > > + string in_public_headers_path;=0A= > > + string out_abi_path;=0A= > > +=0A= > > + void=0A= > > + set_in_elf_path()=0A= > =0A= > Please doxygen-document this function.=0A= > =0A= > > + {=0A= > > + in_elf_path =3D in_elf_base + spec.in_elf_path;=0A= > > + }=0A= > > +=0A= > > + void=0A= > > + set_in_suppr_spec_path()=0A= > =0A= > Likewise.=0A= Ok,=0A= > > + {=0A= > > + if (spec.in_suppr_spec_path)=0A= > > + in_suppr_spec_path =3D in_elf_base + spec.in_suppr_spec_path;=0A= > > + else=0A= > > + in_suppr_spec_path.clear();=0A= > > + }=0A= > > +=0A= > > + void=0A= > > + set_in_public_headers_path()=0A= > =0A= > Likewise.=0A= Ok, =0A= > > + {=0A= > > + if (spec.in_public_headers_path)=0A= > > + in_public_headers_path =3D spec.in_public_headers_path;=0A= > > + if (!in_public_headers_path.empty())=0A= > > + in_public_headers_path =3D in_elf_base + spec.in_public_headers_= path;=0A= > > + }=0A= > > +=0A= > > + bool=0A= > > + set_out_abi_path()=0A= > =0A= > Likewise.=0A= Ok, =0A= > > + {=0A= > > + out_abi_path =3D out_abi_base + spec.out_abi_path;=0A= > > + if (!abigail::tools_utils::ensure_parent_dir_created(out_abi_path)= )=0A= > > + {=0A= > > + error_message =3D=0A= > > + string("Could not create parent directory for ") + out_abi= _path;=0A= > > + return false;=0A= > > + }=0A= > > + return true;=0A= > > + }=0A= > > +=0A= > > + void=0A= > > + set_in_abi_path()=0A= > =0A= > Likewise.=0A= Ok,=0A= > > + {=0A= > > + in_abi_path =3D in_abi_base + spec.in_abi_path;=0A= > > + }=0A= > > +=0A= > =0A= > [...]=0A= > =0A= > > + test_task(const InOutSpec &s,=0A= > > + string& a_out_abi_base,=0A= > > + string& a_in_elf_base,=0A= > > + string& a_in_abi_base);=0A= > > + bool=0A= > > + serialize_corpus(const string& out_abi_path,=0A= > > + corpus_sptr corp);=0A= > > + bool=0A= > > + run_abidw(const string& extargs =3D "");=0A= > > +=0A= > > + bool=0A= > > + run_diff();=0A= > > +=0A= > > + virtual=0A= > > + ~test_task()=0A= > > + {}=0A= > > +=0A= > > +}; // end struct test_task=0A= > > +=0A= > > +typedef shared_ptr test_task_sptr;=0A= > > +=0A= > > +struct options=0A= > > +{=0A= > =0A= > Please doxygen-document this struct.=0A= Ok,=0A= > > + string wrong_option;=0A= > > + bool parallel;=0A= > > +=0A= > > + options()=0A= > > + : parallel(true)=0A= > > + {}=0A= > > +=0A= > > + ~options()=0A= > > + {=0A= > > + }=0A= > > +};=0A= > =0A= > [...]=0A= > =0A= > > diff --git a/tests/test-read-ctf.cc b/tests/test-read-ctf.cc=0A= > =0A= > [...]=0A= > =0A= > =0A= > > +test_task_ctf::test_task_ctf(const InOutSpec &s,=0A= > > + string& a_out_abi_base,=0A= > > + string& a_in_elf_base,=0A= > > + string& a_in_abi_base)=0A= > =0A= > Please doxygen-document this function.=0A= Ok,=0A= > > + : test_task(s, a_out_abi_base, a_in_elf_base, a_in_abi_base)= =0A= > > + {}=0A= > > +=0A= > =0A= > [...]=0A= > =0A= > > +static test_task*=0A= > > +new_task(const InOutSpec* s, string& a_out_abi_base,=0A= > > + string& a_in_elf_base, string& a_in_abi_base)=0A= > =0A= > Please doxygen-document this function.=0A= Ok,=0A= > > +{=0A= > > + return new test_task_ctf(*s, a_in_abi_base,=0A= >=0A= > This 'a_in_abi_base' should be a_out_abi_base.=0A= Ok, sorry .. thanks! .. will be fixed in the next patch.=0A= > > + a_in_elf_base, a_in_abi_base);=0A= > > +}=0A= > =0A= > [...]=0A= > =0A= > =0A= > > diff --git a/tests/test-read-dwarf.cc b/tests/test-read-dwarf.cc=0A= > =0A= > [...]=0A= > =0A= > =0A= > > +static test_task*=0A= > > +new_task(const InOutSpec* s, string& a_out_abi_base,=0A= > > + string& a_in_elf_base, string& a_in_abi_base)=0A= > =0A= > Please doxygen-document this function.=0A= Ok,=0A= > > +{=0A= > > + return new test_task_dwarf(*s, a_in_abi_base,=0A= > =0A= > This 'a_in_abi_base' should be a_out_abi_base.=0A= agree, it will be fixed in the next patch.=0A= > > + a_in_elf_base, a_in_abi_base);=0A= > > +}=0A= > > =0A= > > int=0A= > > main(int argc, char *argv[])=0A= > > {=0A= > > bool no_parallel =3D false;=0A= will be removed in the next patch.=0A= > This variable is not unused.=0A= > =0A= > =0A= > Thanks for working on this. It's really appreciated!=0A= > =0A= > [...]=0A= > =0A= > Cheers,=0A= Thanks again,=0A= Guillermo=0A= =0A= =0A=