From 066d2064399ef902b5efd9618ca4f402cfc82480 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Tue, 13 Aug 2024 19:46:23 +0200 Subject: [PATCH] test: use `diskutil unmount` instead of `umount` on macOS --- test/tools_test.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/tools_test.cpp b/test/tools_test.cpp index 9a08862ab..385e506d5 100644 --- a/test/tools_test.cpp +++ b/test/tools_test.cpp @@ -604,13 +604,14 @@ class driver_runner { if (!mountpoint_.empty()) { #ifdef __APPLE__ - auto umount = dwarfs::test::find_binary("umount"); - if (!umount) { - throw std::runtime_error("no umount binary found"); + auto diskutil = dwarfs::test::find_binary("diskutil"); + if (!diskutil) { + throw std::runtime_error("no diskutil binary found"); } auto t0 = std::chrono::steady_clock::now(); for (;;) { - auto [out, err, ec] = subprocess::run(umount.value(), mountpoint_); + auto [out, err, ec] = + subprocess::run(diskutil.value(), "unmount", mountpoint_); if (ec == 0) { break; }