]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tftpd: Check the server status after each test.
authorDag-Erling Smørgrav <des@FreeBSD.org>
Thu, 25 Apr 2024 18:35:24 +0000 (20:35 +0200)
committerDag-Erling Smørgrav <des@FreeBSD.org>
Thu, 25 Apr 2024 18:36:13 +0000 (20:36 +0200)
commit83a6e984ac01657819418746f722163367ec30db
tree443a935a5c64eae9abf3c23a7a12226b4b384345
parent7ab7ecfcfe777f7816e3e01df5f277060b2b609a
tftpd: Check the server status after each test.

* In the setup phase, wait for the server to start (or fail to start)
  before proceeding with the test.  This makes it possible to write test
  cases that don't expect a response from the server without ending up
  in a race over the server PID file.
* After running each test, wait up to 30 seconds for the server to exit
  and check that the exit status matches what the test case says to
  expect (usually 0).
* We still kill and collect the server in the cleanup phase, in case the
  test ended early.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D44956
libexec/tftpd/tests/functional.c