]> git.eshelyaron.com Git - emacs.git/commitdiff
Port allows-stdout test to overly-suspicious bwrap
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Jan 2025 19:03:08 +0000 (11:03 -0800)
committerEshel Yaron <me@eshelyaron.com>
Thu, 23 Jan 2025 10:25:13 +0000 (11:25 +0100)
* test/src/emacs-tests.el (emacs-tests/bwrap/allows-stdout):
Skip test if bwrap prohibits even "echo Hi",
which it does on my Ubuntu 24.10 platform.
This extra check means we no longer need to test
separately whether the filter is readable.

(cherry picked from commit 34166dcf9cbd961d4f53ce9029e179a21a12c001)

test/src/emacs-tests.el

index a3c97279d50ff236a5635c90c0ecd86ec772f9b9..a8f7097014e2b656505c1ae2e5bb37dfeaf1d7da 100644 (file)
     (skip-unless bash)
     (skip-unless bwrap)
     (skip-unless (file-executable-p emacs))
-    (skip-unless (file-readable-p filter))
+    (skip-unless
+     (let ((command
+            (concat
+             (shell-quote-argument (file-name-unquote bwrap))
+             " --ro-bind / / --seccomp 20 -- echo Hi 20< "
+             (shell-quote-argument (file-name-unquote filter)))))
+       (zerop (call-process bash nil nil nil "-c" command))))
     (should-not (file-remote-p bwrap))
     (should-not (file-remote-p emacs))
     (should-not (file-remote-p filter))