subiquity/scripts
Olivier Gayot 612a8bbfc9 tests: terminate curl processes on timeout
When ensuring that the system-setup process can only be connected to
on the loopback interface, we spawn a bunch of `curl --interface ...`
processes. If the connection times out (which is the expectation in most
scenarios), the curl processes ended up not being terminated. Not only
this is small waste of resources, this is also causing errors on noble:

Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x745692661300>
Traceback (most recent call last):
  File "/usr/lib/python3.12/asyncio/base_subprocess.py", line 126, in __del__
    self.close()
  File "/usr/lib/python3.12/asyncio/base_subprocess.py", line 104, in close
    proto.pipe.close()
  File "/usr/lib/python3.12/asyncio/unix_events.py", line 568, in close
    self._close(None)
  File "/usr/lib/python3.12/asyncio/unix_events.py", line 592, in _close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/usr/lib/python3.12/asyncio/base_events.py", line 793, in call_soon
    self._check_closed()
  File "/usr/lib/python3.12/asyncio/base_events.py", line 540, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

Fixed by terminating the curl processes (and waiting for them to
terminate) before exiting the script.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2024-03-19 09:21:31 +01:00
..
bind-patch.sh scripts: add bind-patch.sh 2023-08-21 11:42:24 -06:00
check-yaml-fields.py add test of mount options being propagated 2021-04-06 09:16:55 +12:00
inject-subiquity-snap.sh use livefs-editor to make customized isos 2021-07-19 14:44:27 +12:00
installdeps.sh installdeps: use confnew to workaround upgrade 2023-08-28 12:59:24 -06:00
keyboard-scraper.sh scripts: add keyboard-scraper.sh 2022-07-29 13:01:18 -06:00
kvm-test.py kvm-test: add --disk-interface option taking either "nvme" or "virtio" 2024-03-14 10:47:05 +01:00
make-edge-iso.sh use livefs-editor to make customized isos 2021-07-19 14:44:27 +12:00
make-kbd-info.py pre-process keyboard auto detection steps into API friendly format 2021-03-16 16:02:23 +13:00
make-language-lists put a full locale (language/location/codeset) in languagelist 2021-02-12 15:03:10 +13:00
pc105.py pre-process keyboard auto detection steps into API friendly format 2021-03-16 16:02:23 +13:00
quick-test-this-branch.sh update quick-test-this-branch.sh too 2021-07-21 10:42:25 +12:00
raid-size-tests.py changes suggested in review 2019-11-08 09:47:34 +13:00
replay-curtin-log.py update filesystem model object paths after curtin runs 2022-10-05 16:52:10 +13:00
run-mypy.py scripts: add script to run mypy and compare with output in another revision 2023-06-01 09:24:05 +02:00
runtests.sh apt: move subiquity-curtin-apt.conf to curtin-install/ 2023-10-21 00:51:02 -07:00
slimy-update-snap.sh scripts: update slimy to handle u-d-i 2023-04-11 14:10:49 -06:00
test-in-lxd.sh scripts: handle cloud-init status 2 2024-01-29 13:52:58 -07:00
test-system-setup-loopback-only.py tests: terminate curl processes on timeout 2024-03-19 09:21:31 +01:00
test-this-branch.sh snapcraft: use snapcraft pack instead of snapcraft snap 2023-10-20 15:41:24 +02:00
umockdev-wrapper.py ubuntu-drivers: add support for umockdev in dry-run 2023-06-15 09:37:02 +02:00
update-part.py unset GIT_DIR in update-part.py 2021-08-19 17:12:16 +12:00
update-translations.sh i18n: add scripts to help with translation updates. 2020-05-06 13:22:13 +01:00
validate-autoinstall-user-data.py ai: include link to docs in post-install user data 2024-01-03 16:02:30 -08:00
validate-yaml.py suggestion from review 2023-06-30 16:43:01 +12:00
yaml-normalize.py scripts: add yaml-normalize.py 2022-08-29 13:54:51 -06:00
zdev-generate.py Update zdev-generate.py 2021-09-25 20:09:54 +02:00