Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com>
---
 modules/tests/Makefile | 4 ++--
 tests/misc-zfs-io.cc   | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/tests/Makefile b/modules/tests/Makefile
index 7d15522c..d1732e75 100644
--- a/modules/tests/Makefile
+++ b/modules/tests/Makefile
@@ -91,7 +91,7 @@ rofs-only-tests := rofs/tst-chdir.so rofs/tst-symlink.so 
rofs/tst-readdir.so \
        rofs/tst-concurrent-read.so
 
 zfs-only-tests := tst-readdir.so tst-fallocate.so tst-fs-link.so \
-       tst-concurrent-read.so misc-zfs-io.so tst-solaris-taskq.so
+       tst-concurrent-read.so tst-solaris-taskq.so
 
 specific-fs-tests := $($(fs_type)-only-tests)
 
@@ -134,7 +134,7 @@ tests := tst-pthread.so misc-ramdisk.so tst-vblk.so 
tst-bsd-evh.so \
        tst-elf-init.so tst-realloc.so tst-setjmp.so \
        libtls.so libtls_gold.so tst-tls.so tst-tls-gold.so tst-tls-pie.so \
        tst-sigaction.so tst-syscall.so tst-ifaddrs.so tst-getdents.so \
-       tst-netlink.so
+       tst-netlink.so misc-zfs-io.so
 #      libstatic-thread-variable.so tst-static-thread-variable.so \
 
 #TODO For now let us disable these tests for aarch64 until
diff --git a/tests/misc-zfs-io.cc b/tests/misc-zfs-io.cc
index 96c4194d..ba0b81d0 100644
--- a/tests/misc-zfs-io.cc
+++ b/tests/misc-zfs-io.cc
@@ -72,7 +72,7 @@ static void seq_read(int fd, char *buf, unsigned long size, 
unsigned long offset
 
 int main(int argc, char **argv)
 {
-    char fpath[64] = "/zfs-io-file";
+    const char *fpath = "/zfs-io-file";
     char buf[BUF_SIZE];
     unsigned size;
     int fd;
@@ -90,6 +90,8 @@ int main(int argc, char **argv)
             all_cached = true;
         } else if (!strcmp("--no-unlink", argv[i])) {
             unlink_file = false;
+        } else if (!strcmp("--file-path", argv[i]) && (i + 1) < argc) {
+            fpath = argv[i + 1];
         }
     }
 
@@ -140,7 +142,7 @@ int main(int argc, char **argv)
 
     close(fd);
     if (unlink_file) {
-        unlink("/zfs-io-file");
+        unlink(fpath);
     }
 
     return 0;
-- 
2.35.1

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/20220717053540.96073-1-jwkozaczuk%40gmail.com.

Reply via email to