From:  pear-qa@lists.php.net ("freddy@snarl.nl")
Date:  14 Sep 2017 05:04:11 Hong Kong Time
Newsgroup:  news.php.net/php.pear.bugs
Subject:  

[PEAR-BUG] Bug #21242 [Com]: PHPUnit tests fail sometimes while deleting S.gpg-agent.extra.

NNTP-Posting-Host:  null

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

 ID:               21242
 Comment by:       freddy at snarl dot nl
 Reported By:      freddy at snarl dot nl
 Summary:          PHPUnit tests fail sometimes while deleting
                    S.gpg-agent.extra.
 Status:           Open
 Type:             Bug
 Package:          Crypt_GPG
 Operating System: Debian GNU/Linux
 Package Version:  1.6.2
 PHP Version:      Irrelevant
 Roadmap Versions: 
 New Comment:

Example output of the problem:

phpunit --include-path Crypt_GPG-*/ Crypt_GPG-*/tests --exclude-group
write
PHPUnit 5.4.6 by Sebastian Bergmann and contributors.

....................................E..................S.......  63 /
292 ( 21%)
............................................................... 126 /
292 ( 43%)
.............................SSSSSSSS.......................... 189 /
292 ( 64%)
...E.....E..................................................... 252 /
292 ( 86%)
........................................                        292 /
292 (100%)

Time: 2.64 minutes, Memory: 10.00MB

There were 3 errors:

1) DecryptTestCase::testDecryptDualOnePassphrase
unlink(/home/freddy/foo/php-crypt-gpg-1.6.0/Crypt_GPG-1.6.0/tests/test-keychain/S.gpg-agent.extra):
No such file or directory

/home/freddy/foo/php-crypt-gpg-1.6.0/Crypt_GPG-1.6.0/tests/TestCase.php:598
/home/freddy/foo/php-crypt-gpg-1.6.0/Crypt_GPG-1.6.0/tests/TestCase.php:567

2) SignTestCase::testSignFileNormal
unlink(/home/freddy/foo/php-crypt-gpg-1.6.0/Crypt_GPG-1.6.0/tests/test-keychain/S.gpg-agent.extra):
No such file or directory

/home/freddy/foo/php-crypt-gpg-1.6.0/Crypt_GPG-1.6.0/tests/TestCase.php:598
/home/freddy/foo/php-crypt-gpg-1.6.0/Crypt_GPG-1.6.0/tests/TestCase.php:567

3) SignTestCase::testSignFileDualClear
unlink(/home/freddy/foo/php-crypt-gpg-1.6.0/Crypt_GPG-1.6.0/tests/test-keychain/S.gpg-agent.extra):
No such file or directory

/home/freddy/foo/php-crypt-gpg-1.6.0/Crypt_GPG-1.6.0/tests/TestCase.php:598
/home/freddy/foo/php-crypt-gpg-1.6.0/Crypt_GPG-1.6.0/tests/TestCase.php:567

ERRORS!
Tests: 292, Assertions: 910, Errors: 3, Skipped: 9.


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

[2017-09-13 16:58:27] snarlistic

Added #patch bug:21242;patch:php-crypt-gpg.patch;revision:1505336307;.

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

[2017-09-13 16:55:31] snarlistic

Description:
------------
Sometimes the PHPUnit tests fail while deleting S.gpg-agent.extra. I've

created a work-around that first tests if the file exists before
deleting it. 
Please find the patch attached.

I've tried to built version 1.6.0, which is part of Debian Testing, but

confirmed the problem exists in version 1.6.2 too.

Test script:
---------------
Within Debian running dpkg-buildpackage will for me produce the problem
3 out of 4 times.

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


-- 
Edit this bug report at https://pear.php.net/bugs/bug.php?id=21242&edit=1