SHA256
3
0
forked from pool/tar
tar/tar-1.31-tests_dirrem.patch
Marcus Meissner f96982bade Accepting request 676145 from home:kstreitova:branches:Base:System
- update to version 1.31
  * Fix heap-buffer-overrun with --one-top-level, bug introduced
    with the addition of that option in 1.28
  * Support for zstd compression
  * New option '--zstd' instructs tar to use zstd as compression
    program. When listing, extractng and comparing, zstd compressed
    archives are recognized automatically. When '-a' option is in
    effect, zstd compression is selected if the destination archive
    name ends in '.zst' or '.tzst'.
  * The -K option interacts properly with member names given in the
    command line. Names of members to extract can be specified along
    with the "-K NAME" option. In this case, tar will extract NAME
    and those of named members that appear in the archive after it,
    which is consistent with the semantics of the option. Previous
    versions of tar extracted NAME, those of named members that
    appeared before it, and everything after it.
  * Fix CVE-2018-20482 - When creating archives with the --sparse
    option, previous versions of tar would loop endlessly if a
    sparse file had been truncated while being archived.
- remove the following patches (upstreamed)
  * tar-1.30-tests-difflink.patch
  * tar-1.30-tests_dirrem_race.patch
- refresh add_readme-tests.patch 
- add tar-1.31-tests_dirrem.patch to fix expected output in dirrem
  tests
- add tar-1.31-racy_compress_tests.patch to fix compression tests

OBS-URL: https://build.opensuse.org/request/show/676145
OBS-URL: https://build.opensuse.org/package/show/Base:System/tar?expand=0&rev=88
2019-02-20 13:12:44 +00:00

82 lines
2.8 KiB
Diff

From f86722c34c92f265bc9a20cb171d2fcfeab7d341 Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray@gnu.org>
Date: Mon, 14 Jan 2019 12:26:59 +0200
Subject: [PATCH] Fix expected output in dirrem tests.
In both tests, the "file changed as we read it" warning might be
produced for dir/sub, depending on the ctime resolution and timing.
The problem was fixed by 64b43fdf70d82c39eb2ca900cd4f8e49, but regressed
after e7cd377f7801d42aa8e07addff93d2150666c237, which removed 1 second
delays between each pair of checkpoints. Since the presense or absense
of this warning is irrelevant for the test, it is now suppressed.
* tests/dirrem01.at: Suppress the file-changed warning.
* tests/dirrem02.at: Likewise.
---
tests/dirrem01.at | 15 ++++++++++-----
tests/dirrem02.at | 5 +++--
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/tests/dirrem01.at b/tests/dirrem01.at
index 0a9c9e5..24bf392 100644
--- a/tests/dirrem01.at
+++ b/tests/dirrem01.at
@@ -27,9 +27,13 @@
# it prints a warning and exits with TAREXIT_DIFFERS.
#
# This test checks whether this behaviour is mimicked for directories, too.
-
-# Remark: This file is based on 'filerem01.at', which is the test-case for
-# a vanishing file.
+#
+# Notes:
+# 1. This file is based on 'filerem01.at', which is the test-case for
+# a vanishing file.
+# 2. Depending on the stat.st_ctime resolution, the "file changed as we
+# read it" warning might be issued for dir/sub. The test takes care to
+# suppress it.
AT_SETUP([directory removed before reading])
AT_KEYWORDS([create incremental listed dirchange dirrem dirrem01])
@@ -48,13 +52,14 @@ esac
genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \
tar --blocking-factor=1 -c -f archive.tar \
- --listed-incremental db -v dir >/dev/null
+ --listed-incremental db \
+ --warning=no-file-changed \
+ -v dir >/dev/null
],
[1],
[ignore],
[tar: dir: Directory is new
tar: dir/sub: Directory is new
-tar: dir/sub: file changed as we read it
tar: dir/sub: File removed before we read it
],[],[],[gnu,posix])
diff --git a/tests/dirrem02.at b/tests/dirrem02.at
index c314484..3c63bbe 100644
--- a/tests/dirrem02.at
+++ b/tests/dirrem02.at
@@ -45,13 +45,14 @@ esac
genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \
tar --blocking-factor=1 -c -f archive.tar \
- --listed-incremental db -v dir dir/sub >/dev/null
+ --listed-incremental db \
+ --warning=no-file-changed \
+ -v dir dir/sub >/dev/null
],
[2],
[ignore],
[tar: dir: Directory is new
tar: dir/sub: Directory is new
-tar: dir/sub: file changed as we read it
tar: dir/sub: Cannot open: No such file or directory
tar: Exiting with failure status due to previous errors
],[],[],[gnu,posix])
--
2.20.1