mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-12 05:49:56 -04:00
chore(tools_test): retry umount on macOS
We've seen some spurious failures to unmount a FUSE volume due to the volume still being busy. Not sure if this fixes it, but worth a try.
This commit is contained in:
parent
314d7074ab
commit
17a74390c8
@ -578,7 +578,22 @@ class driver_runner {
|
|||||||
if (!umount) {
|
if (!umount) {
|
||||||
throw std::runtime_error("no umount binary found");
|
throw std::runtime_error("no umount binary found");
|
||||||
}
|
}
|
||||||
subprocess::check_run(umount.value(), mountpoint_);
|
auto t0 = std::chrono::steady_clock::now();
|
||||||
|
for (;;) {
|
||||||
|
auto [out, err, ec] = subprocess::run(umount.value(), mountpoint_);
|
||||||
|
if (ec == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
std::cerr << "driver failed to unmount:\nout:\n"
|
||||||
|
<< out << "err:\n"
|
||||||
|
<< err << "exit code: " << ec << "\n";
|
||||||
|
if (std::chrono::steady_clock::now() - t0 > std::chrono::seconds(5)) {
|
||||||
|
throw std::runtime_error(
|
||||||
|
"driver still failed to unmount after 5 seconds");
|
||||||
|
}
|
||||||
|
std::cerr << "retrying...\n";
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||||
|
}
|
||||||
bool rv{true};
|
bool rv{true};
|
||||||
if (process_) {
|
if (process_) {
|
||||||
process_->wait();
|
process_->wait();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user