php-src icon indicating copy to clipboard operation
php-src copied to clipboard

Test Zend/tests/concat_003.phpt fails on slow machine

Open Xeonacid opened this issue 4 years ago • 3 comments

Description

I'm using a SiFive Unmatched RISC-V board running Arch Linux RISC-V. It needs about 1.2s to finish the Zend/tests/concat_003.phpt, so it fails sadly.

Could you change this line https://github.com/php/php-src/blob/master/Zend/tests/concat_003.phpt#L14 to something longer like 2.0 for such slow machines?

Xeonacid avatar Jan 23 '22 01:01 Xeonacid

If you're running on a slow system then what about using SKIP_PERF_SENSITIVE?

damianwadley avatar Jan 23 '22 01:01 damianwadley

@damianwadley https://github.com/php/php-src/blob/master/Zend/tests/concat_003.phpt#L13 says so the worst case and also count in slow machines, so I think it might be better to make it a little longer?

Xeonacid avatar Jan 23 '22 02:01 Xeonacid

That test is to ensure that concatenating lots of small allocations is not too slow. Catering to occassionally used very slow machines can easily hide real performance regressions. On AppVeyor CI, the test takes about 0.33 seconds; not sure about the performance on other CI, but obviously also less than a second.

Like @damianwadley said, set SKIP_PERF_SENSITIVE, don't run the test at all, or patch it for your system.

cmb69 avatar Jan 23 '22 17:01 cmb69