Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2025-04

Test fix

6 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

J. Gareth Moreton

Hi everyone,

I just fixed an issue with tests/bench/bfloatfunc.pp over at https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/996 failing due to the reduced iteration count.  I've increased it from 1 to 8 when in conformance mode (in IN_TESTS defined), since if it's less than that, not all of the tests get executed and, as a consequence, many of the results are uninitialised and cause false failures.

Just wanted to verify that it's good to merge since I'm reluctant to press Merge myself without approval.

Kit

This email has been checked for viruses by Avast antivirus software. www.avast.com

Reply by email

Pierre Muller
to J. Gareth Moreton

Hi,

I add the IN_TESTS conditional code to avoid getting timeout related failures, inside testsuite.

I didn't notice that more than one iteration was needed for bfloatfunc.pp, because I tried it with ITERATIONS=1 and it seemed to finish without failure...

I have no objection to your patch, please go ahead and commit.

For tests/bench/bcase.pp, I had to set ITERATIONS To $10000 to avoid errors...

Just one small remark: why do you use '$8' instead of simply '8'?

Pierre

Le 25/04/2025 à 21:52, J. Gareth Moreton via fpc-devel a écrit :

Show quoted text 15 lines
Hi everyone, I just fixed an issue with tests/bench/bfloatfunc.pp over at https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/996 failing due to the reduced iteration count.  I've increased it from 1 to 8 when in conformance mode (in IN_TESTS defined), since if it's less than that, not all of the tests get executed and, as a consequence, many of the results are uninitialised and cause false failures. Just wanted to verify that it's good to merge since I'm reluctant to press Merge myself without approval. Kit

Reply by email

J. Gareth Moreton
to Pierre Muller

"Just one small remark: why do you use '$8' instead of simply '8'?"

Mostly habit because the tests use "Iteration and 7" to select the index, so I use $8 for the count to indicate that the bitwise nature of it is important.

Kit

Pierre Muller wrote 42 lines
Hi,   I add the IN_TESTS conditional code to avoid getting timeout related failures, inside testsuite.   I didn't notice that more than one iteration was needed for bfloatfunc.pp, because I tried it with ITERATIONS=1 and it seemed to finish without failure...   I have no objection to your patch, please go ahead and commit. For tests/bench/bcase.pp, I had to set ITERATIONS To $10000 to avoid errors...   Just one small remark: why do you use '$8' instead of simply '8'? Pierre Le 25/04/2025 à 21:52, J. Gareth Moreton via fpc-devel a écrit : > Hi everyone, > > I just fixed an issue with tests/bench/bfloatfunc.pp over at > https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/996 > failing due to the reduced iteration count.  I've increased it from 1 to > 8 when in conformance mode (in IN_TESTS defined), since if it's less > than that, not all of the tests get executed and, as a consequence, many > of the results are uninitialised and cause false failures. > > Just wanted to verify that it's good to merge since I'm reluctant to > press Merge myself without approval. > > Kit > > _______________________________________________ fpc-devel maillist  -  https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
This email has been checked for viruses by Avast antivirus software. www.avast.com

Reply by email

J. Gareth Moreton
to J. Gareth Moreton

If it's okay, can I rename the define from "IN_TESTS" to "CONFORMANCE" or similar?  Technically, the code in "bcase" and "bfloatfunc" are still tests, but by default are benchmarking tests evaluating performace rather than conformance tests verifying that the compiler has produced correct code.

Kit

J. Gareth Moreton wrote 54 lines
"Just one small remark: why do you use '$8' instead of simply '8'?" Mostly habit because the tests use "Iteration and 7" to select the index, so I use $8 for the count to indicate that the bitwise nature of it is important. Kit On 25/04/2025 21:31, Pierre Muller via fpc-devel wrote: > Hi, > >   I add the IN_TESTS conditional code to avoid getting timeout > related failures, > inside testsuite. > >   I didn't notice that more than one iteration was needed for > bfloatfunc.pp, > because I tried it with ITERATIONS=1 and it seemed to finish without > failure... > >   I have no objection to your patch, please go ahead and commit. > > For tests/bench/bcase.pp, I had to set ITERATIONS To $10000 > to avoid errors... > >   Just one small remark: why do you use '$8' instead of simply '8'? > > Pierre > > > Le 25/04/2025 à 21:52, J. Gareth Moreton via fpc-devel a écrit : >> Hi everyone, >> >> I just fixed an issue with tests/bench/bfloatfunc.pp over at >> https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/996 >> failing due to the reduced iteration count.  I've increased it from >> 1 to >> 8 when in conformance mode (in IN_TESTS defined), since if it's less >> than that, not all of the tests get executed and, as a consequence, >> many >> of the results are uninitialised and cause false failures. >> >> Just wanted to verify that it's good to merge since I'm reluctant to >> press Merge myself without approval. >> >> Kit >> >> > > _______________________________________________ > fpc-devel maillist  -  > https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel >
This email has been checked for viruses by Avast antivirus software. www.avast.com

Reply by email

Pierre Muller
to J. Gareth Moreton

You can do that if you want,

maybe it would also be better to avoid all benchmark results writing in this conformance configuration as there is not enough averaging, and because in many cases the time interval is too short to get any value.

Pierre

Le 26/04/2025 à 23:50, J. Gareth Moreton via fpc-devel a écrit :

Show quoted text 64 lines
If it's okay, can I rename the define from "IN_TESTS" to "CONFORMANCE" or similar?  Technically, the code in "bcase" and "bfloatfunc" are still tests, but by default are benchmarking tests evaluating performace rather than conformance tests verifying that the compiler has produced correct code. Kit On 25/04/2025 22:00, J. Gareth Moreton via fpc-devel wrote: > "Just one small remark: why do you use '$8' instead of simply '8'?" > > Mostly habit because the tests use "Iteration and 7" to select the > index, so I use $8 for the count to indicate that the bitwise nature > of it is important. > > Kit > > On 25/04/2025 21:31, Pierre Muller via fpc-devel wrote: >> Hi, >> >>   I add the IN_TESTS conditional code to avoid getting timeout >> related failures, >> inside testsuite. >> >>   I didn't notice that more than one iteration was needed for >> bfloatfunc.pp, >> because I tried it with ITERATIONS=1 and it seemed to finish without >> failure... >> >>   I have no objection to your patch, please go ahead and commit. >> >> For tests/bench/bcase.pp, I had to set ITERATIONS To $10000 >> to avoid errors... >> >>   Just one small remark: why do you use '$8' instead of simply '8'? >> >> Pierre >> >> >> Le 25/04/2025 à 21:52, J. Gareth Moreton via fpc-devel a écrit : >>> Hi everyone, >>> >>> I just fixed an issue with tests/bench/bfloatfunc.pp over at >>> https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/996 >>> failing due to the reduced iteration count.  I've increased it from >>> 1 to >>> 8 when in conformance mode (in IN_TESTS defined), since if it's less >>> than that, not all of the tests get executed and, as a consequence, >>> many >>> of the results are uninitialised and cause false failures. >>> >>> Just wanted to verify that it's good to merge since I'm reluctant to >>> press Merge myself without approval. >>> >>> Kit >>> >>> >> >> _______________________________________________ >> fpc-devel maillist  -  >> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel >> >

Reply by email

J. Gareth Moreton
to Pierre Muller

That sounds like a good idea.  Let me see what I can do.

Kit

Pierre Muller wrote 80 lines
You can do that if you want, maybe it would also be better to avoid all benchmark results writing in this conformance configuration as there is not enough averaging, and because in many cases the time interval is too short to get any value. Pierre Le 26/04/2025 à 23:50, J. Gareth Moreton via fpc-devel a écrit : > If it's okay, can I rename the define from "IN_TESTS" to "CONFORMANCE" > or similar?  Technically, the code in "bcase" and "bfloatfunc" are still > tests, but by default are benchmarking tests evaluating performace > rather than conformance tests verifying that the compiler has produced > correct code. > > Kit > > On 25/04/2025 22:00, J. Gareth Moreton via fpc-devel wrote: >> "Just one small remark: why do you use '$8' instead of simply '8'?" >> >> Mostly habit because the tests use "Iteration and 7" to select the >> index, so I use $8 for the count to indicate that the bitwise nature >> of it is important. >> >> Kit >> >> On 25/04/2025 21:31, Pierre Muller via fpc-devel wrote: >>> Hi, >>> >>>    I add the IN_TESTS conditional code to avoid getting timeout >>> related failures, >>> inside testsuite. >>> >>>    I didn't notice that more than one iteration was needed for >>> bfloatfunc.pp, >>> because I tried it with ITERATIONS=1 and it seemed to finish without >>> failure... >>> >>>    I have no objection to your patch, please go ahead and commit. >>> >>> For tests/bench/bcase.pp, I had to set ITERATIONS To $10000 >>> to avoid errors... >>> >>>    Just one small remark: why do you use '$8' instead of simply '8'? >>> >>> Pierre >>> >>> >>> Le 25/04/2025 à 21:52, J. Gareth Moreton via fpc-devel a écrit : >>>> Hi everyone, >>>> >>>> I just fixed an issue with tests/bench/bfloatfunc.pp over at >>>> https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/996 >>>> failing due to the reduced iteration count.  I've increased it from >>>> 1 to >>>> 8 when in conformance mode (in IN_TESTS defined), since if it's less >>>> than that, not all of the tests get executed and, as a consequence, >>>> many >>>> of the results are uninitialised and cause false failures. >>>> >>>> Just wanted to verify that it's good to merge since I'm reluctant to >>>> press Merge myself without approval. >>>> >>>> Kit >>>> >>>> >>> >>> _______________________________________________ >>> fpc-devel maillist  -  >>> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel >>> >> > _______________________________________________ fpc-devel maillist  -  https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
This email has been checked for viruses by Avast antivirus software. www.avast.com

Reply by email