File: 0021-Mark-inter-protocol-attack-test-unresolved-if-write-.patch

package info (click to toggle)
guile-3.0 3.0.10%2Breally3.0.10-6
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 35,800 kB
  • sloc: ansic: 183,632; lisp: 99,770; sh: 4,603; makefile: 1,845; awk: 239; javascript: 9
file content (35 lines) | stat: -rw-r--r-- 1,486 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From b84fa93977d90798129542d43b53c66446803e4e Mon Sep 17 00:00:00 2001
From: Rob Browning <rlb@defaultvalue.org>
Date: Tue, 14 Jan 2025 16:16:36 -0600
Subject: Mark inter-protocol attack test unresolved if write-request fails

This happens with some frequency during parallel test runs, and the
same (apparent) failure can eventually be triggered by repeated
moreutils parallel invocations like this in a built tree:

  parallel -j 3 ./check-guile -- \
    00repl-server.test 00repl-server.test 00repl-server.test
---
 test-suite/tests/00-repl-server.test | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/test-suite/tests/00-repl-server.test b/test-suite/tests/00-repl-server.test
index 433181ee6..be46a819e 100644
--- a/test-suite/tests/00-repl-server.test
+++ b/test-suite/tests/00-repl-server.test
@@ -130,8 +130,13 @@ reached."
       (read-until-prompt socket %last-line-before-prompt)
 
       ;; Simulate an HTTP inter-protocol attack.
-      (write-request (build-request (string->uri "http://localhost"))
-                     socket)
+      (catch 'system-error
+        (lambda ()
+          (write-request (build-request (string->uri "http://localhost"))
+                         socket))
+        (lambda what
+          (format (current-error-port) "write-request exception ~s\n" what)
+          (throw 'unresolved what)))
 
       ;; Make sure the server reacts by closing the connection.  If it
       ;; fails to do that, this test hangs.