lvm-devel.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - tests: improve test for machine_id
Date: Fri, 23 Jun 2023 16:09:44 +0000 (GMT)	[thread overview]
Message-ID: <20230623160944.C99743858434@sourceware.org> (raw)

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
-


                 reply	other threads:[~2023-06-23 16:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230623160944.C99743858434@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).