Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 649440 - dev-util/ccache-3.3.4-r1: fails cleanup tests on fancy filesystems
Summary: dev-util/ccache-3.3.4-r1: fails cleanup tests on fancy filesystems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://github.com/ccache/ccache/issu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-03 08:59 UTC by Michał Górny
Modified: 2019-07-19 22:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-util:ccache-3.3.4-r1:20180303-085544.log (dev-util:ccache-3.3.4-r1:20180303-085544.log,19.94 KB, text/plain)
2018-03-03 08:59 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-03-03 08:59:34 UTC
Created attachment 522040 [details]
dev-util:ccache-3.3.4-r1:20180303-085544.log

Running test suite cleanup....
FAILED

Test suite:     cleanup
Test case:      Forced cache cleanup, size limit
Failure reason: Found 10 (expected 3) *.o files in /var/tmp/portage/dev-util/ccache-3.3.4-r1/work/ccache-3.3.4/testdir.25568/.ccache

ccache -s:
cache directory                     /var/tmp/portage/dev-util/ccache-3.3.4-r1/work/ccache-3.3.4/testdir.25568/.ccache
primary config                      /var/tmp/portage/dev-util/ccache-3.3.4-r1/work/ccache-3.3.4/testdir.25568/ccache.conf
secondary config      (readonly)    
cache hit (direct)                     0
cache hit (preprocessed)               0
cache miss                             0
cache hit rate                      0.00 %
cleanups performed                     0
files in cache                        30
cache size                           0.0 kB
max cache size                     256.0 kB


Looks like the test relies on filesystem taking space use straightforward. For this reason, the test fails on 'smarter' filesystems such as btrfs or zfs (it succeeds e.g. on tmpfs).
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-01-27 21:10:14 UTC
Works fine here for non-compressed btrfs:
    /dev/sda3 on / type btrfs (rw,noatime,nodiratime,thread_pool=4,space_cache,subvolid=5,subvol=/)

Does it still happen on any of ccache versions? What are mount options for the filesystem?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-01-28 03:50:34 UTC
Nope, I can't reproduce it right now.  Though I suppose it might have been semi-random.  And yes, I've been using compress=lzo at the time.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-02 23:39:50 UTC
> Test suite:     [1;37mcleanup[0;0m
> Test case:      [1;37mForced cache cleanup, size limit[0;0m
> Failure reason: [1;31mFound 10 (expected 3) *.o files in /var/tmp/portage/dev-util/ccache-3.3.4-r1/work/ccache-3.3.4/testdir.25568/.ccache[0;0m

It's a test from
    https://github.com/ccache/ccache/blob/a5840dad77f7e468a1f28f2a69a82fa9de7f10d0/test/suites/cleanup.bash#L77

    # NOTE: This test is known to fail on filesystems that have unusual block
    # sizes, including ecryptfs. The workaround is to place the test directory
    # elsewhere.
Comment 4 Larry the Git Cow gentoo-dev 2019-02-02 23:40:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce56476566e14b4d21c3ce07de83308f6433ecc7

commit ce56476566e14b4d21c3ce07de83308f6433ecc7
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-02-02 23:39:40 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-02-02 23:40:01 +0000

    dev-util/ccache: disable size cleanup test, bug #649440
    
    Disable "Forced cache cleanup, size limit" test as it
    relies on stable block size of filesystem where tests
    are performed. Assumption does not hold true for ecryptfs
    and btrfs. Disable test.
    
    Reported-by: Michał Górny
    Closes: https://bugs.gentoo.org/649440
    Package-Manager: Portage-2.3.59, Repoman-2.3.12
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 dev-util/ccache/ccache-3.6.ebuild                  |  1 +
 .../files/ccache-3.6-disable-sized-cleanup.patch   | 25 ++++++++++++++++++++++
 2 files changed, 26 insertions(+)