# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
-# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2012 Free Software
-# Foundation, Inc.
+# Copyright 2004-2008, 2010-2013 Free Software Foundation, Inc.
-# This program is free software; you can redistribute it and/or modify
+# This file is part of GNU tar.
+
+# GNU tar 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.
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
-# This program is distributed in the hope that it will be useful,
+# GNU tar 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.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# We need a recent Autotest.
m4_version_prereq([2.52g])
AT_CHECK_UTIL(setfattr -n user.test -v test $file,0)
AT_CHECK_UTIL(getfattr $file,0)
])
+m4_define([AT_SELINUX_UTILS_PREREQ],[
+ file=$( mktemp -p . )
+ AT_CHECK_UTIL(restorecon $file, 0)
+ AT_CHECK_UTIL(chcon -h --user=unconfined_u $file,0)
+ rm -rf $file
+])
+m4_define([AT_ACLS_UTILS_PREREQ],[
+ file=$( mktemp -p . )
+ AT_CHECK_UTIL(setfacl -m u:$UID:rwx $file,0)
+ AT_CHECK_UTIL(getfacl $file,0)
+ rm -rf $file
+])
m4_define([AT_CAPABILITIES_UTILS_PREREQ],[
file=$( mktemp -p . )
AT_CHECK_UTIL(setcap "= cap_chown=ei" $file,0)
AT_SKIP_TEST
fi
])
+m4_define([AT_SELINUX_PREREQ],[
+ AT_SELINUX_UTILS_PREREQ
+ file=$( mktemp -p . )
+ err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ AT_SKIP_TEST
+ fi
+])
+m4_define([AT_ACLS_PREREQ],[
+ AT_ACLS_UTILS_PREREQ
+ file=$( mktemp -p . )
+ setfacl -m u:$UID:rwx $file
+ err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
+ if test "$err" != "0"; then
+ AT_SKIP_TEST
+ fi
+])
m4_include([sparsemvp.at])
m4_include([exclude05.at])
m4_include([exclude06.at])
m4_include([exclude07.at])
+m4_include([exclude08.at])
+m4_include([exclude09.at])
+m4_include([exclude10.at])
+m4_include([exclude11.at])
+m4_include([exclude12.at])
+m4_include([exclude13.at])
+m4_include([exclude14.at])
+m4_include([exclude15.at])
+m4_include([exclude16.at])
m4_include([delete01.at])
m4_include([delete02.at])
m4_include([lustar02.at])
m4_include([lustar03.at])
+m4_include([time01.at])
+
m4_include([multiv01.at])
m4_include([multiv02.at])
m4_include([multiv03.at])
m4_include([sigpipe.at])
+m4_include([xattr01.at])
+m4_include([xattr02.at])
+m4_include([xattr03.at])
+m4_include([xattr04.at])
+m4_include([xattr05.at])
+
+m4_include([acls01.at])
+m4_include([acls02.at])
+
+m4_include([selnx01.at])
+m4_include([selacl01.at])
+
+m4_include([capabs_raw01.at])
+
m4_include([star/gtarfail.at])
m4_include([star/gtarfail2.at])
m4_include([star/ustar-big-8g.at])
m4_include([star/pax-big-10g.at])
-
-m4_include([xattr01.at])
-m4_include([xattr02.at])
-m4_include([xattr03.at])
-m4_include([xattr04.at])
-
-m4_include([capabs_raw01.at])