mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-10 13:04:15 -04:00
Attempt to fix flaky tools test on Windows
This commit is contained in:
parent
e3f739d6e2
commit
6d582cb3dc
@ -464,6 +464,12 @@ class driver_runner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool unmount() {
|
bool unmount() {
|
||||||
|
#ifdef _WIN32
|
||||||
|
static constexpr int const kSigIntExitCode{-1073741510};
|
||||||
|
#else
|
||||||
|
static constexpr int const kSigIntExitCode{SIGINT};
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!mountpoint_.empty()) {
|
if (!mountpoint_.empty()) {
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
if (process_) {
|
if (process_) {
|
||||||
@ -471,11 +477,7 @@ class driver_runner {
|
|||||||
process_->interrupt();
|
process_->interrupt();
|
||||||
process_->wait();
|
process_->wait();
|
||||||
auto ec = process_->exit_code();
|
auto ec = process_->exit_code();
|
||||||
bool is_expected_exit_code = ec == 0
|
bool is_expected_exit_code = ec == 0 || ec == kSigIntExitCode;
|
||||||
#ifndef _WIN32
|
|
||||||
|| ec == SIGINT
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
if (!is_expected_exit_code) {
|
if (!is_expected_exit_code) {
|
||||||
std::cerr << "driver failed to unmount:\nout:\n"
|
std::cerr << "driver failed to unmount:\nout:\n"
|
||||||
<< process_->out() << "err:\n"
|
<< process_->out() << "err:\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user