aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-15 12:16:16 +0200
committerDanilo M. <danix@danix.xyz>2026-10-15 12:16:16 +0200
commit5d6e95de016c8769dc13bb0f31a9e6b72b46bcd7 (patch)
tree00a44dd34b4c2fc73bc4604002049077554e51ce /desktop/modules
parent9f0dab208616ac5cfee713ea5823cb5f2a6f1ebc (diff)
downloadquickshell-5d6e95de016c8769dc13bb0f31a9e6b72b46bcd7.tar.gz
quickshell-5d6e95de016c8769dc13bb0f31a9e6b72b46bcd7.zip
test(updates): a hung NFS read reports unreachable
A fifo with no writer blocks cat at open() the way a hard NFS mount blocks during a NAS outage. The repo section reports unreachable within the timeout and the mirror sections still fill. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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")