ltlcross: detect write errors for --save-bogus and --grind
* bin/ltlcross.cc: Explicitly close those files to check for error conditions. * NEWS: Mention it.
This commit is contained in:
parent
0940c9a25a
commit
c368903398
2 changed files with 15 additions and 2 deletions
3
NEWS
3
NEWS
|
|
@ -18,6 +18,9 @@ New in spot 2.8.6.dev (not yet released)
|
||||||
wrong. This could in turn cause segfaults or infinite loops while
|
wrong. This could in turn cause segfaults or infinite loops while
|
||||||
running autcross or autfilt --stats=%w.
|
running autcross or autfilt --stats=%w.
|
||||||
|
|
||||||
|
- ltlcross was not diagnosing write errors associated to
|
||||||
|
options --grind=FILENAME and --save-bogus=FILENAME.
|
||||||
|
|
||||||
New in spot 2.8.6 (2020-02-19)
|
New in spot 2.8.6 (2020-02-19)
|
||||||
|
|
||||||
Bugs fixed:
|
Bugs fixed:
|
||||||
|
|
|
||||||
|
|
@ -220,6 +220,7 @@ static bool products_avg = true;
|
||||||
static bool opt_omit = false;
|
static bool opt_omit = false;
|
||||||
static const char* bogus_output_filename = nullptr;
|
static const char* bogus_output_filename = nullptr;
|
||||||
static output_file* bogus_output = nullptr;
|
static output_file* bogus_output = nullptr;
|
||||||
|
static const char* grind_output_filename = nullptr;
|
||||||
static output_file* grind_output = nullptr;
|
static output_file* grind_output = nullptr;
|
||||||
static bool verbose = false;
|
static bool verbose = false;
|
||||||
static bool quiet = false;
|
static bool quiet = false;
|
||||||
|
|
@ -507,6 +508,7 @@ parse_opt(int key, char* arg, struct argp_state*)
|
||||||
fail_on_timeout = true;
|
fail_on_timeout = true;
|
||||||
break;
|
break;
|
||||||
case OPT_GRIND:
|
case OPT_GRIND:
|
||||||
|
grind_output_filename = arg;
|
||||||
grind_output = new output_file(arg);
|
grind_output = new output_file(arg);
|
||||||
break;
|
break;
|
||||||
case OPT_IGNORE_EXEC_FAIL:
|
case OPT_IGNORE_EXEC_FAIL:
|
||||||
|
|
@ -1800,8 +1802,16 @@ main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete bogus_output;
|
if (bogus_output)
|
||||||
delete grind_output;
|
{
|
||||||
|
bogus_output->close(bogus_output_filename);
|
||||||
|
delete bogus_output;
|
||||||
|
}
|
||||||
|
if (grind_output)
|
||||||
|
{
|
||||||
|
grind_output->close(grind_output_filename);
|
||||||
|
delete grind_output;
|
||||||
|
}
|
||||||
|
|
||||||
if (json_output)
|
if (json_output)
|
||||||
print_stats_json(json_output);
|
print_stats_json(json_output);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue