From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id 934143858D33 for ; Tue, 28 Feb 2023 11:11:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 934143858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=emagii.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emagii.com Received: from [10.175.196.145] (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id AAA92120265; Tue, 28 Feb 2023 12:11:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1677582685; bh=MTH2m5u42HmGTprXSJbunkohsa+XyWbAubYNxhKv0fs=; h=Subject:To:From; b=VY0Ce9D0MnZNzG/6zfZnq0WOw/04quL7O5q49axgq2bP58h3pMJ1MAqstr4jpcZhw hhnRUwnllFEbHYLx/iYftSMDQjv7saqcRSyyeAFLs2U2DaMITGZ0P7nkUknYBULcsa rYGEtShZz4gAE6uAK6o3yL+Hj8RvbzKDzFQq3zKs= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 84.55.68.216) smtp.mailfrom=binutils@emagii.com smtp.helo=[10.175.196.145] Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) Content-Type: multipart/alternative; boundary="------------kqyhacX8TPvZRO26634lL73Q" Message-ID: <93a59bc2-c62f-c6c5-cee2-fa04ce6907d2@emagii.com> Date: Tue, 28 Feb 2023 12:11:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v4 2/5] CRC64 testsuite Content-Language: en-US To: Nick Clifton , binutils@sourceware.org References: <20230219194549.22554-1-binutils@emagii.com> <20230219194549.22554-3-binutils@emagii.com> <8ebc68e1-25a1-84ef-295f-3e545ced39d0@redhat.com> <1b334d25-10ee-cd05-b2d8-20143ee118a5@emagii.com> From: Ulf Samuelsson In-Reply-To: X-PPP-Message-ID: <167758268556.3316500.16737651248920708652@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,NICE_REPLY_A,SPF_HELO_FAIL,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: This is a multi-part message in MIME format. --------------kqyhacX8TPvZRO26634lL73Q Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2023-02-23 11:10, Nick Clifton wrote: > Hi Ulf, > > >>> Did you actually try running these new tests ? >>> >> No, I am yet to learn how to do the tests >> so I hoped that copying the the resulting text segment >> would be sufficient, and if not, someone would tell me. >> >> Is there any documentation on how to run the tests? > > Just run "make check".  (In the top level directory where > you built the binutils). > > Or if you only want to run one specific testsuite, eg the > linker testsuite then change into the relevant directory and > run "make check" > > Or, if you only want to run a sub-set of a specific testsuite > then use the RUNTESTFLAGS option to specify the test script > you want to run.  For example if you only want to run the > linker script tests then: > >   % cd /ld >   & make check RUNTESTFLAGS="ld-scripts/script.exp" > > Note - when you are creating a patch that affects generic > binutils code, such as your CRC64 patch series, it is a good > idea to test multiple versions of the binutils each built for > a different target architecture.  At a minimum I would suggest > using builds configure with: > >   --target=x86_64-pc-linux-gnu >   --target=x86_64-w64-mingw32 >   --target=aarch64-linux-gnu >   --target=powerpc64-linux-gnu >   --target=mips-elf >   --enable-targets=all --enable-64-bit-bfd Hi, Have been busy digging through various variants of CRC algorithms which is not so easy. Have come to the point that I can generate valid CRCs for * CRC64-ECMA * CRC64-ISO * CRC64-WE * CRC64-XZ * CRC64-POLY * CRC32 * CRC32-POLY The POLY variants can configure * Size (32 or 64 bit) * Polynome * Input Value * XOR value * input reflection (bitswap) * output reflection (bitswap) * reciprocal I test this by using the polynomes for CRC64-ECMA and CRC32. The main issue remaining is handling byte endianess. Status right now:   --target=x86_64-pc-linux-gnu                     WORKS   --target=x86_64-w64-mingw32                   FAILS  - simple failure due to SIZE_OF_HEADERS differ.   --target=aarch64-linux-gnu                        WORKS   --target=powerpc64-linux-gnu                   FAILS   - Byte Endianess   --target=mips-elf                                        FAILS   - Byte Endianess   --enable-targets=all --enable-64-bit-bfd    WORKS If the build machine and target machine has the same endianess, there is no problem, but if they differ it fail. The problem is that the CRC value and the TABLE will look different when running the test suite. * Is there a way to select one of two tests within the test framework    based on endianess of the build and target machines? Best Regards Ulf Samuelsson > > Cheers >   Nick > > --------------kqyhacX8TPvZRO26634lL73Q--