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 16aux prepare_devs 1 17 18pv_ugly="__\"!@#\$%^&*,()|@||'\\\"__pv1" 19 20# 'set up temp files, loopback devices' 21name=$(basename "$dev1") 22dmsetup rename "$name" "$PREFIX$pv_ugly" 23dev1=$(dirname "$dev1")/$PREFIX$pv_ugly 24 25# 'pvcreate, vgcreate on filename with backslashed chars' 26pvcreate "$dev1" 27vgcreate $vg "$dev1" 28 29# 'no parse errors and VG really exists' 30vgs 2>err 31not grep "Parse error" err; 32vgs $vg 33 34