1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright 2015-2023 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 # Check the --owner-map and --group-map options.
21 AT_SETUP([--owner-map and --group-map])
22 AT_KEYWORDS([owner map])
28 set -- `genfile --stat=uid,gid a`
31 +$1 "Joe the Plumber:1234"
35 +$2 "Plumber's Union:5678"
38 tar --owner-map=uid.map\
40 --owner="Fallback Owner:4321" \
41 --group="Fallback Group:8765" \
47 tar --numeric-owner -tvf 1.tar
52 tar --owner-map=uid.map\
54 --owner="Fallback Owner:4321" \
55 --group="Fallback Group:8765" \
61 tar --numeric-owner -tvf 2.tar
64 [-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a
65 -rw-r--r-- 1234/5678 0 1970-01-01 00:00 a
66 -rw-r--r-- Fallback Owner/Fallback Group 0 1970-01-01 00:00 a
67 -rw-r--r-- 4321/8765 0 1970-01-01 00:00 a