[PATCH] storagepoolxml2argvtest: Populate test entries for macOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



One of the cases fails on macOS:

  15) Storage Pool XML-2-argv pool-netfs-gluster
      ...
  In
  '/Users/roolebo/dev/libvirt/tests/storagepoolxml2argvdata/pool-netfs-gluster-darwin.argv':
  Offset 39
  Expect [-o direct-io-mode=1 /mnt/gluster]
  Actual [/mnt/gluster -o direct-io-mode=1]

glusterfs has not been tested on macOS but for now we can just make
tests happy by providing them with the data they expect. Likely,
there'll be updates to the argv files in the future.

storagepoolxml2argvtest passes after the change.

Signed-off-by: Roman Bolshakov <r.bolshakov@xxxxxxxxx>
---
 tests/storagepoolxml2argvdata/pool-fs-darwin.argv               | 1 +
 tests/storagepoolxml2argvdata/pool-netfs-auto-darwin.argv       | 1 +
 tests/storagepoolxml2argvdata/pool-netfs-cifs-darwin.argv       | 1 +
 tests/storagepoolxml2argvdata/pool-netfs-darwin.argv            | 1 +
 tests/storagepoolxml2argvdata/pool-netfs-gluster-darwin.argv    | 1 +
 .../storagepoolxml2argvdata/pool-netfs-protocol-ver-darwin.argv | 1 +
 tests/storagepoolxml2argvtest.c                                 | 2 ++
 7 files changed, 8 insertions(+)
 create mode 100644 tests/storagepoolxml2argvdata/pool-fs-darwin.argv
 create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-auto-darwin.argv
 create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-cifs-darwin.argv
 create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-darwin.argv
 create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-gluster-darwin.argv
 create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-darwin.argv

diff --git a/tests/storagepoolxml2argvdata/pool-fs-darwin.argv b/tests/storagepoolxml2argvdata/pool-fs-darwin.argv
new file mode 100644
index 0000000000..537ce4cee5
--- /dev/null
+++ b/tests/storagepoolxml2argvdata/pool-fs-darwin.argv
@@ -0,0 +1 @@
+mount -t ext3 /dev/sda6 /mnt
diff --git a/tests/storagepoolxml2argvdata/pool-netfs-auto-darwin.argv b/tests/storagepoolxml2argvdata/pool-netfs-auto-darwin.argv
new file mode 100644
index 0000000000..888a0161b8
--- /dev/null
+++ b/tests/storagepoolxml2argvdata/pool-netfs-auto-darwin.argv
@@ -0,0 +1 @@
+mount localhost:/var/lib/libvirt/images /mnt
diff --git a/tests/storagepoolxml2argvdata/pool-netfs-cifs-darwin.argv b/tests/storagepoolxml2argvdata/pool-netfs-cifs-darwin.argv
new file mode 100644
index 0000000000..2fef6f5782
--- /dev/null
+++ b/tests/storagepoolxml2argvdata/pool-netfs-cifs-darwin.argv
@@ -0,0 +1 @@
+mount -t cifs //example.com/samba_share /mnt/cifs -o guest
diff --git a/tests/storagepoolxml2argvdata/pool-netfs-darwin.argv b/tests/storagepoolxml2argvdata/pool-netfs-darwin.argv
new file mode 100644
index 0000000000..04127c5087
--- /dev/null
+++ b/tests/storagepoolxml2argvdata/pool-netfs-darwin.argv
@@ -0,0 +1 @@
+mount -t nfs localhost:/var/lib/libvirt/images /mnt
diff --git a/tests/storagepoolxml2argvdata/pool-netfs-gluster-darwin.argv b/tests/storagepoolxml2argvdata/pool-netfs-gluster-darwin.argv
new file mode 100644
index 0000000000..97be9cbeb3
--- /dev/null
+++ b/tests/storagepoolxml2argvdata/pool-netfs-gluster-darwin.argv
@@ -0,0 +1 @@
+mount -t glusterfs example.com:/volume /mnt/gluster -o direct-io-mode=1
diff --git a/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-darwin.argv b/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-darwin.argv
new file mode 100644
index 0000000000..f26656d5b8
--- /dev/null
+++ b/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-darwin.argv
@@ -0,0 +1 @@
+mount -t nfs localhost:/var/lib/libvirt/images /mnt -o nfsvers=3
diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtest.c
index 967d1f21a8..ecce3ab7d0 100644
--- a/tests/storagepoolxml2argvtest.c
+++ b/tests/storagepoolxml2argvtest.c
@@ -126,6 +126,8 @@ mymain(void)
     const char *platform = "-linux";
 #elif defined(__FreeBSD__)
     const char *platform = "-freebsd";
+#elif defined(__APPLE__)
+    const char *platform = "-darwin";
 #else
     const char *platform = "";
 #endif
-- 
2.28.0





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux