FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19180&edit=1

ID: 19180
Updated by: mike@silverorange.com
Reported By: mike at silverorange dot com
Summary: Test environment can't write to tmp
Status: Open
Type: Bug
Package: test
PHP Version: Irrelevant
Roadmap Versions:
New Comment:

Pull request for using system temp functions for tests:
https://github.com/pear/File_SearchReplace/pull/1


Previous Comments:
------------------------------------------------------------------------

[2012-01-02 23:52:12] gauthierm

Description:
------------
The File_SearchReplace tests use a temp file. It tries to write the temp
file to /tmp
(admittedly not using the correct functions for temporary files) but
write permissions
is disabled for the test user to /tmp.

Expected result:
----------------
The temp dir should be writeable by the test user. The tests should be
updated to use
proper tempfile functions.

Actual result:
--------------
Test output:

/var/lib/jenkins/workspace/File_SearchReplace/tests/01onefile.phpt
--- Expected
+++ Actual
@@ @@
-</td>
+Warning: fopen(/tmp/stripiframetest.html): failed to open stream:
Permission
denied in /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php
on line
76
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in

/var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
77
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in

/var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
78
+
+Warning: fopen(/tmp/tweakcopyright.php): failed to open stream:
Permission
denied in /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php
on line
103
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in

/var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
104
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in

/var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
105
+
+Warning: fopen(/tmp/File_SearchReplace/dir/tweakversion.phps): failed
to open
stream: Permission denied in
/var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
103
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in

/var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
104
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in

/var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
105
+
+Warning: fopen(/tmp/File_SearchReplace/empty.file): failed to open
stream:
Permission denied in
/var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
103
+
+Warning: fwrite() expects parameter 1 to be resource, boolean given in

/var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
104
+
+Warning: fclose() expects parameter 1 to be resource, boolean given in

/var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
105



... etc ...

------------------------------------------------------------------------

Search Discussions

  • Daniel Oconnor at Jan 3, 2012 at 10:31 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19180&edit=1

    ID: 19180
    Updated by: daniel.oconnor@gmail.com
    Reported By: mike at silverorange dot com
    Summary: Test environment can't write to tmp
    -Status: Open
    +Status: Closed
    Type: Bug
    Package: test
    PHP Version: Irrelevant
    -Assigned To:
    +Assigned To: doconnor
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Closed
    -Assigned To:
    +Assigned To: doconnor
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on pear.php.net
    by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.

    It's actually perhaps easier to do a pull request by itself (no bug) or
    one against the
    affected package. This test package is actually just an accident


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-01-03 00:04:26] gauthierm

    Pull request for using system temp functions for tests:
    https://github.com/pear/File_SearchReplace/pull/1

    ------------------------------------------------------------------------

    [2012-01-02 23:52:12] gauthierm

    Description:
    ------------
    The File_SearchReplace tests use a temp file. It tries to write the temp
    file to /tmp
    (admittedly not using the correct functions for temporary files) but
    write permissions
    is disabled for the test user to /tmp.

    Expected result:
    ----------------
    The temp dir should be writeable by the test user. The tests should be
    updated to use
    proper tempfile functions.

    Actual result:
    --------------
    Test output:

    /var/lib/jenkins/workspace/File_SearchReplace/tests/01onefile.phpt
    --- Expected
    +++ Actual
    @@ @@
    -</td>
    +Warning: fopen(/tmp/stripiframetest.html): failed to open stream:
    Permission
    denied in /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php
    on line
    76
    +
    +Warning: fwrite() expects parameter 1 to be resource, boolean given in

    /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
    77
    +
    +Warning: fclose() expects parameter 1 to be resource, boolean given in

    /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
    78
    +
    +Warning: fopen(/tmp/tweakcopyright.php): failed to open stream:
    Permission
    denied in /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php
    on line
    103
    +
    +Warning: fwrite() expects parameter 1 to be resource, boolean given in

    /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
    104
    +
    +Warning: fclose() expects parameter 1 to be resource, boolean given in

    /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
    105
    +
    +Warning: fopen(/tmp/File_SearchReplace/dir/tweakversion.phps): failed
    to open
    stream: Permission denied in
    /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
    103
    +
    +Warning: fwrite() expects parameter 1 to be resource, boolean given in

    /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
    104
    +
    +Warning: fclose() expects parameter 1 to be resource, boolean given in

    /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
    105
    +
    +Warning: fopen(/tmp/File_SearchReplace/empty.file): failed to open
    stream:
    Permission denied in
    /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
    103
    +
    +Warning: fwrite() expects parameter 1 to be resource, boolean given in

    /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
    104
    +
    +Warning: fclose() expects parameter 1 to be resource, boolean given in

    /var/lib/jenkins/workspace/File_SearchReplace/tests/setup.php on line
    105



    ... etc ...

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 2, '12 at 11:03p
activeJan 3, '12 at 10:31a
posts2
users2
websitepear.php.net

2 users in discussion

Daniel Oconnor: 1 post Mike: 1 post

People

Translate

site design / logo © 2021 Grokbase