Skip to content

encryption PHP unit tests fail #315

@phil-davis

Description

@phil-davis

https://drone.owncloud.com/owncloud/encryption/2223/4/4

7.4: Pulling from owncloudci/php
Digest: sha256:ccda771b8c1582336b853aceb9959e842f125d6d51a65f5ecde50a070675aaed
Status: Image is up to date for owncloudci/php:7.4
+ make test-php-unit-dbg
phpdbg -qrr -d memory_limit=4096M -d zend.enable_gc=0 "../../lib/composer/bin/phpunit" --configuration ./phpunit.xml --testsuite unit
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Runtime:       PHPDBG 7.4.27
Configuration: ./phpunit.xml

FFF............................................................  63 / 259 ( 24%)
............................................................... 126 / 259 ( 48%)
............................................................... 189 / 259 ( 72%)
............................................................... 252 / 259 ( 97%)
.......                                                         259 / 259 (100%)

Time: 00:11.840, Memory: 554.42 MB

There were 3 failures:

1) OCA\Encryption\Tests\Command\FixEncryptedVersionTest::testEncryptedVersionIsNotZero
Failed asserting that 'Verifying the content of file /test_enc_version_affected_user1/files/hello.txt\n
The file /test_enc_version_affected_user1/files/hello.txt is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/ownCloud Manual.pdf\n
The file /test_enc_version_affected_user1/files/ownCloud Manual.pdf is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/world.txt\n
The file /test_enc_version_affected_user1/files/world.txt is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/Photos/Lake-Constance.jpg\n
The file /test_enc_version_affected_user1/files/Photos/Lake-Constance.jpg is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/Photos/Portugal.jpg\n
The file /test_enc_version_affected_user1/files/Photos/Portugal.jpg is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/Photos/Teotihuacan.jpg\n
The file /test_enc_version_affected_user1/files/Photos/Teotihuacan.jpg is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/Documents/Example.odt\n
The file /test_enc_version_affected_user1/files/Documents/Example.odt is: OK\n
' contains "Verifying the content of file /test_enc_version_affected_user1/files/hello.txt
Attempting to fix the path: /test_enc_version_affected_user1/files/hello.txt
Increment the encrypted version to 1
The file /test_enc_version_affected_user1/files/hello.txt is: OK
Fixed the file: /test_enc_version_affected_user1/files/hello.txt with version 1".

/var/www/owncloud/server/apps/encryption/tests/unit/Command/FixEncryptedVersionTest.php:136

2) OCA\Encryption\Tests\Command\FixEncryptedVersionTest::testEncryptedVersionLessThanOriginalValue
Failed asserting that 'Verifying the content of file /test_enc_version_affected_user1/files/foo.txt\n
The file /test_enc_version_affected_user1/files/foo.txt is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/hello.txt\n
Attempting to fix the path: /test_enc_version_affected_user1/files/hello.txt\n
Decrement the encrypted version to 1\n
Increment the encrypted version to 3\n
Increment the encrypted version to 4\n
Increment the encrypted version to 5\n
The file /test_enc_version_affected_user1/files/hello.txt is: OK\n
Fixed the file: /test_enc_version_affected_user1/files/hello.txt with version 5\n
Verifying the content of file /test_enc_version_affected_user1/files/ownCloud Manual.pdf\n
The file /test_enc_version_affected_user1/files/ownCloud Manual.pdf is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/world.txt\n
Attempting to fix the path: /test_enc_version_affected_user1/files/world.txt\n
Increment the encrypted version to 2\n
Increment the encrypted version to 3\n
Increment the encrypted version to 4\n
Increment the encrypted version to 5\n
The file /test_enc_version_affected_user1/files/world.txt is: OK\n
Fixed the file: /test_enc_version_affected_user1/files/world.txt with version 5\n
Verifying the content of file /test_enc_version_affected_user1/files/Photos/Lake-Constance.jpg\n
The file /test_enc_version_affected_user1/files/Photos/Lake-Constance.jpg is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/Photos/Portugal.jpg\n
The file /test_enc_version_affected_user1/files/Photos/Portugal.jpg is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/Photos/Teotihuacan.jpg\n
The file /test_enc_version_affected_user1/files/Photos/Teotihuacan.jpg is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/Documents/Example.odt\n
The file /test_enc_version_affected_user1/files/Documents/Example.odt is: OK\n
' contains "Verifying the content of file /test_enc_version_affected_user1/files/hello.txt
Attempting to fix the path: /test_enc_version_affected_user1/files/hello.txt
Decrement the encrypted version to 1
Increment the encrypted version to 3
Increment the encrypted version to 4
Increment the encrypted version to 5
Increment the encrypted version to 6
The file /test_enc_version_affected_user1/files/hello.txt is: OK
Fixed the file: /test_enc_version_affected_user1/files/hello.txt with version 6".

/var/www/owncloud/server/apps/encryption/tests/unit/Command/FixEncryptedVersionTest.php:194

3) OCA\Encryption\Tests\Command\FixEncryptedVersionTest::testEncryptedVersionGreaterThanOriginalValue
Failed asserting that 'Verifying the content of file /test_enc_version_affected_user1/files/foo.txt\n
The file /test_enc_version_affected_user1/files/foo.txt is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/hello.txt\n
Attempting to fix the path: /test_enc_version_affected_user1/files/hello.txt\n
Decrement the encrypted version to 14\n
Decrement the encrypted version to 13\n
Decrement the encrypted version to 12\n
Decrement the encrypted version to 11\n
Decrement the encrypted version to 10\n
Decrement the encrypted version to 9\n
Decrement the encrypted version to 8\n
The file /test_enc_version_affected_user1/files/hello.txt is: OK\n
Fixed the file: /test_enc_version_affected_user1/files/hello.txt with version 8\n
Verifying the content of file /test_enc_version_affected_user1/files/ownCloud Manual.pdf\n
The file /test_enc_version_affected_user1/files/ownCloud Manual.pdf is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/world.txt\n
Attempting to fix the path: /test_enc_version_affected_user1/files/world.txt\n
Decrement the encrypted version to 14\n
Decrement the encrypted version to 13\n
Decrement the encrypted version to 12\n
Decrement the encrypted version to 11\n
Decrement the encrypted version to 10\n
Decrement the encrypted version to 9\n
The file /test_enc_version_affected_user1/files/world.txt is: OK\n
Fixed the file: /test_enc_version_affected_user1/files/world.txt with version 9\n
Verifying the content of file /test_enc_version_affected_user1/files/Photos/Lake-Constance.jpg\n
The file /test_enc_version_affected_user1/files/Photos/Lake-Constance.jpg is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/Photos/Portugal.jpg\n
The file /test_enc_version_affected_user1/files/Photos/Portugal.jpg is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/Photos/Teotihuacan.jpg\n
The file /test_enc_version_affected_user1/files/Photos/Teotihuacan.jpg is: OK\n
Verifying the content of file /test_enc_version_affected_user1/files/Documents/Example.odt\n
The file /test_enc_version_affected_user1/files/Documents/Example.odt is: OK\n
' contains "Verifying the content of file /test_enc_version_affected_user1/files/hello.txt
Attempting to fix the path: /test_enc_version_affected_user1/files/hello.txt
Decrement the encrypted version to 14
Decrement the encrypted version to 13
Decrement the encrypted version to 12
Decrement the encrypted version to 11
Decrement the encrypted version to 10
Decrement the encrypted version to 9
The file /test_enc_version_affected_user1/files/hello.txt is: OK
Fixed the file: /test_enc_version_affected_user1/files/hello.txt with version 9".

/var/www/owncloud/server/apps/encryption/tests/unit/Command/FixEncryptedVersionTest.php:260

FAILURES!
Tests: 259, Assertions: 742, Failures: 3.

This started happening on the nightly CI from 2021-12-22 AM. I suspect that core release-10.9.0 was merged back on 2021-12-21, and some change in core master is causing this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions