Skip to content

Commit d52dc86

Browse files
authored
Set expected_final_state for processes (#100)
This is required for the Shadow 3.x, starting with 7ba17fb598d930c1368a6af08bb701ac7d16051d.
1 parent ee7b3ae commit d52dc86

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/run_all_steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616

1717
env:
1818
DEBIAN_FRONTEND: noninteractive
19-
SHADOW_COMMIT: d4c9ba6fb50868fcc63b0884d5821a9d04571c21
19+
SHADOW_COMMIT: 7ba17fb598d930c1368a6af08bb701ac7d16051d
2020
TOR_REPO: https://git.torproject.org/tor.git
2121
TOR_BRANCH: release-0.4.7
2222
TOR_COMMIT: tor-0.4.7.13

tornettools/generate.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ def __server(args, network, server):
261261
process["args"] = get_host_rel_conf_path(TGENRC_SERVER_FILENAME)
262262
# tgen starts at the end of shadow's "bootstrap" phase
263263
process["start_time"] = BOOTSTRAP_LENGTH_SECONDS
264+
process["expected_final_state"] = "running"
264265

265266
if server['is_hs_server']:
266267
# this is an onion service, so tgen should only listen on localhost so that we catch errors if we accidentally
@@ -289,6 +290,7 @@ def __server(args, network, server):
289290
# clients don't need a nickname, and our client nicknames are longer than the max length supported by tor
290291
process["args"] = __format_tor_args(None)
291292
process["start_time"] = max(1, BOOTSTRAP_LENGTH_SECONDS - 60) # start before boostrapping ends
293+
process["expected_final_state"] = "running"
292294

293295
host["processes"].append(process)
294296

@@ -351,6 +353,7 @@ def __tgen_client(args, network, name, country, tgenrc_fname):
351353
# https://shadow.github.io/docs/guide/compatibility_notes.html#libopenblas
352354
process["environment"] = {"OPENBLAS_NUM_THREADS": "1"}
353355
process["start_time"] = max(1, BOOTSTRAP_LENGTH_SECONDS - 60) # start before boostrapping ends
356+
process["expected_final_state"] = "running"
354357

355358
host["processes"].append(process)
356359

@@ -362,6 +365,7 @@ def __tgen_client(args, network, name, country, tgenrc_fname):
362365
process["args"] = tgenrc_fname
363366
# tgen starts at the end of shadow's "bootstrap" phase, and may have its own startup delay
364367
process["start_time"] = BOOTSTRAP_LENGTH_SECONDS
368+
process["expected_final_state"] = "running"
365369

366370
host["processes"].append(process)
367371

@@ -408,6 +412,7 @@ def __tor_relay(args, network, used_addresses, relay, orig_fp, is_authority=Fals
408412
process["path"] = "{}/bin/tor".format(SHADOW_INSTALL_PREFIX)
409413
process["args"] = str(__format_tor_args(relay['nickname']))
410414
process["start_time"] = starttime
415+
process["expected_final_state"] = "running"
411416

412417
host['processes'].append(process)
413418

@@ -424,6 +429,7 @@ def __oniontrace(args, start_time, name):
424429
process["path"] = "{}/bin/oniontrace".format(SHADOW_INSTALL_PREFIX)
425430
process["args"] = "Mode=log TorControlPort={} LogLevel=info Events={}".format(TOR_CONTROL_PORT, args.events_csv)
426431
process["start_time"] = start_time
432+
process["expected_final_state"] = "running"
427433
processes.append(process)
428434

429435
if args.do_trace:

0 commit comments

Comments
 (0)