]> Dogcows Code - chaz/tar/blob - tests/xattr04.at
Prepare for implementing extended attribute support.
[chaz/tar] / tests / xattr04.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 #
3 # Test suite for GNU tar.
4 # Copyright (C) 2012 Free Software Foundation, Inc.
5 #
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)
9 # any later version.
10 #
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.
15 #
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/>.
18 #
19 # Test description: Test for the regression caused by tar update from 1.23 to
20 # 1.26, Red Hat xattr patch was not ready for open->openat conversion.
21 #
22 # Related commit 4bde4f3. See the bug: https://bugzilla.redhat.com/717684
23
24 AT_SETUP([xattrs: s/open/openat/ regression])
25 AT_KEYWORDS([xattrs xattr04])
26
27 AT_TAR_CHECK([
28 AT_XATTRS_PREREQ
29
30 mkdir dir
31 mkdir output
32 genfile --file dir/file
33
34 setfattr -n user.test -v value dir/file
35
36 # archive whole directory including binary xattrs
37 tar --xattrs -cf archive.tar -C dir .
38
39 tar --xattrs -xf archive.tar -C output
40 ret=$?
41 getfattr -h -d output/file | grep -v -e '^#' -e ^$
42 exit $ret
43 ],
44 [0],
45 [user.test="value"
46 ])
47
48 AT_CLEANUP
This page took 0.032463 seconds and 5 git commands to generate.