php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74082 strncmp_variation6 test fails on AArch64
Submitted: 2017-02-10 21:01 UTC Modified: 2018-11-29 22:51 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: edward dot vielmetti at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Testing related
PHP Version: 7.1.1 OS: Ubuntu 16.04 LTS on aarch64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: edward dot vielmetti at gmail dot com
New email:
PHP Version: OS:

 

 [2017-02-10 21:01 UTC] edward dot vielmetti at gmail dot com
Description:
------------
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test strncmp() function : usage variations - binary safe(binary values) [ext/standard/tests/strings/strncmp_variation6.phpt]

"make test" fails this one test on aarch64 (ARMv8, arm64) on Packet 2A 96-core system.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-10 21:19 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2017-02-10 21:19 UTC] nikic@php.net
What's the diff? (ext/standard/tests/strings/strncmp_variation6.diff)
 [2017-02-10 21:42 UTC] edward dot vielmetti at gmail dot com
-Status: Feedback +Status: Open
 [2017-02-10 21:42 UTC] edward dot vielmetti at gmail dot com
root@docker-build-test:/mnt/src/php/php-7.1.1/ext/standard/tests/strings# more strncmp*diff
774+ int(128)
774- int(1)
 [2018-07-16 13:12 UTC] cmb@php.net
This test[1] confuses binary strings and binary numbers, and
should better be rewritten or dropped, anyway.

Furthermore, and this is might be the reason for the reported test
failure, the test assumes that strncmp() would return exactly 1,
if the first string is greater than the second, but strncmp() only
guarantees that a positive integer is returned in this case.

[1] <https://github.com/php/php-src/blob/php-7.1.1/ext/standard/tests/strings/strncmp_variation6.phpt>
 [2018-11-29 22:18 UTC] nikic@php.net
-Summary: Test strncmp() function : usage variations - binary safe(binary values) +Summary: strncmp_variation6 test fails on AArch64
 [2018-11-29 22:51 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2018-11-29 22:51 UTC] cmb@php.net
As discussed on PR #3689[1], the pointless test has been dropped
altogether[2].

[1] <https://github.com/php/php-src/pull/3689>
[2] <http://git.php.net/?p=php-src.git;a=commit;h=ea1ea33bd5d967e9c04046c1af869e4e8b53116e>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 07:01:27 2024 UTC