[PATCH v4 2/5] CRC64 testsuite
Ulf Samuelsson
binutils@emagii.com
Tue Feb 28 11:11:18 GMT 2023
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
>
>
More information about the Binutils
mailing list