php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80139 ext/standard/tests/file/copy_variation5.phpt fails when run on bind mount
Submitted: 2020-09-22 19:46 UTC Modified: 2020-09-23 10:15 UTC
From: sigsegv at makadev dot de Assigned: cmb (profile)
Status: Closed Package: Testing related
PHP Version: 8.0Git-2020-09-22 (Git) OS: debian:buster (docker container)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sigsegv at makadev dot de
New email:
PHP Version: OS:

 

 [2020-09-22 19:46 UTC] sigsegv at makadev dot de
Description:
------------
The following test fails when run inside a case insensitive bind mounted filesystem (f.e. inside a container):

Test copy() function: usage variations - destination file names(case sensitive) [ext/standard/tests/file/copy_variation5.phpt]

This both happens when running the test inside a filesystem mounting a Windows NFS path into the container and when mounting a MacOS APFS path into the container. This most likely happens with other filesystem too since there is no guarantee that a linux mounted filesystem is case sensitive.

Expected result:
----------------
test should be skipped if the filesystem it is run on is case insensitive

Actual result:
--------------
================================================================================
/workspace/php-src/ext/standard/tests/file/copy_variation5.phpt
================================================================================
*** Test copy() function: checking case sensitivity in creation of destination file names ***
Size of the source file before copy operation => int(1500)

-- Now applying copy() on source file to create copies --
-- Iteration 1 --
Copy operation => bool(true)
Existence of destination file => bool(true)
Destination file name => /workspace/php-src/ext/standard/tests/file/COPY.tmp
Size of source file => int(1500)
Size of destination file => int(1500)

-- Iteration 2 --
Copy operation => bool(true)
Existence of destination file => bool(true)
Destination file name => /workspace/php-src/ext/standard/tests/file/COPY.TMP
Size of source file => int(1500)
Size of destination file => int(1500)

-- Iteration 3 --
Copy operation => bool(true)
Existence of destination file => bool(true)
Destination file name => /workspace/php-src/ext/standard/tests/file/CopY.TMP
Size of source file => int(1500)
Size of destination file => int(1500)

Warning: unlink(/workspace/php-src/ext/standard/tests/file/COPY.TMP): No such file or directory in /workspace/php-src/ext/standard/tests/file/copy_variation5.php on line 56

Warning: unlink(/workspace/php-src/ext/standard/tests/file/CopY.TMP): No such file or directory in /workspace/php-src/ext/standard/tests/file/copy_variation5.php on line 56
*** Done ***
================================================================================
--
     Existence of destination file => bool(true)
     Destination file name => %s/CopY.TMP
     Size of source file => int(1500)
025+ 
026+ Warning: unlink(/workspace/php-src/ext/standard/tests/file/COPY.TMP): No such file or directory in /workspace/php-src/ext/standard/tests/file/copy_variation5.php on line 56
027+ 
028+ Warning: unlink(/workspace/php-src/ext/standard/tests/file/CopY.TMP): No such file or directory in /workspace/php-src/ext/standard/tests/file/copy_variation5.php on line 56
     *** Done ***
================================================================================


--

/proc/mounts entry on MacOS Host (docker via W);
osxfs /workspace fuse.osxfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,max_read=1048576 0 0

/proc/mounts entry with Windows Host (docker via WSL2):
F:\134 /workspace 9p rw,dirsync,noatime,aname=drvfs;path=F:\;uid=0;gid=0;metadata;symlinkroot=/mnt/host,mmap,access=client,msize=65536,trans=fd,rfd=8,wfd=8 0 0


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-23 10:15 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1fcd6cdbb8927c7f770520f2cd4362015efce91d
Log: Fix #80139: copy_variation5.phpt fails when run on bind mount
 [2020-09-23 10:15 UTC] cmb@php.net
-Status: Open +Status: Closed
 [2020-09-23 10:15 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 07:01:32 2024 UTC