mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
tests: fix strings test
For non udev path use DM_DEFAULT_NAME_MANGLING_MODE. Skip this test when using real /dev dir, since udev is not able to create such device name unless mangled...
This commit is contained in:
parent
c0f995050f
commit
fce7243427
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2008-2011 Red Hat, Inc. All rights reserved.
|
||||
# Copyright (C) 2008-2013 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing to use,
|
||||
# modify, copy, or redistribute it subject to the terms and conditions
|
||||
@ -13,10 +13,15 @@
|
||||
|
||||
. lib/test
|
||||
|
||||
aux prepare_devs 2
|
||||
aux lvmconf 'devices/global_filter = [ "a|.*dev/mapper/.*LVMTEST.*pv[0-9_]*$|", "r|.*|" ]'
|
||||
# For udev impossible to create
|
||||
test "$LVM_TEST_DEVDIR" = "/dev" && skip
|
||||
|
||||
aux prepare_devs 2
|
||||
aux extend_filter_LVMTEST
|
||||
|
||||
# Setup mangling to 'none' globaly for all libdm users
|
||||
export DM_DEFAULT_NAME_MANGLING_MODE=none
|
||||
|
||||
# for udev impossible to create
|
||||
pv_ugly="__\"!@#\$%^&*,()|@||'\\\"__pv1"
|
||||
|
||||
# 'set up temp files, loopback devices'
|
||||
@ -30,7 +35,8 @@ dm_table | grep -F "$pv_ugly"
|
||||
created="$dev1"
|
||||
# when used with real udev without fallback, it will fail here
|
||||
pvcreate "$dev1" || created="$dev2"
|
||||
pvdisplay | should grep -F "$pv_ugly"
|
||||
pvdisplay 2>&1 | tee >err
|
||||
should grep -F "$pv_ugly" err
|
||||
should check pv_field "$dev1" pv_name "$dev1"
|
||||
vgcreate $vg "$created"
|
||||
# 'no parse errors and VG really exists'
|
||||
|
Loading…
Reference in New Issue
Block a user