This patch allows us to skip tests that require PTRACE_ATTACH in situations where PTRACE_ATTACH is only allowed when CAP_SYS_PTRACE is held (i.e., for root, by default.) Reported at . --- elfutils-0.161/tests/run-deleted.sh 2015-04-11 16:38:33.028556235 +0200 +++ elfutils-0.161/tests/run-deleted.sh 2015-04-11 16:46:15.012442185 +0200 @@ -17,6 +17,15 @@ . $srcdir/backtrace-subr.sh +# Check whether the Yama policy allows us to use PTRACE_ATTACH. +if [ -f /proc/sys/kernel/yama/ptrace_scope ] +then + if [ `cat /proc/sys/kernel/yama/ptrace_scope` -ne 0 ] + then + exit 77 + fi +fi + tempfiles deleted deleted-lib.so cp -p ${abs_builddir}/deleted ${abs_builddir}/deleted-lib.so . --- elfutils-0.161/tests/vdsosyms.c 2015-04-11 16:40:20.633461110 +0200 +++ elfutils-0.161/tests/vdsosyms.c 2015-04-11 16:45:06.611866677 +0200 @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include #include ELFUTILS_HEADER(dwfl) @@ -68,6 +70,7 @@ module_callback (Dwfl_Module *mod, void int main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) { + static const char ptrace_scope_file[] = "/proc/sys/kernel/yama/ptrace_scope"; static char *debuginfo_path; static const Dwfl_Callbacks proc_callbacks = { @@ -76,6 +79,20 @@ main (int argc __attribute__ ((unused)), .find_elf = dwfl_linux_proc_find_elf, }; + + /* Check whether the Yama policy allows us to use PTRACE_ATTACH. */ + int ptrace_scope = open (ptrace_scope_file, O_RDONLY); + if (ptrace_scope >= 0) + { + char buf[10]; + int count = read (ptrace_scope, buf, sizeof buf); + assert (count > 0); + if (buf[0] != '0') + /* We're not allowed, so skip this test. */ + return 77; + close (ptrace_scope); + } + Dwfl *dwfl = dwfl_begin (&proc_callbacks); if (dwfl == NULL) error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1)); root/gnu/packages/tcl.scm
AgeCommit message (Expand)Author
2023-07-20gnu: tcl: Remove failing tests on the Hurd..Janneke Nieuwenhuizen
2023-03-02Merge remote-tracking branch 'savannah/master' into core-updatesChristopher Baines
2023-02-19gnu: Use HTTPS package home pages wherever possible.Tobias Geerinckx-Rice
2022-09-08Merge branch 'staging' into core-updatesMarius Bakke
2022-09-07gnu: expect: Update home page.Marius Bakke
2022-06-26gnu: Tcl/Tk: Update to 8.6.12.Marius Bakke
2022-05-06gnu: tcl-tls: Use a gexp.Ludovic Courtès
2022-05-06gnu: tcl-tls: Add 'release-monitoring-url' and 'upstream-name' properties.Ludovic Courtès
2022-05-06gnu: tcl: Add tcl-tls to packages.Daniel Lowe
2022-01-05gnu: itcl: Use G-expressions.Tobias Geerinckx-Rice
2022-01-05gnu: itcl: Update to 4.2.2.Tobias Geerinckx-Rice
2021-12-13gnu: Simplify package inputs.Ludovic Courtès
2021-10-14Merge branch 'master' into core-updates-frozenMarius Bakke
2021-10-13gnu: perl-tk: Update to 804.036.Marius Bakke
2021-05-22gnu: Tcl/Tk: Update to 8.6.11.Marius Bakke
2021-04-10gnu: itcl: Fix typo in description.Tobias Geerinckx-Rice
2021-03-06gnu: Add itclSharlatan Hellseher