summaryrefslogtreecommitdiffstats
path: root/cddl
Commit message (Collapse)AuthorAgeFilesLines
* Convert cftmerge to LIBADD and remove link on libdwarf which is not neededbapt2015-04-091-2/+1
|
* libdtrace: add support for lazyload mode.markj2015-04-084-18/+80
| | | | | | | | | | | Passing "-x lazyload" to dtrace -G during compilation causes dtrace(1) to not link drti.o into the output object file, so the USDT probes are not created during process startup. Instead, dtrace(1) will automatically discover and create probes on the process' behalf when attaching. Differential Revision: https://reviews.freebsd.org/D2203 Reviewed by: rpaulo MFC after: 1 month
* Fix a misparenthesization that could cause a crash if TERM is not set.markj2015-03-311-2/+2
| | | | | | Reported by: Coverity (internal) MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
* Fix ping(8) and ping6(8) usage in a couple of ip provider tests, andmarkj2015-03-304-16/+22
| | | | | | | update expected test output to reflect differences in default TTL and payload length. MFC after: 1 week
* Fix ping(8) usage in funcs/tst.system.d so that the test actually completes.markj2015-03-302-6/+15
| | | | MFC after: 1 week
* Replace dtest.pl, the upstream DTrace test suite harness, with a shellmarkj2015-03-304-7/+133
| | | | | | | | script. This reimplementation is much simpler than dtest.pl and is more amenable to being run under Kyua - dtest.pl writes error output to a temporary directory that is deleted when the run finishes, making it hard to debug test failures. This change also removes the test suite's dependency on perl.
* tcp provider tests: sleep for a bit after closing the socket so thatmarkj2015-03-284-0/+4
| | | | | | libdtrace has a chance to capture the traced data. MFC after: 1 week
* Add a missing format string argument.markj2015-03-151-1/+1
| | | | | PR: 197391 MFC after: 3 days
* When copying a type from a source CTF container to a destination container,markj2015-03-111-4/+7
| | | | | | | | | | | | | | | | | | ctf_add_type() first performs a by-name lookup of the type in the destination container. If this lookup returns a forward declaration for an enum, struct, or union, reset dst_type back to CTF_ERR, indicating that the source type is not in fact present in the destination container. This ensures that ctf_add_type() will also search the destination container's dynamic type list for the source type. Without this change, a pair of mutually recursive struct definitions could cause infinite recursion in ctf_add_type() if the destination container only contained forward declarations for the struct types: ctf_add_type() recursively calls itself on each struct member's type, and the forward declarations meant that the dynamic type list search would be skipped. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* CTF containers use the ctf_dtoldid field as a threshold type index whichmarkj2015-03-101-2/+2
| | | | | | | | | | | | | | | | | indicates the range of type indices which have been committed to the container by ctf_update(). However, the top bit of the dtd_type field is not part of the type index; rather, it is a flag used to indicate that the corresponding CTF container is a parent. This is why the maximum CTF type index is 2^15 - 1 rather than 2^16 - 1. Therefore, this flag must be masked off (using the CTF_TYPE_TO_INDEX macro) when comparing a type index with the ctf_dtoldid field of a container. This bug was causing libctf to erroneously free committed type definitions in ctf_discard(). libdtrace holds some references to such types, resulting in a use-after-free. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* ctf_discard(): fetch the next list element before restarting the loop. Ifmarkj2015-03-101-1/+1
| | | | | | | | | | we end up skipping a dynamic type because it has already been committed to the container, we would previously either set the loop variable to an uninitialized local variable, or set it to itself, resulting in an infinite loop. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* MFV r279822:markj2015-03-101-2/+0
| | | | | | | | | | | This merge is effectively a no-op since parts of it are already present in FreeBSD, and the rest is incorrect since gelf_newehdr(3) and gelf_newphdr(3) return pointers on FreeBSD rather than integers. Illumos issue: 5589 improper use of NULL in tools/ctf MFC after: 3 days
* Summary: Remove the need for `mpid which is Illumos/Solaris specific.gnn2015-03-081-2/+2
|
* Add infrastructure to integrate the DTrace test suite with Kyua.markj2015-02-2887-0/+3386
| | | | | | | | | | | | | | | | | | For each test category, we generate a script containing ATF test cases for the tests under that category. Each test case simply runs dtest.pl (the upstream test harness) with the corresponding test files. The exclude.sh script is used to record info about tests which should be skipped or are expected to fail; it is used to generate atf_skip and atf_expect_fail calls. The genmakefiles.sh script can be used to regenerate the test makefiles when new tests are brought it from upstream. The test suite is currently not connected to the build as there is a small number of lingering test issues which still need to be worked out. In the meantime however, the test suite can be easily built and installed manually from cddl/usr.sbin/dtrace/tests. Reviewed by: ngie Sponsored by: EMC / Isilon Storage Division
* Use the -shared option to create a shared library.markj2015-02-285-8/+8
| | | | MFC after: 1 week
* Remove a leading tab that causes a make(1) error when running the test.markj2015-02-281-1/+1
| | | | MFC after: 1 week
* Only kill sleep processes that were forked from the test script.markj2015-02-281-1/+1
| | | | MFC after: 1 week
* Stop hard-coding an incorrect path to rm(1).markj2015-02-285-5/+5
| | | | MFC after: 1 week
* These CTF tools do not use anything from libctf, so no need to link with it.obrien2015-02-272-4/+4
|
* Set altroot if the user have specified it via -o altroot.delphij2015-02-271-0/+2
| | | | MFC after: 2 weeks
* Remove drti.o's dependency on libelf. This makes it possible to add DTracemarkj2015-02-185-72/+86
| | | | | | | | | | | | | | | | | | | probes to userland programs and libraries without also needing to link libelf. dtrace -G places the __SUNW_dof symbol at the beginning of the DOF (DTrace probe and provider metdata) section in the generated object file; drti.o now just uses this symbol to locate the section. A complication occurs when multiple dtrace-generated object files are linked together, since the __SUNW_dof symbol defined in each file is global. This is handled by using objcopy(1) to convert __SUNW_dof to a local symbol once drti.o has been linked with the generated object file. Upstream, this is done using a linker feature not present in GNU ld. Differential Revision: https://reviews.freebsd.org/D1757 Reviewed by: rpaulo MFC after: 1 month Relnotes: yes
* Tweak the fds test program so that it actually compiles. Also use 0 insteadmarkj2015-02-142-7/+8
| | | | | | | of -1 for the bogus ioctl command so that dmesg doesn't get spammed with sign extension warnings when the test program runs. MFC after: 1 week
* Initial version of DTrace on ARM32.gnn2015-02-105-3/+204
| | | | | Submitted by: Howard Su based on work by Oleksandr Tymoshenko Reviewed by: ian, andrew, rpaulo, markj
* Avoid hard-coding a path to ksh in scripts that are executed directly bymarkj2015-02-0311-11/+11
| | | | | | | | the test harness. This is a problem in many of the *.ksh test scripts as well, but those scripts are executed using a shell whose path is specified in dtest.pl, so there's no need to modify them. MFC after: 1 week
* Let the standard deviation of the empty set be 0. This is consistent withmarkj2015-02-021-0/+3
| | | | | | | | | | the behaviour for averages, and fixes a crash that can occur when attempting to print a stddev aggregation containing no elements: dtrace:::BEGIN { @ = stddev(0); clear(@); printa("%@d", @); } PR: 197260 MFC after: 2 week
* Fix mktemp(1) usage.markj2015-01-311-1/+1
| | | | MFC after: 1 week
* Use syscall::exit instead of the nonexistent syscall::rexit.markj2015-01-311-1/+1
| | | | MFC after: 1 week
* Remove hard-coded invocations of gcc; use cc(1) instead.markj2015-01-314-13/+7
| | | | MFC after: 1 week
* Remove a makefile that isn't present upstream.markj2015-01-311-13/+0
| | | | MFC after: 1 week
* Fix a number of DTrace scripting tests:markj2015-01-3111-27/+27
| | | | | | | | * Avoid hard-coding program paths. * Use -x when searching for oneself in ps(1) output. * Use the correct keyword (egid instead of pgid) in tst.egid.ksh. MFC after: 1 week
* Fix some proc provider tests:markj2015-01-313-12/+14
| | | | | | | | | | * Avoid hard-coding program paths, except when it's necessary in order to override the use of a shell builtin. * Translate struct proc through psinfo_t so that we can access process arguments via the pr_psargs field of psinfo_t. * Replace uses of pstop and prun with kill(1). MFC after: 1 week
* pause() isn't a system call on FreeBSD; use sigsuspend(2) instead.markj2015-01-301-2/+5
| | | | MFC after: 1 week
* The DTrace harness (dtest.pl) executes DTrace scripts with the -C flag,markj2015-01-303-3/+9
| | | | | | | | which causes dtrace(1) to run the C preprocessor on input scripts before executing them. Suppress some warnings emitted by the preprocessor which are confusing the DTrace lexer tests. MFC after: 1 week
* Include required headers in DTrace test programs.markj2015-01-3010-0/+15
| | | | MFC after: 1 week
* Replace Solaris identifiers and types with their FreeBSD equivalents.markj2015-01-3012-16/+16
| | | | MFC after: 1 week
* Use the correct field when reading the PID out of a struct proc.markj2015-01-304-4/+4
| | | | MFC after: 1 week
* When searching for an accompanying test program, look in the directorymarkj2015-01-301-1/+1
| | | | | | | containing the test script rather than the current directory. This is needed in order to run the DTrace tests under Kyua. MFC after: 1 week
* Follow up to r277449 by fixing the remaining NSEC_TO_TICK macro to have the samengie2015-01-211-1/+1
| | | | | | named parameters Reported by: Ben Perrault <ben.perrault@gmail.com>, Willem Jan Withagen <wjw@digiware.nl>
* MFV r277432:delphij2015-01-202-33/+47
| | | | | | | | | Plug various memory leaks in libzfs import implementation. Illumos issue: 5518 Memory leaks in libzfs import implementation MFC after: 2 weeks
* Mechanically convert cddl sun #ifdef's to illumossmh2015-01-1755-331/+325
| | | | | | | | | | | | Since the upstream for cddl code is now illumos not sun, mechanically convert all sun #ifdef's to illumos #ifdef's which have been used in all newer code for some time. Also do a manual pass to correct the use if #ifdef comments as per style(9) as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos. MFC after: 1 month Sponsored by: Multiplay
* Eliminate illumos whole disk special case when searching for a ZFS vdevsmh2015-01-161-0/+6
| | | | | | | | | | This special case prevented locating vdevs which start with c[0-9] e.g. gptid/c6cde092-504b-11e4-ba52-c45444453598 hence it was impossible to online a vdev via its path. Submitted by: Peter Xu <xzpeter@gmail.com> MFC after: 2 weeks Sponsored by: Multiplay
* Revert r274569. It seems to be causing a crash when merging CTF data formarkj2015-01-081-1/+1
| | | | | | recent i386 GENERIC kernels. Reported by: David Wolfskill
* Use the correct state name for unavailable pools in zpool listsmh2014-12-311-1/+2
| | | | | | | | This corrects inconsitencies between zpool list and zpool status which are both described as displaying the pool <state> however zpool list would use this hardcoded FAULTED instead of the correct UNAVAIL. MFC after: 1 month
* mdoc: remove EOL whitespace.joel2014-12-291-1/+1
|
* Add PowerPC64 function descriptor support for dt_link.cjhibbits2014-12-281-14/+27
| | | | | | | | | | | | | | | | | | | | | | | Summary: PowerPC64 uses function descriptors in a section .opd, exporting the descriptors to the symbol table. This adds support for these into dt_link.c so that dtrace USDT probes can be compiled. Test Plan: Tested only on powerpc64. No regression testing has been performed, so I want someone with x86 hardware to regression test this. Tested on amd64 by markj Reviewers: #dtrace, markj Reviewed By: #dtrace, markj Subscribers: markj Differential Revision: https://reviews.freebsd.org/D1267 MFC after: 3 weeks
* mdoc: improvements to SEE ALSO.joel2014-12-271-2/+2
|
* DOF tables are aligned according to the DOF section's alignment constraint,markj2014-12-261-1/+4
| | | | | | | | so take this into account when iterating over DOF tables. PR: 195555 Submitted by: Fedor Indutny <fedor@indutny.com> (original version) MFC after: 1 week
* Enhancements to zpool upgrade processingsmh2014-12-261-21/+72
| | | | | | | | | | | | | | | | | | | | | | | | Introduce a seperate phase to list all unavailable pools when listing pools to upgrade. This avoids confusing output when displaying older and disabled feature pools. These existing phases now silently skip unavailable pools. Introduce cb_unavail to upgrade_cbdata_t which enables the final output for zpool list to correctly detail if all pools or only all available pools where up-to-date on version / features. Correct the type of upgrade_cbdata_t.cb_first from int -> boolean_t. Change the pool iteration when upgrading named pools to include unavailable pools and update upgrade_one so it doesn't try to upgrade unavailable pools but warns about them. This allows the correct error to be displayed as well as upgrades with available and unavailable pools intermixed to partially complete. Also correct some missing trailing \n's from output in upgrade_one. MFC after: 1 month X-MFC-With: r276194
* Prevent zpool upgrade failing due to unavailable poolssmh2014-12-251-0/+15
| | | | | | | | | | Prior to this fix "zpool upgrade" and "zpool upgrade -a" would fail due to an assert when operating on unavailable pools. We now print a warning to stderr but allow the processing of other pools to procesed. MFC after: 1 month
* We can stop iterating once we've found the DOF section.markj2014-12-231-0/+1
| | | | Submitted by: Fedor Indutny <fedor@indutny.com>
OpenPOWER on IntegriCloud