From 6dd0f205b1b9753e3ad4b11e31c93b119f3e9923 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 25 Nov 2010 00:01:52 +0100 Subject: [PATCH 1/2] tests: new test sparse04 for --sparse --posix and long names * tests/Makefile.am (TESTSUITE_AT): Add sparse04.at. * tests/sparse04.at: New file. * tests/testsuite.at: Include it. --- tests/Makefile.am | 1 + tests/sparse04.at | 42 ++++++++++++++++++++++++++++++++++++++++++ tests/testsuite.at | 1 + 3 files changed, 44 insertions(+), 0 deletions(-) create mode 100644 tests/sparse04.at diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b1e226..ab7d104 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -146,6 +146,7 @@ TESTSUITE_AT = \ sparse01.at\ sparse02.at\ sparse03.at\ + sparse04.at\ sparsemv.at\ sparsemvp.at\ spmvp00.at\ diff --git a/tests/sparse04.at b/tests/sparse04.at new file mode 100644 index 0000000..b4513bc --- /dev/null +++ b/tests/sparse04.at @@ -0,0 +1,42 @@ +# Process this file with autom4te to create testsuite. -*- Autotest -*- + +# Test suite for GNU tar. +# Copyright (C) 2010 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +AT_SETUP([restoring long names of sparse files]) +AT_KEYWORDS([sparse sparse04]) + +# Tar 1.25 incorrectly restored long names of sparse files from PAX header +# Reference: https://bugzilla.redhat.com/656834 + +m4_define([NAME_111], + [123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960]) + +AT_TAR_CHECK([ +genfile --sparse --file NAME_111 --block-size 512 8M A || AT_SKIP_TEST +tar -c --sparse --posix NAME_111 | tar t +], +[0], +[NAME_111 +], +[], +[], +[], +[pax]) + +AT_CLEANUP diff --git a/tests/testsuite.at b/tests/testsuite.at index e8df868..40e1ea3 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -224,6 +224,7 @@ m4_include([shortrec.at]) m4_include([sparse01.at]) m4_include([sparse02.at]) m4_include([sparse03.at]) +m4_include([sparse04.at]) m4_include([sparsemv.at]) m4_include([spmvp00.at]) m4_include([spmvp01.at]) -- 1.7.3.2