1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright (C) 2012 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # Test description: Test if file capabilities are archived/restored correctly
20 # using just the default xattr support (capabilities are stored/restored in
21 # binary format -> system dependant).
23 AT_SETUP([capabilities: binary store/restore])
24 AT_KEYWORDS([xattrs capabilities capabs_raw01])
29 AT_CAPABILITIES_UTILS_PREREQ
32 genfile --file dir/file
34 setcap "= cap_chown=ei" dir/file
36 # archive whole directory including binary xattrs
37 tar --xattrs -cf archive.tar dir
42 # restore _all_ xattrs (not just the user.* domain)
43 tar --xattrs --xattrs-include='*' -xf archive.tar
48 [dir/file = cap_chown+ei