bytecomp-tests--dest-mountpoint: only run test if bwrap works
authorRob Browning <rlb@defaultvalue.org>
Mon, 4 May 2026 23:13:34 +0000 (18:13 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 21 Aug 2026 17:24:00 +0000 (12:24 -0500)
Bug-Debian: https://bugs.debian.org/1129189
Added-by: Rob Browning <rlb@defaultvalue.org>
README-Debian: The bytecomp-tests--dest-mountpoint should now only run
 where bwrap works.
 .
 It doesn't, in some environments, like a Debian sbuild unshare.

Gbp-Pq: Name 0024-bytecomp-tests-dest-mountpoint-only-run-test-if-bwra.patch

test/lisp/emacs-lisp/bytecomp-tests.el

index 2bc096ff2dfe7c5992e83d7490bb5d9feebac172..20eb0022bc4214d1303bdce4c93b4fbb8b2206a6 100644 (file)
@@ -1715,6 +1715,10 @@ mountpoint (Bug#44631)."
   (let ((bwrap (executable-find "bwrap"))
         (emacs (expand-file-name invocation-name invocation-directory)))
     (skip-unless bwrap)
+    ;; Check that bwrap works in the current environment.  It does not
+    ;; in a debian sbuild unshare, for example.
+    (skip-unless (zerop (call-process bwrap nil t nil "--ro-bind" "/" "/"
+                                      "true")))
     (skip-unless (file-executable-p bwrap))
     (skip-unless (not (file-remote-p bwrap)))
     (skip-unless (file-executable-p emacs))