156a34939Shaad#!/bin/sh 256a34939Shaad# Copyright (C) 2008 Red Hat, Inc. All rights reserved. 356a34939Shaad# 456a34939Shaad# This copyrighted material is made available to anyone wishing to use, 556a34939Shaad# modify, copy, or redistribute it subject to the terms and conditions 656a34939Shaad# of the GNU General Public License v.2. 756a34939Shaad# 856a34939Shaad# You should have received a copy of the GNU General Public License 956a34939Shaad# along with this program; if not, write to the Free Software Foundation, 1056a34939Shaad# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 1156a34939Shaad 1256a34939Shaad# 'Test for proper escaping of strings in metadata (bz431474)' 1356a34939Shaad 1456a34939Shaad. ./test-utils.sh 1556a34939Shaad 1656a34939Shaadaux prepare_devs 1 1756a34939Shaad 18*7c604eeaShaadpv_ugly="__\"!@#\$%^&*,()|@||'\\\"__pv1" 1956a34939Shaad 2056a34939Shaad# 'set up temp files, loopback devices' 2156a34939Shaadname=$(basename "$dev1") 22*7c604eeaShaaddmsetup rename "$name" "$PREFIX$pv_ugly" 23*7c604eeaShaaddev1=$(dirname "$dev1")/$PREFIX$pv_ugly 2456a34939Shaad 2556a34939Shaad# 'pvcreate, vgcreate on filename with backslashed chars' 2656a34939Shaadpvcreate "$dev1" 2756a34939Shaadvgcreate $vg "$dev1" 2856a34939Shaad 2956a34939Shaad# 'no parse errors and VG really exists' 3056a34939Shaadvgs 2>err 3156a34939Shaadnot grep "Parse error" err; 3256a34939Shaadvgs $vg 3356a34939Shaad 34