resolved: Allow test-resolved-stream to run concurrently
authorJoan Bruguera <joanbrugueram@gmail.com>
Sun, 30 Jan 2022 16:56:32 +0000 (17:56 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 17 Mar 2022 17:36:10 +0000 (02:36 +0900)
commit6d3e2f0188f8a10412c56dc987198104a4dfff0f
treea424ac4bbae5c4e3101bf1e17a8e1c5347bed69a
parent781b2b2e664aa2a230b074bb4332f23d24f45da6
resolved: Allow test-resolved-stream to run concurrently

Since test-resolved-stream brings up a simple DNS server on 127.0.0.1:12345,
only one instance could run at a time, so it would fail when run like
`meson test -C build test-resolved-stream --repeat=1000`.
Similarly, if by chance something is up on port 12345, the test would fail.

To make the test more reliable, run it in an isolated user + network namespace.
If this fails (some distributions disable user namespaces), just run as before.

(cherry picked from commit c76120f1b82f7e1c6a53b1569087db462c21b7d1)
src/resolve/test-resolved-stream.c