aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules')
-rw-r--r--desktop/modules/updates/test_updatesctl.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/desktop/modules/updates/test_updatesctl.py b/desktop/modules/updates/test_updatesctl.py
index 2bfe1a8..0714e4e 100644
--- a/desktop/modules/updates/test_updatesctl.py
+++ b/desktop/modules/updates/test_updatesctl.py
@@ -183,5 +183,17 @@ assert sw["upgrade"] == [{"name": "glibc", "from": "2.44-3", "to": "2.44-4"}], s
assert sw["new"] == [{"name": "libtatsu", "version": "1.0.5-1"}], sw
assert sw["removed"] == [{"name": "dhcp", "date": "2026-10-14"}], sw
+# A fifo with no writer blocks cat at open(), as a hard NFS mount blocks a
+# read while the NAS is down.
+import time as _t
+(tmp / "repo/PACKAGES.TXT").unlink()
+os.mkfifo(tmp / "repo/PACKAGES.TXT")
+t0 = _t.monotonic()
+d = run(timeout="0.5")
+assert _t.monotonic() - t0 < 5, "a hung read stalled the script"
+assert d["errors"] == {"repo": "unreachable"}, d["errors"]
+assert d["upgrade"] == [], d["upgrade"]
+assert d["slackware"]["upgrade"], "the mirror sections must still fill"
+
shutil.rmtree(tmp)
print("ok")