summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r316602:ngie2017-07-191-1/+1
| | | | | | pmc_read(3): fix manlint error Remove spurious trailing comma from last .Nm entry in NAME section.
* Relnotes: yes (subtle output/behavior change)ngie2017-07-191-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r316938,r316953: r316938: savecore: fix space calculation with respect to `minfree` in check_space(..) - Use strtoll(3) instead of atoi(3), because atoi(3) limits the representable data to INT_MAX. Check the values received from strtoll(3), trimming trailing whitespace off the end to maintain POLA. - Use `KiB` instead of `kB` when describing free space, total space, etc. I am now fully aware of `KiB` being the IEC standard for 1024 bytes and `kB` being the IEC standard for 1000 bytes. - Store available number of KiB in `available` so it can be more easily queried and compared to ensure that there are enough KiB to store the dump image on disk. - Print out the reserved space on disk, per `minfree`, so end-users can troubleshoot why check_space(..) is reporting that there isn't enough free space. Tested with: positive/negative cases (see review); make tinderbox r316953: Switch back to non-IEC units for 1024 bytes I was swayed a little too quickly when I saw the wiki page discussing kB vs KiB. Switch back as none of the code in base openly uses IEC units via humanize_number(3) (which was my next step), and there's a large degree of dislike with IEC vs more SI-like units.
* MFC r312521,r313397:ngie2017-07-192-0/+60
| | | | | | | | | | | | | | | | r312521: Add testcases for -i with hardlinks and symlinks The symlink testcase is expected to fail, post-r312519 (the revert of r312404); mark it so. r313397: Don't expect :inplace_symlink_src to fail anymore (post-r313277) The S_ISREG check was restored, such that the code will again fail with in-place replacements on symlinks
* MFC r302145: bsdinstall: increase EFI partition size to 200MBemaste2017-07-192-3/+7
| | | | | | | | | | | | | | | | | | | | | A larger EFI file system size will facilitate multi-boot configurations and the installation other EFI applications like firmware update tools. 200MB matches OS X. Note that this changes only the partition size, not the file system that bsdinstall places there. We need to do both, but as the partition size is difficult to adjust later make this change for now so that at least systems installed with FreeBSD 11.0 have a partition layout with room to grow. Also merge part of r320007: - use EFI_BOOTPART_SIZE and EFI_BOOTPART_PATH macros on x86 - increase ZFS EFI partition to 200M PR: 201898 Relnotes: Yes Sponsored by: The FreeBSD Foundation
* MFC r313547, r313777: fix mouse selection when vt(4) scrollsemaste2017-07-191-22/+74
| | | | | | | | | | | | | | | | | | | | | | | | r313547 (ray, submitted by hselasky): o Reset mouse selection when new lines reach selection lines. o Fix how selection handled on display. r313777 (rpokala): Un-break vt(4) for {powerpc,powerpc64,sparc64} LINT kernel builds The {powerpc,powerpc64,sparc64} LINT kernel builds fail with this error: sys/dev/vt/vt_buf.c:198: warning: 'vtbuf_htw' defined but not used Move vtbuf_htw() inside the '#if SC_NO_CUTPASTE' block where it belongs, and put it in the proper order. This fixes the immedate issue w/ vt(4), but all three then fail on different issues. PR: 211922 Relnotes: Yes
* MFC r303043: Increase vt(4) framebuffer maximum sizeemaste2017-07-194-11/+11
| | | | | PR: 210382 Relnotes: Yes
* MFC r318723:ngie2017-07-191-45/+65
| | | | | | | | bsdinstall(8): fix manpage issues - Start new sentences on new lines. - Separate e.g. (more of an igor thing) with commas, and rewrite some examples not to be enclosed in parentheses.
* MFC: r320659rmacklem2017-07-181-1/+7
| | | | | | | | | Add a Bugs section that indicates that the nfsuserd doesn't work when jails are being used on the system. It is hoped that the patches in PR#205193 will someday get tested/debugged so that they can be MFC'd to fix this. This is a content change.
* MFC r318722:ngie2017-07-181-1/+2
| | | | sade(8): start new sentence on new line
* MFC r318693,r318694:ngie2017-07-181-13/+14
| | | | | | | | | | | | | | | r318693: Some minor style(9) fixes - Wrap at <80 columns. - Sort by type r318694: style(9): sort headers MFC with: r318693
* MFC r319026:ngie2017-07-183-1/+115
| | | | | | | pw: add some basic testcases for groupshow and usershow - groupshow: test out -a/-g/-n . - usershow: test out -a/-n/-u .
* MFC r318702:ngie2017-07-181-1/+0
| | | | vis(3): delete spurious .Pp macro
* MFC r318706:ngie2017-07-181-1/+2
| | | | localeconv(3): start sentences on new lines
* MFC r318712:ngie2017-07-181-1/+1
| | | | | | xdr(3): add missing comma after xdr_sizeof(3) in SYNOPSIS This unbreaks the .Nm declaration
* MFC r318703:ngie2017-07-181-1/+1
| | | | __iconv_get_list: separate .Nm entries with commas
* MFC r318707:ngie2017-07-181-2/+2
| | | | sctp_send(3): start sentences on new lines
* MFC r318280:ngie2017-07-181-1/+2
| | | | | getconf: use nitems(..) to compute NWORDS instead of hardcoding the equivalent macro
* MFC r318704,r318708,r318709:ngie2017-07-183-4/+5
| | | | | | | | | | | | | | r318704: posix1e(3): reference using the section (3) when referencing libbsm with .Xr r318708: acl_create_entry(3): separate .Nm entries with commas in SYNOPSIS r318709: acl_to_text(3): start sentences on new lines
* MFC r318710:ngie2017-07-181-3/+3
| | | | quick_exit(3): delete trailing whitespace in licensing tort
* MFC r318718,r318719,r318720,r318721:ngie2017-07-184-17/+18
| | | | | | | | | | | | | | | | | | | | | | | r318718: rctl_add_rule(2): fix manlint warnings - Fix commas (either missing or misused) after .Nm entries in SYNOPSIS r318719: open(2): fix manlint warnings - Sort SEE ALSO .Xr entries. - Sort sections (HISTORY comes after STANDARDS). r318720: ptrace(2): clean up trailing whitespace r318721: kill(2): add missing section for sysctl(9)
* MFC r319048,r319049,r319051,r319054:ngie2017-07-183-35/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r319048: Push `snapshot_file` copying down into run_tests function, and mark snapshot_file const char *. This fixes a bogus set of errors from gcc about strdup not being allowed a NULL argument. r319049: Bump WARNS from 1 to 3 after recent commits to fix warnings in the directory. Tested with: clang 4.0, gcc 4.2.1, gcc 6.3.0 r319051: hostent_test_getnameinfo_eq(..): initialize found_a_host to false CID: 1368943 r319054: hostent_test_getaddrinfo_eq(..): call freeaddrinfo on `ai` when done This plugs a leak of memory allocated via getaddrinfo. CID: 1346866
* MFC r316552,r319662:ngie2017-07-182-3/+25
| | | | | | | | | | | | | | | | r316552: atf-c: fix documentation description for atf_utils_wait(3) atf_utils_wait(3) should be used in combination with atf_utils_fork(3), not itself (atf_utils_wait(3)). r319662: Add MLINKS for atf-sh(3) to each of the functions it implements This hopefully will make atf-sh(3) easier to understand for newcomers, without having to go through the atf-sh(3) level of indirection.
* MFC r302500,r319339,r319543,r319544,r319551,r321138:ngie2017-07-184-15/+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 r319800,r319806:ngie2017-07-182-36/+48
| | | | | | | | | | | | | | | | | | r319800: Don't explicitly get the class to PART in gctl_test_helper.c This will allow the tool to be used with arbitrary geom(4) classes, like GEOM. Specify class=PART explicitly in the tester to keep existing behavior. r319806: Improve handling with system state - Always unlink $cmd after exit via END block. - The tests don't function well if kern.geom.debugflags != 0. Save debugflags, then restore them at the end of the test.
* MFC r318255:ngie2017-07-182-2/+4
| | | | | | | | | | | Add missing braces around MCAST_EXCLUDE check when KTR support is compiled into the kernel This ensures that .iss_asm (the number of ASM listeners) isn't incorrectly decremented for MLD-layer source datagrams when inspecting im*s_st[1] (the second state in the structure). PR: 217509 [1]
* MFC r319850:ngie2017-07-184-0/+166
| | | | | | | | | | | | | | | Add some initial basic tests for du(1) Tests that exercise the following flags are added in this commit: - -A - -H - -I - -g - -h - -k - -m Additional tests will be added soon.
* MFC r268030,r268793,r303212,r319642,r319830:ngie2017-07-189-1/+396
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r268030 (by eadler): chown: add a test Add a test for the chown utility. This sets up chown(8) to be capable of being tested. As such, only add one test for now as an example. r268793 (by eadler): chown: Fix chown test number 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 r319842:ngie2017-07-181-2/+3
| | | | | | | | | getbsize(3): clarify that underflow/overflow warnings in regard to $BLOCKSIZE gets output via warnx(3) This helps set expectations for how one might deal with those messages, i.e., mute output from /dev/stderr today, since that's where vwarn(3) outputs messages to today.
* MFC r318695:ngie2017-07-181-4/+4
| | | | | | err(3): use `NULL`, aka `(void*)0` per POSIX instead of `(FILE *)0` This is being done to aid humans and static analysis checkers.
* MFC r319844,r319845:ngie2017-07-181-0/+74
| | | | | | | | | | | | | | | | r319844: Add positive and negative testcases for cam_get_device(3) r319845: Remove stdlib.h #include added in r319844 A previous iteration of the tests I added in r319844 involved free(3), but that attempt didn't pan out, so I switched to stack allocated buffers instead of heap allocated ones, making the #include unnecessary. MFC with: r319844
* MFC r318705:ngie2017-07-181-5/+10
| | | | | | | | fopen(3): make manlint fixes - Break on new lines. - Use .Dv with NULL. - Rewrap lines as necessary/when possible.
* MFC r316558:ngie2017-07-184-8/+12
| | | | | | | Use __FBSDID instead of the license agreement to embed the $FreeBSD$ RCS keyword Reminded by a comment made by markj w.r.t. using __FBSDID in .c files ala a past Phabricator review.
* MFC r316549,r316550,r316551,r316554:ngie2017-07-182-31/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r316549: Add sys/types.h #include to EXAMPLE to provide a complete functional standalone example program r316550: sbuf(9): convert SYNOPSIS section from .Fn entries to .Fo/.Fa/.Fc entries This shortens the column count on many lines considerably. While here, add "(void)" to sbuf_new_auto(3) for consistency with style(9) recommendations. r316551: sbuf(9): clarify kernel-only APIs - move sbuf_bcopyin(9) and sbuf_copyin(9) near sbuf_new_for_sysctl(9), as all three functions are kernel-only APIs. - add #ifdef _KERNEL around sbuf_*copyin and sbuf_new_for_sysctl(9) to make it visually clear that they are kernel-only APIs. r316554: sbuf(9): add MLINKS for sbuf_{clear,get,set}_flags(9) These functions were added in r279992.
* MFC r316557:ngie2017-07-187-0/+718
| | | | | | | | | | | | | | sbuf(3): add some basic functional tests for the library Areas not covered still [positive functionality wise] are: - sbuf_{clear,get,set}_flags - sbuf_new (in particular, with fixed buffers, etc). Some basic negative testing has been added, but more will be added in the future. This work was in part to validate work done by cem in r288223, and ian before that.
* MFC r279992,r280149,r280193,r288223,r288484,r321109:ngie2017-07-183-42/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r279992 (by ian): Add a new flag, SBUF_INCLUDENUL, and new get/set/clear functions for flags. The SBUF_INCLUDENUL flag causes the nulterm byte at the end of the string to be counted in the length of the data. If copying the data using the sbuf_data() and sbuf_len() functions, or if writing it automatically with a drain function, the net effect is that the nulterm byte is copied along with the rest of the data. r280149 (by ian): Update an sbuf assertion to allow for the new SBUF_INCLUDENUL flag. If INCLUDENUL is set and sbuf_finish() has been called, the length has been incremented to count the nulterm byte, and in that case current length is allowed to be equal to buffer size, otherwise it must be less than. Add a predicate macro to test for SBUF_INCLUDENUL, and use it in tests, to be consistant with the style in the rest of this file. r280193 (by ian): The minimum sbuf buffer size is 2 bytes (a byte plus a nulterm), assert that. Values smaller than two lead to strange asserts that have nothing to do with the actual problem (in the case of size=0), or to writing beyond the end of the allocated buffer in sbuf_finish() (in the case of size=1). r288223 (by cem): sbuf: Process more than one char at a time Revamp sbuf_put_byte() to sbuf_put_bytes() in the obvious fashion and fixup callers. Add a thin shim around sbuf_put_bytes() with the old ABI to avoid ugly changes to some callers. Obtained from: Dan Sledz r288484 (by phk): Fail the sbuf if vsnprintf(3) fails. r321109: Fix whitespace regression accidentally checked in via ^/head@r280149
* MFC r307873,r314397,r314399,r314419,r314420,r314533,r316553:ngie2017-07-185-13/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r307873 (by marcel): Include <stdarg.h> instead of <machine/stdarg.h> when compiled as part of libsbuf. The former is the standard header, and allows us to compile libsbuf on macOS/linux. r314397 (by scottl): Implement sbuf_prf(), which takes an sbuf and outputs it to stdout in the non-kernel case and to the console+log in the kernel case. For the kernel case it hooks the putbuf() machinery underneath printf(9) so that the buffer is written completely atomically and without a copy into another temporary buffer. This is useful for fixing compound console/log messages that become broken and interleaved when multiple threads are competing for the console. r314399 (by scottl): Add prototype for sbuf_putbuf() r314419 (by jkim): Include stdio.h to fix libsbuf build. r314420 (by scottl): Provide a comment on why stdio.h needs to be included. r314533 (by scottl): Expose the sbuf_putbuf() symbol to libsbuf. There are a few other symbols that are present but not exposed, like get/set/clear flags, not sure if they need to be exposed at this point. r316553: sbuf(3): expose sbuf_{clear,get,set}_flags(3) via libsbuf These functions were added to sbuf(9) in r279992, but never exposed to userspace. Expose them now so they can be used/tested.
* MFC r319836:ngie2017-07-171-4/+4
| | | | | | stat(1): sort flags in the DESCRIPTION section -x's description should come after -t's description.
* MFC r319846:ngie2017-07-171-2/+1
| | | | du(1): trivial whitespace cleanup
* MFC r319856,r320172,r320173:ngie2017-07-172-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 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-174-0/+230
| | | | ln(1): wordsmith -F option description
* MFC r319857:ngie2017-07-171-3/+7
| | | | ln(1): wordsmith -F option description
* MFC r319928:ngie2017-07-171-1/+1
| | | | | Use nitems(..) when computing `max` instead of the longhand version of the same logic
* MFC r319834,r319841,r320723,r320724:ngie2017-07-176-1/+332
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r319834: Write up some basic tests for readlink(1) The tests exercise -f (f_flag), -n (n_flag), and no arguments (basic). r319841: Add initial tests for stat(1) Testcases for -H, -L, and -f haven't been implemented yet, in part due to additional complexity needed to validate the features: * -H and -f will require an external "helper" program to display/modify the state/permissions for a given path. * -L is being covered partially via the -n testcase today. r320723: Use %e instead of %d with x_output_date(..) stat -x doesn't 0-fill days so %d is inappropriate. %e is correct. MFC with: r319841 r320724: :l_flag:: be more aggressive when normalizing whitespace Save output from ls -ldT and stat -l, then normalize all repeating whitespace using sed to single column spaces. This makes the test flexible with single-digit days, etc, similar to r320723. This approach is just a bit more of a hammer approach because of how the columns are ordered/spaced in both ls and stat. MFC with: r319841
* MFC r318325:ngie2017-07-175-0/+197
| | | | | | | | | | | | | | | Start writing up some basic feature tests for procstat These tests query a running process for information related to the -b, -c, -e, and -f flags; the -f testcase is largely stubbed out, pending additional work to determine a good, deterministic descriptor. Core file test support is coming soon--it requires a bit more effort due to the fact that: - coredumps can be disabled (kern.coredump=0). - corefiles can be put in different directories than the current directory, or be named something other than `<prog>.core` (`kern.corefile`).
* MFC r320472,r320508,r320509:kib2017-07-1739-139/+191
| | | | | | Make stdio deferred cancel-safe. Requested by: eugen
* MFC r320988:bapt2017-07-171-41/+175
| | | | Update pci_vendors to 2017.07.13
* MFC r320468:delphij2017-07-173-5/+0
| | | | | | Don't bother to set target for SEEK_END. While there also collapase SEEK_END into default case in lseek.
* MFC r320433:delphij2017-07-171-5/+2
| | | | Use strlcpy() instead of strncpy() and nul-terminating.
* MFC r320986:delphij2017-07-173-195/+842
| | | | | | | | | Update arcmsr(4) to 1.40.00.00 in order to add support of ARC-1884 SATA RAID controllers. Many thanks to Areca for continuing to support FreeBSD. Submitted by: 黃清隆 <ching2048 areca com tw>
* MFC: r320458rmacklem2017-07-161-0/+2
| | | | | | | | | | | Fix an NFSv3 client case that probably never happens. If an NFSv3 server were to reply with weak cache consistency attributes, but not post operation attributes, the client would use garbage attributes from memory. This was spotted during work on the code for the NFSv4.1 client. I have never seen evidence that this happens and it wouldn't make sense for an NFSv3 server to do this, so this patch is basically "theoretical", but does fix the problem if a server were to do the above.
OpenPOWER on IntegriCloud