ZF-3147: Unit test failures on Linux when run as root

Issue Type: Unit Tests: Problem Created: 2008-04-18T15:08:07.000+0000 Last Updated: 2008-09-02T10:39:24.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Darby Felton (darby) Assignee: Nico Edtinger (nico) Tags: - Zend_Mail

Related issues: Attachments:


Results from PHP 5.2.5 on Linux (run as root):

<pre class="literal">
2) testSleepWakeRemoved(Zend_Mail_MboxTest)
no exception while waking with non readable file

3) testNotReadableFolder(Zend_Mail_MboxFolderTest)
no exception while loading invalid dir with subfolder not readable


Posted by Wil Sinclair (wil) on 2008-04-18T15:48:53.000+0000

Please evaluate and categorize/assign as necessary.

Posted by Nico Edtinger (nico) on 2008-04-22T10:49:32.000+0000

I don't know if the tests should run as root, but there might be a situation where you have to.

The problem is the code checks after an unserialize if the file can still be read and as root can always read everything we can't test the error handling.

I thought of the three possibilities, two of them are dropping privileges and forking and dropping. Both are things that should be solved in the TestHelper if we want everything to work as root. Now the test is just marked as skipped if it fails and you're root.

Of course the test could still fail if you have a different superuser with an userid != 0. But that might not be the best user to test as your webserver or mail scripts shouldn't run as that user.

Posted by Wil Sinclair (wil) on 2008-09-02T10:39:24.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.