summaryrefslogtreecommitdiff
path: root/user/node/openat-test.patch
blob: e75eb7e613869f2c60ff4b23a000e52205104033 (plain) (blame)
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
The strace-openat-openssl test fails on musl libc because of ldso's
attempted access of /etc/ld-musl-$ARCH.path.  Additionally, at least on
gwyn, the spawned process attempts to determine its memory limits from
the current cgroup.

*Also*, the openssl.cnf expected line fails because it happens in a
subprocess - hence the optional [pid ....] prefix.

--- node-v18.20.8/test/parallel/test-strace-openat-openssl.js.old	2025-03-26 19:56:44.000000000 -0500
+++ node-v18.20.8/test/parallel/test-strace-openat-openssl.js	2025-06-27 00:31:02.528830894 -0500
@@ -29,7 +29,7 @@
   // stderr is the default for strace
   const rl = createInterface({ input: strace.stderr });
   rl.on('line', (line) => {
-    if (!line.startsWith('open')) {
+    if (line.match(/^(\[pid.+\] )?open/) === null) {
       return;
     }
 
@@ -42,6 +42,14 @@
     if (file.match(/\/proc\/.+/) !== null) {
       return;
     }
+    // skip /sys/fs/cgroup/*
+    if (file.match(/\/sys\/fs\/cgroup\/.+/) !== null) {
+      return;
+    }
+    // skip /etc/ld-musl-$ARCH.path
+    if (file.match(/\/etc\/ld-musl-.+\.path/) !== null) {
+      return;
+    }
 
     assert(allowedOpenCalls.delete(file), `${file} is not in the list of allowed openat calls`);
   });