mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-08 08:58:00 +00:00
testsc: remove log_discard().
It was introduced in error by commit d8fda3b6da
: I had originally
intended to do test runs of prime generation by means of running every
attempt with logging enabled, and after each failed attempt, deleting
the log file and restarting it. But that was _far_ too slow, so I
abandoned that approach, and switched to the alternative method of
searching for a prime with logging turned off, and then repeating just
the final successful attempt under logging conditions.
log_discard() was the 'delete the log file' function intended for use
in the first of those strategies. It wasn't actually used in the end,
so I need not have committed it - and worse, the comment inside it
claiming it _is_ used in prime generation is needlessly confusing!
This commit is contained in:
parent
76688f9a0b
commit
5c09c1c47e
16
testsc.c
16
testsc.c
@ -203,22 +203,6 @@ void log_end(void)
|
||||
log_to_file(NULL);
|
||||
sfree(last_filename);
|
||||
}
|
||||
void log_discard(void)
|
||||
{
|
||||
/*
|
||||
* Discard the most recently generated log file, and rewind the
|
||||
* index so that its name will be reused by the next attempt.
|
||||
*
|
||||
* Used in tests of prime generation, in which only the
|
||||
* _successful_ attempts need to be side-channel safe: it doesn't
|
||||
* matter if a failed attempt leaks its data through early
|
||||
* termination of a checking loop, because all the data it leaked
|
||||
* will be thrown away anyway.
|
||||
*/
|
||||
char *prev_filename = log_filename(test_basename, --test_index);
|
||||
remove(prev_filename);
|
||||
sfree(prev_filename);
|
||||
}
|
||||
|
||||
static bool test_skipped = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user