aboutsummaryrefslogtreecommitdiff
path: root/lib/libproc/tests/proc_test.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Re-enable proc_test:symbol_lookup after r360979.Mark Johnston2020-05-121-3/+0
| | | | | | | | | PR: 244732 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=360980
* Temporarily skip 2 failing tests after llvm10 importLi-Wen Hsu2020-03-111-0/+3
| | | | | | | | PR: 244732 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=358887
* Detach from the child process before completing the test.Mark Johnston2018-07-271-6/+12
| | | | | | | Otherwise the child will receive SIGTRAP if the parent exits first. Notes: svn path=/head/; revision=336782
* Add an envp argument to proc_create().Mark Johnston2017-12-031-1/+1
| | | | | | | | | This is needed to support dtrace's -x setenv option. MFC after: 2 weeks Notes: svn path=/head/; revision=326498
* Eliminate the last user of basename_r() in the base system.Ed Schouten2017-12-011-2/+4
| | | | | | | In this case it's fairly easy to make use of basename(). Notes: svn path=/head/; revision=326423
* Refine symtab sorting in libproc.Mark Johnston2017-11-211-1/+91
| | | | | | | | | | | | Add some rules to more closely match what illumos does when an address resolves to multiple symbols: - prefer non-local symbols - prefer symbols with fewer leading underscores and no leading '$' Add some regression tests to verify these rules. Notes: svn path=/head/; revision=326064
* libproc: Match prefixes when looking up mapped object by name.Mark Johnston2016-12-061-22/+19
| | | | | | | | | | | | | | | | | When looking up an object by name, allow prefix matches if no direct match is found. This allows one to, for example, match libc entry probes with: # dtrace -n 'pid$target:libc.so::entry' -c ./foo instead of requiring "libc.so.7" or a glob. Also remove proc_obj2map() as it currently just duplicates the functionality of proc_name2map(). It's supposed to take a Solaris link-map ID as a paramter, but support for this isn't implemented and isn't required to support DTrace's pid provider. Notes: svn path=/head/; revision=309595
* Enable libproc symbol_lookup tests on arm64Ed Maste2015-08-311-9/+0
| | | | | | | | | | | This reverts part of r286863, as the kernel support required by these tests was added in r287105. PR: 202305 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=287333
* On arm64 disable three tests that hang or panicEd Maste2015-08-171-0/+9
| | | | | | | | | | | | | Each issue has a PR open to track. This workaround allows us to run the tests to investigate the failures and avoid any new regressions. PR: 202304, 202305, 202307 Reviewed by: ngie Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3378 Notes: svn path=/head/; revision=286863
* Ensure that we don't try to demangle a symbol name if we failed to lookMark Johnston2015-01-251-1/+39
| | | | | | | | | up the symbol. Add a test to exercise this code path. Reviewed by: adrian Notes: svn path=/head/; revision=277667
* Hook up support for userland CTF support in DTrace. This required someMark Johnston2014-10-031-4/+6
| | | | | | | | | | | | | | | | | | | | | modifications to libproc to support fetching the CTF info for a given file. With this change, dtrace(1) is able to resolve type info for function and USDT probe arguments, and function return values. In particular, the args[n] syntax should now work for referencing arguments of userland probes, provided that the requisite CTF info is available. The uctf tests pass if the test programs are compiled with CTF info. The current infrastructure around the DTrace test suite doesn't support this yet. Differential Revision: https://reviews.freebsd.org/D891 MFC after: 1 month Relnotes: yes Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=272488
* Add some ATF tests for libproc.Mark Johnston2014-09-211-0/+347
Differential Revision: D710 Reviewed by: jmmv, ngie, rpaulo Notes: svn path=/head/; revision=271937