All of lore.kernel.org
 help / color / mirror / Atom feed
* main - tests: improve test for machine_id
@ 2023-06-23 16:09 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2023-06-23 16:09 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=aed91e49aec64f8375583c7e0febd7b689e69e29
Commit:        aed91e49aec64f8375583c7e0febd7b689e69e29
Parent:        39d6a9601fd3d85ac4237a4731297cddfd5ecb1f
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Fri Jun 23 14:43:07 2023 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Jun 23 18:06:22 2023 +0200

tests: improve test for machine_id

---
 test/shell/system_id.sh | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/test/shell/system_id.sh b/test/shell/system_id.sh
index 14d2c6fd4..486fba1c3 100644
--- a/test/shell/system_id.sh
+++ b/test/shell/system_id.sh
@@ -24,10 +24,13 @@ print_lvmlocal() {
 
 aux prepare_devs 5
 
-SIDFILE="etc/lvm_test.conf"
-LVMLOCAL="etc/lvmlocal.conf"
+# get lvm.conf location in a form of: etc=path
+eval "$(lvmconfig global/etc)"
 
-DFDIR="$LVM_SYSTEM_DIR/devices"
+SIDFILE="$etc/lvm_test.conf"
+LVMLOCAL="$etc/lvmlocal.conf"
+
+DFDIR="$etc/devices"
 DF="$DFDIR/system.devices"
 
 # Avoid system id validation in the devices file
@@ -50,10 +53,6 @@ vgcreate $vg1 "$dev1"
 check vg_field $vg1 systemid "$SID"
 vgremove $vg1
 
-# FIXME - print 'life' config data
-#eval "$(lvmconfig global/etc 2>/dev/null || lvmconfig --type default global/etc)"
-etc="/etc"
-
 ## machineid
 if [ -e "$etc/machine-id" ]; then
 SID=$(cat "$etc/machine-id")
@@ -708,4 +707,3 @@ vgs -o+systemid $vg1
 check vg_field $vg1 systemid "$SID"
 grep "No system ID found from system_id_source" err
 vgremove $vg1
-


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-23 16:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-23 16:09 main - tests: improve test for machine_id Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.