File: tests-unpriv-fail.patch

package info (click to toggle)
remrun 0.2.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 448 kB
  • sloc: python: 775; sh: 629; makefile: 59
file content (16 lines) | stat: -rw-r--r-- 692 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: tests: actually catch a failure of the unpriv process
Origin: upstream, https://gitlab.com/ppentchev/remrun/-/commit/f2dafeea5ab5e3f9f3f2b689bca61b2ea9b7dbea
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2025-05-03

--- a/tests/python/run_sshd_test/__main__.py
+++ b/tests/python/run_sshd_test/__main__.py
@@ -476,6 +476,8 @@
                 "Process %(child_pid)d ended, code %(res)r",
                 {"child_pid": child_pid, "res": res},
             )
+            if res[1]:
+                sys.exit(f"The unprivileged child process failed; code {res[1]}")
             return False
 
         cfg.log.debug("Trying to setuid() to %(unpriv)r", {"unpriv": name})