summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r318715,r318717,r318718,r318719,r318720,r318721:ngie2017-07-186-44/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r318715: _umtx_op(2): fix minor manlint issues - Sort .Xr entries in SEE ALSO section. - Sort SEE ALSO and STANDARDS sections properly, in terms of the entire document. r318717: cap_enter(2): fix manlint issues - Sort SEE ALSO section appropriately. - Correct section for sysctl(9). 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-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 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/+164
| | | | | | | | | | | | | | | 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 r303212,r319642,r319830:ngie2017-07-189-27/+384
| | | | | | | | | | | | | | | | | | | 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 r318701,r319842:ngie2017-07-182-3/+3
| | | | | | | | | | | | | | | r318701: tcsendbreak(3): delete spurious blank line at the end of the man page r319842: 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 r318257,r318278:ngie2017-07-183-13/+14
| | | | | | | | | | | | | | | | | | | r318257: style(9): sort headers r318278: Mark errf _Noreturn, and mark errf and warn __printflike The _Noreturn attribute was added to placate Coverity and other static analysis tools. The __printflike attribute was added to catch issues with the calls related to printf(3) abuse. - Modify the code to facilitate the __printflike attribute addition. - Convert errf calls in to_mb(..) and to_mb_string(..) to warn(..) so the calls will return instead of exiting, as the code suggests it should.
* MFC r318705,r318711:ngie2017-07-182-9/+14
| | | | | | | | | | | | | | | | r318705: fopen(3): make manlint fixes - Break on new lines. - Use .Dv with NULL. - Rewrap lines as necessary/when possible. r318711: fopencookie(3): declare function pointers in SYNOPSIS correctly Add obligatory `*` in declarations.
* 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/+716
| | | | | | | | | | | | | | 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 r321109:ngie2017-07-181-1/+1
| | | | 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 r318180:ngie2017-07-171-0/+1
| | | | | | | | | | | | | | | Mark all md tests as requiring unsafe AIO in order to function These tests have been flapping (failing<->passing) on Jenkins for months. It passes reliably for me if unsafe AIO is permitted, but it doesn't pass on Jenkins reliably if unsafe AIO is disabled (the current default). Mark the tests as requiring unsafe AIO to mitigate the intermittent failures when unsafe AIO isn't permitted. If the kernel code is changed to reliably function with md(4) devices using unsafe AIO, this commit can be reverted. PR: 217261
* 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 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/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 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 r320868:kib2017-07-171-32/+44
| | | | Fix warnings, adjust style.
* MFC r320989:kib2017-07-171-9/+10
| | | | Language improvements.
* MFC r320986:delphij2017-07-173-172/+826
| | | | | | | | | 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 r319162:wulf2017-07-161-24/+582
| | | | | | psm: add support for evdev protocol Approved by: gonzo (mentor)
* MFC r319890: Correct bitwise test in mac_bsdextended ugidfw_rule_valid()emaste2017-07-161-1/+1
| | | | | | | PR: 218039 CID: 1008934 Reported by: Coverity, PVS-Studio Sponsored by: The FreeBSD Foundation
* MFC r319516: tsan: set noexec stack on aarch64emaste2017-07-161-1/+1
| | | | Sponsored by: The FreeBSD Foundation
* MFC r319219: add a sanity check before installworld on the running systememaste2017-07-161-0/+16
| | | | | | | | | | | | | | | | FreeBSD does not guarantee kernel forward compatibility (that is, running a newer userland on an older kernel). The documented upgrade procedure specifies that installkernel should be performed, followed by a reboot and then installworld. As a sanity check when installing onto the running system (DESTDIR is / or unset), attempt to run "sh echo OK" using rescue from the objdir. If rescue fails (e.g., because the system has not been rebooted and the "old" kernel lacks a system call required by the to-be-installed world), abort the installation. This was added to avoid ino64 foot-shooting in HEAD, but is generally useful for any upgrade case adding new syscalls. Sponsored by: The FreeBSD Foundation
* MFC r320065: arm: add .arch_extension sec for smc instructionemaste2017-07-161-1/+2
| | | | | | | Clang 4.0 accepts the smc instruction with or without specifying .arch_extension sec, but Clang 5.0 produces an error without it. Sponsored by: The FreeBSD Foundation
* MFC r320969:gjb2017-07-161-1/+1
| | | | | | Fix a missing comment marker. Sponsored by: The FreeBSD Foundation
* MFC r320056: arm: set appropriate section flags for .init_pagetableemaste2017-07-162-2/+2
| | | | | | | | | | | | | | | The arm kernel linker scripts place the .init_pagetable section in .bss, but .init_pagetable had no section flags set, and so did not match the expected flags for .bss. GNU ld silently ignores this case, but lld reports an error: ld: error: incompatible section flags for .bss >>> locore.o:(.init_pagetable): 0x0 >>> output section .bss: 0x3 PR: 220055 Sponsored by: The FreeBSD Foundation
* MFC r320988:bapt2017-07-161-41/+175
| | | | Update pci_vendors to 2017.07.13
* MFC r311204:markj2017-07-161-1/+8
| | | | Add some missing atomic_*_ptr #defines for arm.
* MFC: r320458rmacklem2017-07-151-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.
* MFC: r320345rmacklem2017-07-155-29/+72
| | | | | | | | | | | | | | Add support to the NFSv4.1/pNFS client for commits through the DS. A NFSv4.1/pNFS server using File Layout can specify that Commit operations are to be done against the DS instead of MDS. Since no extant pNFS server did this, the code was untested and "#ifdef notyet". The FreeBSD pNFS server I am developing does specify that Commits be done through the DS, so the code has been enabled/tested. This patch should only affect the case of a pNFS server that specfies Commits through the DS. Relnotes: yes
* MFC r320595:dchagin2017-07-153-0/+39
| | | | | | | | | Add support for musl consumers to the Linuxulator. PR: 213809 Submitted by: Yonas Yanfa (for amd64) Reported by: Yonas Yanfa Relnotes: yes
* MFC r319057:dchagin2017-07-151-22/+0
| | | | | In r246085 some bits that are MI movied out into headers in compat/linux, but I missed that when I commited x86_64 Linuxulator. So remove the duplicates.
* MFC r320804:kib2017-07-151-4/+3
| | | | Fix handling of one more possible exception on return to usermode.
* MFC: r320323rmacklem2017-07-141-0/+7
| | | | Add RPC count reporting for the two new RPCs added by r320322.
* MFC: r320322rmacklem2017-07-145-177/+830
| | | | | | | | | | | | | | | Add two new compound RPCs to the NFSv4.1/pNFS client. When the NFSv4.1 client is doing pNFS, it needs to get an Open and a Layout for every file it will be doing I/O on. The current code does two separate RPCs to get these. This patch adds two new compounds that do the both the Open and LayoutGet in the same RPC, reducing the RPC count. It also factors out the code that sets up and parses the LayoutGet operation into separate functions, so that the code doesn't get duplicated for these new RPCs. This patch is fairly large, but should only affect the NFSv4.1 client when the "pnfs" option is specified.
* MFC r320501:kib2017-07-141-3/+13
| | | | Correct fences for sys/refcount.h.
* MFC r320489:jhibbits2017-07-141-2/+2
| | | | Use the more common Book-E idiom for disabling interrupts.
OpenPOWER on IntegriCloud