summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* MFC r322293: df(1): Add --si as an alias for -Hkevans2018-01-182-3/+11
|
* MFC r323275, r324112asomers2017-11-2812-0/+281
| | | | | | | | | | | | | | | | | | | | | | r323275: Add basic tests for chflags, mkdir, rcp, and rmdir Add basic command line parsing test coverage for these utilities. The tests were automatically generated based on their man pages. These tests can be expanded by hand for more thorough coverage. The aim is to generate very basic amount of test coverage for all the utilities in the base system. Submitted by: shivansh Reviewed by: asomers, brooks Sponsored by: Google, Inc (GSoC 2017) Differential Revision: https://reviews.freebsd.org/D12036 r324112: Fix Makefile entries from r323275 Reported by: Vladimir Zakharov <zakharov.vv@gmail.com> Reviewed by: ngie X-MFC-With: 323275
* MFC r324427:trasz2017-11-142-2/+5
| | | | | | | | | | | | | Document "tdnam" keyword to ps(1), and add "tdname" alias. MFC r324429: Fix long name (used by libxo) for the "tdnam" ps(1) keyword. MFC r324430: Undocument "tdnam" (leaving it as an alias), and rename the column to TDNAME.
* MFC r324367:trasz2017-11-141-1/+5
| | | | | | | | Fix kvm_getprocs(3) error reporting in ps(1). Previously it just didn't work at all - kvm_getprocs(3) doesn't update the &nentries when it returns NULL. The end result was that ps(1) showed garbage data instead of reporting kinfo_proc size mismatch.
* MFC r323263:trasz2017-10-041-2/+2
| | | | Hint that the "-o emul" option for ps(1) shows the ABI.
* MFC r323228:trasz2017-10-042-1/+7
| | | | Make ps(1) flag processes in capsicum(4) capability mode with "C".
* MFC r323225:trasz2017-10-041-2/+2
| | | | | | | | | | Reflect realtime and idle priorities in ps(1) state flags, same like we do for the usual nice values. It could be argued that they should use another set of indicators, since the underlying mechanism is different, but they match the description in the manual page, and so I think it's ok to not overcomplicate things. PR: 81757
* MFC r320701:ngie2017-09-081-2/+0
| | | | | | | | | | | | | Remove SUBDIR ordering/uniquifying in *bin/Makefile After the addition of SUBDIR.yes, uniquifying/ordering the SUBDIRs doesn't make a whole lot of sense, and it's in effect a half measure. Ordering SUBDIR (after adding SUBDIR.yes to it) in bsd.subdir.mk is a separate change that warrants more discussion/testing, because while the SUBDIR_PARALLEL work largely fixed dependency ordering for SUBDIRs, there might be downstream FreeBSD consumers that rely on the SUBDIR ordering.
* MFC r321293: date: avoid crash on invalid timeemaste2017-08-311-4/+8
| | | | | | | | localtime(3) returns NULL when passed an invalid time_t but date(1) previously did not handle it. Exit with an error in that case. PR: 220828 Submitted by: Vinícius Zavam
* MFC r320269:asomers2017-08-251-14/+18
| | | | | | | | | | style fixes in bin/echo/tests Submitted by: shivansh Reviewed by: asomers X-MFC-With: 319626 Sponsored by: Google, Inc (GSoC 2017) Differential Revision: https://reviews.freebsd.org/D11318
* MFC r321949,r321950,r322101:ngie2017-08-191-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r321949: Add expected failures for ZFS - :f_flag fails on ZFS because UF_IMMUTABLE isn't supported [1]. - :v_flag fails on ZFS because the mode for foo is [always] updated unnecessarily. get_filesystem(..) (supporting function that was added to the test script) is based on equivalent logic in usr.bin/extattr/tests/extattr_test.sh . PR: 221189 [1], 221188 [2] r321950: Always use first parameter passed to get_filesystem(..) instead of discarding it and using `.` instead. MFC with: r321949 PR: 221189 [1], 221188 [2] r322101: Don't check result of chflags in f_flag_cleanup() This will prevent false positives from occurring if the test is run on ZFS since ZFS doesn't support fflags throbbing like UFS. PR: 221189 MFC with: r321949
* MFC r321368:trasz2017-08-051-2/+2
| | | | | Use the "tree" word in ps(1) -d option description, to make it easier to find.
* MFC r302500,r319339,r319543,r319544,r319551,r321138:ngie2017-07-184-10/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r302500 (by cem): dd(1): Enable access to SIZE_T_MAX character devices On machines where SIZE_T_MAX exceeds OFF_MAX (signed 64-bit), permit seeking character devices to negative off_t values. This enables dd(1) to interact with kernel KVA in /dev/kmem on amd64, for example. r319339 (by asomers): Fix integer overflow detection in dd dd(1) tried to detect whether the seek offset would overflow, but it failed to account for the case where the provided argument was negative and the file was a regular file (negative seeks are allowed for character devices). I fixed it, and added a regression test. CID: 1368659 r319543: Stylistic tweaks Move opening braces of functions from the last column to column 0. MFC with: r319339 r319544: Mark :seek_overflow as an expected failure MFC with: r319339 PR: 219757 r319551 (by asomers): Fix bin/dd/dd2_tests:seek_overflow on UFS and TMPFS Split the postive and negative parts into separate test cases. The positive test case can only run on ZFS, because only ZFS supports files that large. PR: 219757 r321138: Remove unnecessary make logic added in r319339 This makes the change cleaner and easier to backport to ^/stable/10.
* MFC r303212,r319642,r319830:ngie2017-07-183-0/+169
| | | | | | | | | | | | | | | | | | | r303212 (by bdrewery): Move chown tests to proper path r319642: Add some basic tests for chmod(1) r319830: Add more simple positive tests for chown(1) The tests are largely symmetric with the tests for chmod(1)--added in r319642. Remove chown-f_test (added in r268030) since the test coverage is now being provided by `chown_test`.
* MFC r320172,r320173:ngie2017-07-172-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | r320172: ln(1): fix -F behavior When '-F' option is used, the target directory needs to be unlinked. Currently, the modified target ("target/source") is being unlinked, and since it doesn't yet exist, the original target isn't removed. This is fixed by skipping the block where target is modified to "target/source" when '-F' option is set. Hence, a symbolic link (with the same name as of the original target) to the source_file is produced. Update the test for ln(1) to reflect fix for option '-F' PR: 219943 r320173: Don't expect :sF_flag to fail anymore While here, also add a check to verify that the link target is updated in the testcase MFC with: r320172 PR: 219943
* MFC r319857:ngie2017-07-171-3/+7
| | | | ln(1): wordsmith -F option description
* MFC r319855,r319856,r319858:ngie2017-07-171-88/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r319855: Use readlink(1)/stat(1) to query symlinks instead of file(1) file(1) can be compiled out of the system via MK_FILE == no, and the output isn't guaranteed to be stable. It's better to use stat(1)/readlink(1) instead to query symlink/file paths. MFC with: r319714, r319854 r319856: Add a testcase for `ln -sF` The testcase fails today, so mark it with atf_expect_fail: in particular, the target (B) isn't being unlinked and the documentation doesn't suggest special handling for directories. Thus, there's either a doc or an implementation bug in ln(1) that needs to be resolved. MFC with: r319714, r319854, r319855 PR: 219943 r319858: Style fixes: clean up leading whitespace (8 single column spaces -> \t) MFC with: r319714, r319854, r319855, r319856
* MFC r319626:ngie2017-07-063-0/+66
| | | | | | | | | Add basic tests for echo(1) Verify that echo(1) does not... - ... print the trailing newline character with option '-n'. - ... print the trailing newline character when '\c' is appended to the end of the string.
* MFC r319637:ngie2017-07-061-0/+2
| | | | Add testcases for `cat -b`
* MFC r319634:ngie2017-07-061-0/+4
| | | | | | | | | Add additional testcases for cat(1) Verify the following additional cases: - -s (in isolation, in addition to the -se testcase obtained via the NetBSD test). - -vt
* MFC r319714, r319854asomers2017-07-053-0/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r319714: Add tests for ln(1) * Verify that when creating a hard link to a symbolic link, '-L' option creates a hard link to the target of the symbolic link * Verify that when creating a hard link to a symbolic link, '-P' option creates a hard link to the symbolic link itself * Verify that if the target file already exists, '-f' option unlinks it so that link may occur * Verify that if the target file or directory is a symbolic link, '-shf' option prevents following the link * Verify that if the target file or directory is a symbolic link, '-snf' option prevents following the link * Verify that '-s' option creates a symbolic link * Verify that '-w' option produces a warning if the source of a symbolic link does not currently exist Submitted by: shivansh Reviewed by: asomers, ngie Sponsored by: Google, Inc (GSoC 2017) Differential Revision: https://reviews.freebsd.org/D11084 r319854: bin/ln: Set umask appropriately before creating files for testing These changes were missed in D11084 Submitted by: shivansh Reviewed by: asomers X-MFC-With: 319714 Sponsored by: Google, Inc (GSoC 2017) Differential Revision: https://reviews.freebsd.org/D11158
* MFC r320644:allanjude2017-07-041-1/+10
| | | | Add deprecation notices for all rcmd tools
* MFC r314655:ngie2017-05-305-7/+7
| | | | | | bin: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output
* MFC r314833rgrimes2017-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | Convert absolute links to relative links. Style.Makefile(9) has been ignored to produce minimal diffs. MFC r314837 The relative symlink fix causes downstream issues for EMC DELL Isilon so revert the relative symlink fix pending a better solution. Reported by: ngie MFC r315091 Revert r314833 until the problem with INSTALL_RSYMLINKS can be found as it appears to break arm release builds. PR: 217705 Reported by: cyclaero@gmail.com Approved by: grehan (mentor)
* MFC r317904:trasz2017-05-231-0/+1
| | | | .Xr resizewin from stty(1) man page.
* MFC r317912: sh: Fix INTOFF leak after a builtin with different localejilles2017-05-143-1/+7
| | | | | | | | settings. After executing a builtin with different locale settings such as LC_ALL=C true SIGINT handling was left disabled indefinitely.
* MFC r316430vangyzen2017-05-011-5/+5
| | | | | | | | | | | | Fix indentation in dd(1) Quoting http://mdocml.bsd.lv/mdoc/details/width.html Do not use macros in the argument specifying the width, since that's not portable. While GNU troff can handle it, mandoc cannot. Sponsored by: Dell EMC
* MFC r315948:dchagin2017-04-151-0/+1
| | | | | | | | | | | | | | | | | | | | | Update tcsh to 6.20.00 MFC r315952: Update tcsh to vendor git b605cb561d Vendor changes: 1. PR/471: Daiki Ueno: Delay interpreting arginp until we've processed our startup files (which can change the NLS environment). 2. Fix type of read in prompt confirmation (eg. rmstar) (David Kaspar). 3. Fix out of bounds read (Brooks Davis) (reproduce by starting tcsh and hitting tab at the prompt). 4. Don't play pointer tricks that are undefined in modern c (Brooks Davis).
* MFC r314886,r314943,r314944:bdrewery2017-03-226-11/+349
| | | | | | | | | r314886: pwait: Add a -t flag to specify a timeout before exiting, and tests. r314943: Remove unneeded -x from tests. r314944: Rename some tests to end in _test.
* MFC r314714:bdrewery2017-03-221-3/+7
| | | | Don't kill pid -1 on overflow from strtol(3).
* MFC r315005: sh: Fix executing wrong command with ${x#$(y)}$(z).jilles2017-03-183-1/+9
| | | | | | | | | | | | | | | | The parsed internal representation of words consists of a byte string with a list of nodes (commands in command substitution). Each unescaped CTLBACKQ or CTLBACKQ | CTLQUOTE byte corresponds to an entry in the list. If param in ${param#%##%%word} is not set, the word is not expanded (in a deviation of POSIX shared with other ash variants and ksh93). Erroneously, the pointer in the list of commands (argbackq) was not advanced. This caused the wrong command to be executed later if the outer word contained another command substitution. Example: echo "${unsetvar#$(echo a)}$(echo b)" wrote "a" but should write "b".
* MFC r314686: sh: Fix crash if a -T trap is taken during command substitutionjilles2017-03-124-2/+19
| | | | | | | | | | | | | | | Code like t=$(stat -f %m "$file") segfaulted if -T was active and a trap was taken while the shell was waiting for the child process to finish. What happened was that the dotrap() call in waitforjob() was hit. This re-entered command execution (including expand.c) at a point not expected by expbackq(), and global state (unallocated stack string and argbackq) was corrupted. To fix this, change expbackq() to prepare for command execution to be re-entered. Reported by: bdrewery
* MFC r314637: sh: Add some already working tests that exercise new code pathsjilles2017-03-124-0/+20
|
* MFC r313798:kib2017-02-231-4/+4
| | | | Use uintmax_t to print st_nlink.
* MFC r313659-r313673bapt2017-02-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r313659: Remove space at and of line Reported by: make manlint MFC after: 2 days r313660: Remove empty Li Reported by: make manlint MFC after: 2 days r313661: Escape Ss to avoid confusion by mdoc parser with the Ss macro Reported by: make manlint MFC after: 2 days r313662: Add missing -width after -Bl -tag Reported by: make manlint MFC after: 2 days r313663: Add missing section after .Xr reference r313664: Escape No to avoid confusion with the No macro r313665: Remove useless .Pp after the .Sh macro and remove empty line r313666: Remove empty space at EOL and escept Ed r313667: Remove spaces at EOL and sort correctly the SEE ALSO section r313668: Add missing section in manpage reference r313669: Properly use .An macro before Authors name r313670: Escape Sm to avoid confusion with Sm macro r313671: Use correct date format r313672: Remove useless Li macro r313673: Remove spaces at end of line Reported by: make manlint
* Add history section for dd(1)sevan2017-02-031-1/+6
| | | | | | | | | First version of UNIX to include dd found using TUHS http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/dd.c PR: 211777 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
* In v3 UNIX, the kill utility is documented in category 8, not 1.sevan2017-02-031-2/+3
| | | | | | | | | | Add a note of it. http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man8/kill.8 PR: 211786 Approved by: bcr (mentor) Obtained from: TUHS Differential Revision: https://reviews.freebsd.org/D8105
* MFC r311522:kib2017-01-131-1/+2
| | | | Use type-independent formats for printing nlink_t and ino_t.
* MFC r310118asomers2017-01-121-1/+1
| | | | | | | | Fix ls_tests:o_flag with ZFS TMPDIR Unlike UFS or TMPFS, ZFS sets uarch automatically whenever a file is updated. The test must explicitly clear uarch to be portable across filesystems. Also, it doesn't need to run as root.
* MFC r310367:pfg2016-12-261-1/+4
| | | | | | | | | | pax(1): Fix a bug with archives smaller than 512 bytes. The problem here is that the archive is too short (< 512 bytes). The buffer routines, try to read at least 512 bytes, even when we try to determine what format file we have, which is wrong. Obtained from: NetBSD (CVS rev 1.26)
* MFC r309873:pfg2016-12-263-4/+4
| | | | | | | ed(1): Prevent possible overflows during allocation. Make sure the parameters used for malloc(3) can hold size_t sizes. This should help ed(1) handle bigger data in the future.
* MFC r310088, r310090, r310095brooks2016-12-212-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | r310088: Put the undocumented df feature of mounting filesystems from device nodes under an ifdef. Leave enabled. Reviewed by: cem Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8513 r310090: Mount filesystems without executable permissions since they should never be used. Reviewed by: cem Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8513 r310095: Use nmount(2) rather than the obsolete mount(2). Reviewed by: cem Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8513
* MFC r309676vangyzen2016-12-151-6/+10
| | | | | | | | | | | | | Export the whole thread name in kinfo_proc kinfo_proc::ki_tdname is three characters shorter than thread::td_name. Add a ki_moretdname field for these three extra characters. Add the new field to kinfo_proc32, as well. Update all in-tree consumers to read the new field and assemble the full name, except for lldb's HostThreadFreeBSD.cpp, which I will handle separately. Bump __FreeBSD_version. Sponsored by: Dell EMC
* MFC r309238,309239:delphij2016-12-121-12/+12
| | | | | r309238: Plug a potential memory leak. r309239: style(9).
* MFH (r308297): use what(1) instead of strings(1).des2016-12-101-2/+2
| | | | | PR: 213665 Submitted by: Pawel Worach <pawel.worach@gmail.com>
* MFC r305358:ngie2016-12-031-0/+8
| | | | | | | | | | | | | | | | | | | | | Update contrib/netbsd-tests with new content from NetBSD This updates the snapshot from 09/30/2014 to 08/11/2016 This brings in a number of new testcases from upstream, most notably: - bin/cat - lib/libc - lib/msun - lib/libthr - usr.bin/sort lib/libc/tests/stdio/open_memstream_test.c was moved to lib/libc/tests/stdio/open_memstream2_test.c to accomodate the new open_memstream test from NetBSD. Tested on: amd64 (VMware fusion VM; various bare metal platforms); i386 (VMware fusion VM); make tinderbox
* MFC r308443, r308459, r308462, r308478, r308786araujo2016-11-252-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r308443: Add -d flag that prints domain only. PR: 212875 Submitted by: Ben RUBSON <ben.rubson@gmail.com> Reviewed by: pi r308459: Fix missing '-' for the flags -s and -d on both manpage and usage. Reported by: garga, bde r308462: Add flag -B which does the same like batch mode but without exiting after print. Also add a new flag -s that add blocks size to statistics. PR: 198347, 212726 Submitted by: Ben RUBSON <ben.rubson@gmail.com> Tested by: pi MFC After: 2 weeks. r308478: We can't use protect(1) inside a jail(8)! To avoid have warning for services that are using oomprotect, oomprotect will only be applied on services that won't run inside jails. Reported by: allanjude MFC after: 2 weeks. r308786: rc.subr: Swap checks so we only fork sysctl if *_oomprotect is set.
* MFC r306722:sevan2016-10-161-1/+6
| | | | | | | | | Add history section for test(1) http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/test.c PR: 211789 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
* MFC r306721:sevan2016-10-161-1/+6
| | | | | | | | | Add history section for stty(1) http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man1/stty.1 PR: 211788 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
* MFC r306720:sevan2016-10-161-1/+6
| | | | | | | | | Add history section of pwd(1) http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s2/pwd.c PR: 211787 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
OpenPOWER on IntegriCloud