Skip to content

Commit 18b6b33

Browse files
committed
contest: hw: write down reservation id
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent f622f23 commit 18b6b33

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

contest/hw/hwksft.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ def test(binfo, rinfo, cbarg): # pylint: disable=unused-argument
164164
else:
165165
raise RuntimeError(f"Failed to reserve machines after {max_retries} attempts")
166166

167+
# Write reservation ID so results can be correlated with hw-worker state
168+
# on the test machine (/srv/hw-worker/tests/$reservation_id)
169+
with open(os.path.join(results_path, 'reservation-id'), 'w',
170+
encoding='utf-8') as fp:
171+
fp.write(f'{reservation_id}\n')
172+
167173
max_crash_retries = config.getint('hw', 'max_crash_retries', fallback=2)
168174
cases = None
169175
sol_start_ids = {}

0 commit comments

Comments
 (0)