|
From: Philippe W. <phi...@sk...> - 2011-10-09 17:21:50
|
> I had seen the comment in the vgtest file but failed to locate > vgdb.ptraceinvoker in my tree. And grepping the tree didn't reveal where > it was created... So I wasn't sure what it was doing. The script gdbserver_tests/make_local_links is doing various checks, resulting in various files (a.o. vgdb.ptraceinvoker) to be created or removed. The existence of these files is then checked in the prereq sections. > I'm happy to use the same prereq as mcinvokeWS if that is the right > thing to do. Let me know. I think I understand what is happening: even if the ptrace invoker functionality is not needed, the timeout to invoke might expire, which then leads to a message produced by vgdb if ptrace is restricted by the kernel. I think the best way to fix this is to add the option --max-invoke-ms=0 to vgdb. With this, the test will run on all setups (ptrace restricted or not) and it should not give error messages. Can you try the below patch ? (I hope my mailer will not reformat it. The below has been tested on an Ubuntu 8.04, I currently have no access to an Ubuntu with a ptrace_scope restriction). Thanks Index: gdbserver_tests/mcinvokeRU.vgtest =================================================================== --- gdbserver_tests/mcinvokeRU.vgtest (revision 12129) +++ gdbserver_tests/mcinvokeRU.vgtest (working copy) @@ -1,13 +1,14 @@ # test that vgdb can invoke a process when all threads are in Runnable or Yielding mode # If the test goes wrong, it might consume CPU during a long time. -prereq: ! test -e "/proc/sys/kernel/yama/ptrace_scope" || [ "`cat /proc/sys/kernel/yama/ptrace_scope`" = "0" ] prog: sleepers args: 1 0 1000000000 B-B-B-B- vgopts: --tool=memcheck --vgdb=yes --vgdb-prefix=./vgdb-prefix-mcinvokeRU stderr_filter: filter_make_empty # as the Valgrind process is always busy, we do not need the vgdb.ptraceinvoker prereq. +# We even disable ptrace invoker to avoid spurious attach error message +# on kernels where ptrace is restricted. progB: invoker -argsB: 10 --vgdb-prefix=./vgdb-prefix-mcinvokeRU --wait=60 -c v.wait 0 +argsB: 10 --vgdb-prefix=./vgdb-prefix-mcinvokeRU --max-invoke-ms=0 --wait=60 -c v.wait 0 # if the --wait is not enough, the test will fail or block. stdoutB_filter: filter_memcheck_monitor stderrB_filter: filter_vgdb |