public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ulf Samuelsson <binutils@emagii.com>
To: Nick Clifton <nickc@redhat.com>, binutils@sourceware.org
Subject: Re: [PATCH v4 2/5] CRC64 testsuite
Date: Tue, 28 Feb 2023 12:11:18 +0100	[thread overview]
Message-ID: <93a59bc2-c62f-c6c5-cee2-fa04ce6907d2@emagii.com> (raw)
In-Reply-To: <e361db21-95a6-c818-0ca0-84db3ca5c8d6@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2861 bytes --]


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 <binutils-build-dir>/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
>
>

  parent reply	other threads:[~2023-02-28 11:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-19 19:45 [PATCH v4 0/5 Add support for CRC64 generation in linker binutils
2023-02-19 19:45 ` [PATCH v4 1/5] CRC64 commands documentation binutils
2023-02-19 19:50   ` [PATCH v4 0/5] Add support for CRC64 generation in linker Ulf Samuelsson
2023-02-21 12:02     ` Nick Clifton
2023-02-21 13:10       ` Ulf Samuelsson
2023-02-21 13:30       ` Ulf Samuelsson
2023-02-21 12:53   ` [PATCH v4 1/5] CRC64 commands documentation Nick Clifton
2023-02-21 13:24     ` Ulf Samuelsson
2023-02-19 19:45 ` [PATCH v4 2/5] CRC64 testsuite binutils
2023-02-21 12:42   ` Nick Clifton
2023-02-21 15:13     ` Ulf Samuelsson
2023-02-23 10:10       ` Nick Clifton
2023-02-23 10:53         ` Ulf Samuelsson
2023-02-23 11:01           ` Nick Clifton
2023-02-28 11:11         ` Ulf Samuelsson [this message]
2023-02-28 12:37           ` Nick Clifton
2023-02-28 13:01             ` Ulf Samuelsson
2023-02-28 13:06               ` Nick Clifton
2023-02-28 14:24                 ` Ulf Samuelsson
2023-02-28 13:45             ` Ulf Samuelsson
2023-02-19 19:45 ` [PATCH v4 3/5] ldlex.l: CRC64 binutils
2023-02-19 19:45 ` [PATCH v4 4/5] ldgram.y: CRC64 binutils
2023-02-19 19:45 ` [PATCH v4 5/5] Calculate CRC64 over the .text area binutils
2023-02-21 13:26   ` Nick Clifton
2023-02-23  8:36     ` Ulf Samuelsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93a59bc2-c62f-c6c5-cee2-fa04ce6907d2@emagii.com \
    --to=binutils@emagii.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).