diff options
| author | Frank Ch. Eigler <fche@redhat.com> | 2020-03-28 15:57:09 -0400 |
|---|---|---|
| committer | Frank Ch. Eigler <fche@redhat.com> | 2020-03-28 15:59:49 -0400 |
| commit | b988d23367e5c16480db7adf2c3ddc887142c42c (patch) | |
| tree | c178041f5f679639406c95a0713abbe318142bad /tests | |
| parent | 3a9c5da0ac7004a1f04e8768a682f76514e66433 (diff) | |
| download | platform_external_elfutils-b988d23367e5c16480db7adf2c3ddc887142c42c.tar.gz platform_external_elfutils-b988d23367e5c16480db7adf2c3ddc887142c42c.tar.bz2 platform_external_elfutils-b988d23367e5c16480db7adf2c3ddc887142c42c.zip | |
PR25739: debuginfod correct mtime for fdcache'd files
Files extracted from archives then left in the fdcache need to get get
their mtime set consistently, so that a subsequent cache-hit fetch can
relay the correct mtime to clients.
Reported-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 4 | ||||
| -rwxr-xr-x | tests/run-debuginfod-find.sh | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 66df34ce..96e0642a 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2020-03-28 Frank Ch. Eigler <fche@redhat.com> + + * run-debuginfod-find.sh: Test timestamps of archive-origin files. + 2020-03-27 Frank Ch. Eigler <fche@redhat.com> * run-debuginfod-find.sh: Test /path/-based debuginfod-find. diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh index bba04c1f..7faad331 100755 --- a/tests/run-debuginfod-find.sh +++ b/tests/run-debuginfod-find.sh @@ -284,22 +284,27 @@ archive_test() { buildid=`env LD_LIBRARY_PATH=$ldpath ${abs_builddir}/../src/readelf \ -a $filename | grep 'Build ID' | cut -d ' ' -f 7` test $__BUILDID = $buildid + # check that timestamps are plausible - older than the near-present (tmpdir mtime) + test $filename -ot `pwd` # run again to assure that fdcache is being enjoyed filename=`testrun ${abs_top_builddir}/debuginfod/debuginfod-find executable $__BUILDID` buildid=`env LD_LIBRARY_PATH=$ldpath ${abs_builddir}/../src/readelf \ -a $filename | grep 'Build ID' | cut -d ' ' -f 7` test $__BUILDID = $buildid + test $filename -ot `pwd` filename=`testrun ${abs_top_builddir}/debuginfod/debuginfod-find debuginfo $__BUILDID` buildid=`env LD_LIBRARY_PATH=$ldpath ${abs_builddir}/../src/readelf \ -a $filename | grep 'Build ID' | cut -d ' ' -f 7` test $__BUILDID = $buildid + test $filename -ot `pwd` if test "x$__SOURCEPATH" != "x"; then filename=`testrun ${abs_top_builddir}/debuginfod/debuginfod-find source $__BUILDID $__SOURCEPATH` hash=`cat $filename | sha1sum | awk '{print $1}'` test $__SOURCESHA1 = $hash + test $filename -ot `pwd` fi } |
