Initial import of binutils 2.22 on the new vendor branch
[dragonfly.git] / contrib / lvm2 / dist / test / t-mdata-strings.sh
1 #!/bin/sh
2 # Copyright (C) 2008 Red Hat, Inc. All rights reserved.
3 #
4 # This copyrighted material is made available to anyone wishing to use,
5 # modify, copy, or redistribute it subject to the terms and conditions
6 # of the GNU General Public License v.2.
7 #
8 # You should have received a copy of the GNU General Public License
9 # along with this program; if not, write to the Free Software Foundation,
10 # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
11
12 # 'Test for proper escaping of strings in metadata (bz431474)'
13
14 . ./test-utils.sh
15
16 aux prepare_devs 1
17
18 pv_ugly="__\"!@#\$%^&*,()|@||'\\\"__pv1"
19
20 # 'set up temp files, loopback devices' 
21 name=$(basename "$dev1")
22 dmsetup rename "$name" "$PREFIX$pv_ugly"
23 dev1=$(dirname "$dev1")/$PREFIX$pv_ugly
24
25 # 'pvcreate, vgcreate on filename with backslashed chars' 
26 pvcreate "$dev1" 
27 vgcreate $vg "$dev1"
28
29 # 'no parse errors and VG really exists' 
30 vgs 2>err
31 not grep "Parse error" err;
32 vgs $vg
33