[PATCH 02/20] tests: storage hardcoding paths for mount & vgchange

Daniel P. Berrangé via Devel posted 20 patches 4 months, 1 week ago
[PATCH 02/20] tests: storage hardcoding paths for mount & vgchange
Posted by Daniel P. Berrangé via Devel 4 months, 1 week ago
From: Daniel P. Berrangé <berrange@redhat.com>

This is redundant since the tests will strip any path component from the
binary name before comparison.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/storagepoolxml2argvtest.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtest.c
index e8e40d695e..d5c2531ab8 100644
--- a/tests/storagepoolxml2argvtest.c
+++ b/tests/storagepoolxml2argvtest.c
@@ -6,14 +6,6 @@
 
 #define VIR_FROM_THIS VIR_FROM_NONE
 
-#ifndef MOUNT
-# define MOUNT "/usr/bin/mount"
-#endif
-
-#ifndef VGCHANGE
-# define VGCHANGE "/usr/sbin/vgchange"
-#endif
-
 static int
 testCompareXMLToArgvFiles(bool shouldFail,
                           const char *poolxml,
@@ -46,12 +38,12 @@ testCompareXMLToArgvFiles(bool shouldFail,
             goto cleanup;
         }
 
-        cmd = virStorageBackendFileSystemMountCmd(MOUNT, def, src);
+        cmd = virStorageBackendFileSystemMountCmd("mount", def, src);
         def = NULL;
         break;
 
     case VIR_STORAGE_POOL_LOGICAL:
-        cmd = virStorageBackendLogicalChangeCmd(VGCHANGE, def, true);
+        cmd = virStorageBackendLogicalChangeCmd("vgchange", def, true);
         break;
 
     case VIR_STORAGE_POOL_DIR:
-- 
2.49.0
Re: [PATCH 02/20] tests: storage hardcoding paths for mount & vgchange
Posted by Peter Krempa via Devel 4 months, 1 week ago
On Tue, Apr 29, 2025 at 12:14:02 +0100, Daniel P. Berrangé via Devel wrote:
> From: Daniel P. Berrangé <berrange@redhat.com>
> 
> This is redundant since the tests will strip any path component from the
> binary name before comparison.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  tests/storagepoolxml2argvtest.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@redhat.com>