zeek/testing/btest/scripts/base/utils
Christian Kreibich 3d87400f1d Fix race condition in scripts.base.utils.dir test
The sequence of

- adding a new file
- deleting an existing one
- waiting for Zeek to notice the addition
- re-adding the pre-existing file

was prone to a race: it could happen that Zeek's directory observation would see
the new file in one round, and by the time the next round happens the removal
and re-addition had already happened, thus missing the change and failing the
test.

This avoids the race by placing the removal of the existing file before the
addition of the new one, ensuring that when Zeek notices the addition (and
pushes the test to the next round), it has also seen the removal, so the
re-addition cannot get lost.
2022-07-11 16:26:45 -07:00
..
active-http.test update existing test suite usage of "when" statements to include captures 2022-01-07 14:54:06 -08:00
addrs.test GH-1589: Avoid extracting IP-like strings from SMTP headers 2021-09-03 17:35:10 +00:00
conn-ids.test General btest cleanup 2020-08-11 11:26:22 -07:00
decompose_uri.zeek GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev. 2019-05-01 21:43:45 +00:00
dir.test Fix race condition in scripts.base.utils.dir test 2022-07-11 16:26:45 -07:00
directions-and-hosts.test General btest cleanup 2020-08-11 11:26:22 -07:00
email.zeek Reverts the regex change in dead3226a5. 2020-11-18 15:35:17 -07:00
exec.test update existing test suite usage of "when" statements to include captures 2022-01-07 14:54:06 -08:00
files.test General btest cleanup 2020-08-11 11:26:22 -07:00
hash_hrw.zeek GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev. 2019-05-01 21:43:45 +00:00
json.test General btest cleanup 2020-08-11 11:26:22 -07:00
numbers.test General btest cleanup 2020-08-11 11:26:22 -07:00
paths.test Zeekify the scripts.base.utils.paths test 2022-05-19 09:51:36 -07:00
pattern.test General btest cleanup 2020-08-11 11:26:22 -07:00
queue.test GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev. 2019-05-01 21:43:45 +00:00
site.test General btest cleanup 2020-08-11 11:26:22 -07:00
strings.test General btest cleanup 2020-08-11 11:26:22 -07:00
thresholds.test General btest cleanup 2020-08-11 11:26:22 -07:00
urls.test General btest cleanup 2020-08-11 11:26:22 -07:00