15477 Commits

Author SHA1 Message Date
wblock
b9ff855f5a MFC r276426:
Remove the svn:executable property from iscsi.4.
2015-01-13 22:41:38 +00:00
brueffer
e8b8983d0d MFH: r276695
Add a very basic manpage for the Etherswitch framework.
2015-01-12 10:43:40 +00:00
ngie
50b3937987 MFC r275687,r275692:
Relnotes: yes

r275687:

  Remove termcap entry reordering; install the file verbatim instead

  termcap entry reordering requires ex (which is available via usr.bin/vi), which
  breaks on build hosts where installworld is run with MK_VI == no (or when
  make delete-old is run on ^/projects/building-blocks as vi, et al, are
  removed on the branch when the knob is tweaked to => "no")

  Reordering termcap was believed to improve performance, but the file is now
  accessed via /etc/termcap.db, so /etc/termcap (and /usr/share/misc/termcap by
  proxy) access is less preferred.

  Reordering the file broke the historical comment <-> entry mapping as well,
  which could muddle the purpose of entries in the file, so it could be
  potentially harmful to readers in its reordered state.

  Discussion took place on hackers@ here:
  https://lists.freebsd.org/pipermail/freebsd-hackers/2014-December/046657.html

  Discussed with: -hackers, mp
  Sponsored by: EMC / Isilon Storage Division

r275692:

  Fix building termcap.db when make obj is run beforehand from a clean tree by
  using make variables for the filenames, which helps resolve pathing
  appropriately when running cap_mkdb

  Pointyhat to: me
2015-01-11 18:13:56 +00:00
ngie
0788f3bd13 Bump .Dd per r276674 2015-01-05 00:07:18 +00:00
ngie
f47f8667f0 MFC r276483:
The variable used with install(1) for stripping should be STRIPBIN, not
  STRIP_CMD

  Reported by: lev
2015-01-05 00:06:38 +00:00
ngie
d4c625976a MFC r264400,r265836:
r264400:

  NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
  and finish the job. ncurses is now the only Makefile in the tree that
  uses it since it wasn't a simple mechanical change, and will be
  addressed in a future commit.

r265836:

  Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
  what is needed.
2014-12-31 23:25:37 +00:00
ngie
b429a2bfd1 MFC r272343,r272458,r272890,r272891,r272901,r272902,r272903,r272905,r272908,r272909,r272910,r272914,r272915,r272979,r272980,r273010,r273011,r273012,r273015,r273017,r273019,r273020,r273021,r273022,r273023,r273024,r273025,r273389,r273390,r273391,r273393,r273395,r273396,r273397,r273410,r273516,r273517,r273520,r273521,r273522,r273523,r273524,r273525,r273526,r273527,r273528,r273529,r273530,r273533,r273534,r273535,r273536,r273537,r273538,r273539,r273540,r273572,r273574,r273578,r273579,r273591,r273592,r273928,r273933,r273935,r273936,r273937,r273938,r273942,r273943,r273945,r273946,r273947,r273948,r273949,r273950,r273951,r273952,r274061,r274062,r274066,r274067,r274072,r274074,r274079,r274090,r274142,r274143,r274571,r274572,r274573,r274574,r274575,r274576,r274577,r274579,r274597,r274598,r274599,r274600,r274601,r274626,r275033,r276046,r276430:
r272343:
r272458:

  Import the NetBSD test suite from ^/vendor/NetBSD/tests/09.30.2014_20.45 ,
  minus the vendor Makefiles

  Provide directions for how to bootstrap the vendor sources in
  FREEBSD-upgrade

  MFC after 2 weeks
  Discussed with: rpaulo
  Sponsored by: EMC / Isilon Storage Division

r272890:

  Only build/run hsearch_basic and hsearch_r_basic on NetBSD

  hdestroy1 is not present on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r272891:

  Expect SIGSEGV in lib/libc/stdlib/t_getenv:setenv_basic

  See bin/189805 for more details

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272901:

  Disable tests that don't pass on FreeBSD due to missing support in
  humanize_number(3). Bringing in additional revisions from NetBSD's
  humanize_number(3) will fix the tests

  Account for the fact that util.h on NetBSD is libutil.h on FreeBSD

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r272902:

  Add missing #include <sys/time.h> for gettimeofday

  Sponsored by: EMC / Isilon Storage Division

r272903:

  FreeBSD returns ENOTTY instead of EBADF in ttyname_r; mark it as an expected
  failure

  PR: 191936

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272905:

  FreeBSD doesn't support strings greater than MAXHOSTNAMELEN-1 in
  {get,set}{domain,host}name. Adjust the tests to not exceed that
  value when testing out the code

  Add a positive and negative test for MAXHOSTNAMELEN-1 and
  MAXHOSTNAMELEN, respectively

  PR: 181127
  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272908:

  Disable the invalid pointer test on FreeBSD

  FreeBSD segfaults on invalid pointers passed to getcwd because it throbs the
  address passed in in libc, whereas NetBSD just passes the information off to
  the syscall, which allows the kernel to return EFAULT on bad pointers.

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272909:

  Handle getting/setting niceness/priority correctly on FreeBSD vs NetBSD

  This might be fallout from PR: 189821

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r272910:

  SIGPWR does not exist on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r272914:

  Skip over t_spawn_open_nonexistent_diag because it requires NetBSD specific
  additions to posix_spawn

  Sponsored by: EMC / Isilon Storage Division

r272915:

  Port the testcase to FreeBSD

  - Make #include path to h_macros.h a non-relative path
  - __gl_stat_t is synonymous with struct stat on FreeBSD
  - FreeBSD doesn't have _DIRENT_RECLEN
  - Skip over glob_star on FreeBSD (testcase doesn't pass)

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272979:

  Only #include <sys/tls.h> on NetBSD

  Sponsored by: EMC / Isilon Storage Division

r272980:

  #include libutil.h for fparseln on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273010:

  Implement 64MB memory limit for test to ensure that it fails reliably in
  600 seconds; it would previously fail inconsistently when run in some virtual
  machine configurations

  This patch might need to be reverted or revisited later (see the attached PR
  for more details)

  PR: 169302

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273011:

  Fix compilation errors with missing wide-type headers and fix compilation
  warnings with -Wformat

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273012:

  - Add libutil #include for fparseln
  - Change ATF_REQUIRE_EQ_MSG to ATF_CHECK_EQ_MSG to gather all failing results
    possible (currently 12 with leftassoc)
  - Mark leftassoc "atf_tc_expect_fail" on FreeBSD (PR coming soon after further
    analysis is done on the code)

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273015:

  Expect nice_err to fail on FreeBSD with unprivileged users

  PR: 189821
  Sponsored by: EMC / Isilon Storage Division

r273017:

  Add #include <stdio.h> for printf

  Sponsored by: EMC / Isilon Storage Division

r273019:

  Do initial port of contrib/netbsd-tests/lib/libc/locale

  t_io:
  - Expect failures potentially related to implementation-specific knowledge of
  the zh_TW.Big5 locale [*]

  t_mbrtowc:
  - Handle unknown locales more gracefully (do not test if the locale doesn't
  exist)
  - Expect failure with mbrtowc_internal dealing with Japanese locales
  (potentially related to implementation detail knowledge of the ja_* locales) [*].

  t_mbstowcs, t_mbtowc, t_wctomb:
  - Handle unknown locales more gracefully (do not test if the locale doesn't
  exist)

  t_wcstod:
  - Treat FreeBSD like NetBSD and Linux in the XXX: FIXME section

  [*] More investigation is required to determine the root cause of the failures

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273020:

  memmem with NUL length "needle" (aka small) strings on FreeBSD/OSX returns
  NULL instead of the "haystack" value (aka big)

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273021:

  Use 1 as a random seed, as recommended in srandom(3). Adjust the random values
  accordingly

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273022:

  Add #include <stdio.h> to get sys_nerr definition

  Sponsored by: EMC / Isilon Storage Division

r273023:

  __isnanl is automatically picked according to data type in <math.h>. There
  isn't a need for the explicit __isnanl test

  Sponsored by: EMC / Isilon Storage Division

r273024:

  Only test the return value in mktime_negyear

  Testing for the errno is an optional requirement according to POSIX, and
  FreeBSD doesn't document that errno would be set on failure with mktime

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273025:

  Change ATF_REQUIRE_MSG calls to ATF_CHECK_MSG to get as many errors as possible

  t_strptime:common..
  - Expect the testcase body as a whole to fail. Multiple PRs will be filed to
  track the issues (there are 18 check failures)

  t_strptime:day..
  - %EA and %OA seem to be case insensitive on FreeBSD

r273389:

  Port lib/libc/gen/t_siginfo to FreeBSD

  - mcontext_t on FreeBSD doesn't have a __gregs field (it's split out on FreeBSD
  into separate fields). In order to avoid muddying the test code with MD code,
  the debugging trace info has not been implemented
  - FreeBSD does not implement the si_stime and si_utime fields in siginfo_t, so
  omit the debugging code that dumps the values
  - sys/inttypes.h doesn't exist on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273390:

  libutil.h is required for fparseln on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273391:

  Add missing #include for sys/stat.h for fchmod

  Sponsored by: EMC / Isilon Storage Division

r273393:

  Port t_write to FreeBSD

  - Mark the signo variable for the signal handle __unused
  - Use limits.h instead of sys/syslimits.h (the latter does not
  exist on FreeBSD)

  Sponsored by: EMC / Isilon Storage Division

r273395:

  Mark osi __unused so this compiles cleanly on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273396:

  unlink("/") fails with EISDIR instead of EBUSY on FreeBSD; test for that
  instead

  Sponsored by: EMC / Isilon Storage Division

r273397:

  Port t_chroot to FreeBSD

  - Add missing #include sys/stat.h for mkdir(2)
  - Omit the fchroot(2) tests because the support is not present on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273410:

  Add sys/socket.h #include for bind(2), et al

  Sponsored by: EMC / Isilon Storage Division

r273516:

  Add netinet/in.h for struct sockaddr_in

  Sponsored by: EMC / Isilon Storage Division

r273517:

  Expect getgroups_err to fail on FreeBSD

  PR: 189941
  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273520:

  Port t_pipe2.c to FreeBSD

  - Omit the pipe2_nosigpipe testcase on FreeBSD (FreeBSD doesn't have
    O_NOSIGPIPE).
  - Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)".
  - Save and restore the resource limit on the number of files (RLIMIT_NOFILE).

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273521:

  Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)"

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273522:

  - Mark unused parameters __unused in handler
  - Call sigqueue with getpid() instead of 0 -- the latter idiom appears to only
  be valid on NetBSD

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273523:

  Add limits.h #include for LINE_MAX

  Sponsored by: EMC / Isilon Storage Division

r273524:

  Add sys/socket.h #include for struct sockaddr_in

  Sponsored by: EMC / Isilon Storage Division

r273525:

  Port t_mmap.c to FreeBSD

  - Add needed headers for the testcases
  - Omit mmap_block on non-NetBSD OSes
  - Use "security.bsd.map_at_zero" instead of "vm.user_va0_disable"

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273526:

  Omit the pollts testcases on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273527:

  Omit all of the testcases as revoke(2) is only implemented on devfs(5)

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273528:

  Mark signo __unused in handler(..)

  Sponsored by: EMC / Isilon Storage Division

r273529:

  - Omit the poll testcases on FreeBSD (they require pollts)
  - Add necessary headers for the testcases

  Sponsored by: EMC / Isilon Storage Division

r273530:

  Add limits.h #include for INT_MAX

  Sponsored by: EMC / Isilon Storage Division

r273533:

  Use <atf_srcdir>/truncate_test.root_owned instead of /usr/bin/fpr as fpr does
  not exist on FreeBSD

  truncate_test.root_owned will be generated at build time and owned by root

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273534:

  - Mark sig/signo __unused
  - Do not provide a relative path via #include "h_macros.h"

  Sponsored by: EMC / Isilon Storage Division

r273535:

  - Omit setrlimit_nthr testcase on FreeBSD (requires lwp.h, et al)
  - Expect overflow with rlim_max at INT64_MAX, not UINT64_MAX (rlim_t is int64_t
  on FreeBSD)

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273536:

  Add limits.h #include for SSIZE_MAX

  Sponsored by: EMC / Isilon Storage Division

r273537:

  Add limits.h #include for SSIZE_MAX

  Sponsored by: EMC / Isilon Storage Division

r273538:

  Fix a typo (__FreeBSD__ -> __NetBSD__ when omitting setrlimit_nthr)

r273539:

  Mark signum __unused

  Sponsored by: EMC / Isilon Storage Division

r273540:

  Omit the mprotect_exec testcase on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273572:

  - Ignore EINVAL check with mknod(path, S_IFCHR, -1) as the testcase is always
    executed on a non-devfs filesystem
  - Expect mknod(path, S_IFREG, 0) to fail on FreeBSD

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273574:

  - Test for EINVAL requirement when passing an invalid flag in to msync(2)
  - Expect ENOMEM instead of EFAULT when msync'ing a previously munmap'ed region
    on FreeBSD

  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273578:

  - Add inttypes.h and stdint.h in lieu of int_limits.h from NetBSD
  - Use #include "h_macros.h" instead of relative path analog

  Sponsored by: EMC / Isilon Storage Division

r273579:

  - Mark signo __unused in the signal handler function
  - Effectively #if 0 out some code that does not fail on FreeBSD

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273591:

  Correct my previous commit:

  - getrusage_utime_back succeeds reliably on FreeBSD
  - getrusage_utime_zero passes/fails in a seemingly non-deterministic manner.
    Skip it for now (and fix it later)

  In the initial port of this testcase to FreeBSD, the results failed reliably
  in the same manner as it does on NetBSD

  Sponsored by: EMC / Isilon Storage Division

r273592:

  - Add sys/types.h for the APIs in sys/sysctl.h
  - Poke at VM_MIN_ADDRESS in machine/vmparam.h because FreeBSD doesn't have a
    vm.minaddress sysctl analog
  - Expect ENOMEM instead of EAGAIN in mlock_limits
  - Provide mlock an mmap'ed page twice to simulate MAP_WIRED on NetBSD

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273928:

  Put mtree test files into a subdirectory.

  Kyua 0.11 points TMPDIR to the test's work directory, and atf_check creates
  auxiliary files in TMPDIR.  This confuses a couple of mtree tests that were
  using the work directory's root to validate the contents of the directory.

  Fix the two affected tests by creating an auxiliary directory to use for
  the mtree tests.  (Kyua should probably do this on its own; filed bug #133
  upstream to take a look at this.)

r273933:

  Don't prune duplicate services in the expected output from /etc/services on
  FreeBSD

  Submitted by: pho

r273935:

  Port tests to FreeBSD/Linux

  Some of the testcases don't work outside of NetBSD, and the behavior of
  ether_aton_r differs between FreeBSD, Linux, and NetBSD, and the calls to the
  API need to be massaged for FreeBSD and Linux.

  Submitted by: pho

r273936:

  Port lib/libc/net/h_dns_server to FreeBSD

  Submitted by: pho

r273937:

  Port lib/libc/sys/t_dup to FreeBSD/Linux

  - The requirements differ between FreeBSD/Linux when dealing with oldd/newd
    being equal (both fail with EINVAL, not EBADF)
  - Add an EBADF testcase
  - Fix compilation issues on clang

  In collaboration with: pho

r273938:

  getitimer on FreeBSD returns the last set time instead of the remaining time;
  test for that instead

  Submitted by: pho

r273942:

  Skip :sethostname_basic because it messes up the test host's hostname

  Convert code from #if defined(__FreeBSD__) to #ifdef __FreeBSD__

r273943:

  Port t_kevent to FreeBSD

  Submitted by: pho

r273945:

  Port t_mincore to FreeBSD

  Mark :mincore_resid as atf_tc_expect_fail on FreeBSD because of new bug
  discovered in running the tests (it succeeded from earlier on in the year to
  September/October on FreeBSD, at least)

  Submitted by: pho

r273946:

  Port h_atexit to FreeBSD

  __cxa_atexit varies between FreeBSD and NetBSD, and thus we must use pointers
  instead of static fields in the BSS. More extensive discussion is included in
  the source code

  In collaboration with: kib
  Submitted by: pho

r273947:

  Expect :snprintf_posarg_error to blow up with a SIGSEGV on !NetBSD OSes

r273948:

  Disable testcases 12 and 15-22 on FreeBSD

  Submitted by: pho

r273949:

  Add new atf_tc_expect_fail to fflush_err; this is a new (within the past couple months) bug

r273950:

  Skip :fopen_regular on !NetBSD because it's a NetBSD specific test

  Submitted by: pho

r273951:

  Expect :sscanf_whitespace to fail on !NetBSD OSes

  Submitted by: pho

r273952:

  Port h_hash and t_sha2 to FreeBSD

  t_sha2 contains dirty copy-paste hacks that need to be fixed with the openssh
  OpenBSD compat layer

  Submitted by: pho

r274061:

  Port t_db.sh to FreeBSD

  - The blocksize on FreeBSD is 32kB, not 64kB
  - Add some detection for MK_DICT == no; /nonexistent is echoed along with
    atf_skip to ensure that the test will fail if dict(..) is called in the
    non-final stage of the pipeline

  Submitted by: pho

r274062:

  inet_network on FreeBSD returns NULL when provided "0x" to inet_network

  Submitted by: pho

r274066:

  Port lib/libc/ssp to FreeBSD

  In most cases, the buffers and data were resized, but when dealing with the
  helpers, some of the code was adjusted to fail more reliably

  Submitted by: pho

r274067:

  rpc_control on FreeBSD is a public-ish API (not prefixed with __), not private
  like NetBSD

  Submitted by: pho

r274072:

  Finish off lib/libc/stdlib/t_strtod.c port by checking for "y" twice on
  FreeBSD, and always assume long long double exists on FreeBSD

  Submitted by: pho

r274074:

  Add Makefile snippet to ease porting NetBSD testcases to FreeBSD from
  contrib/netbsd-tests

  This Makefile snippet handles polluting testcases with -lnetbsd, specific
  headers for ATF version differences, and does necessary rewriting for the
  testcases to match the format discussed on the TestSuite wiki page
  (t_<foo> -> <foo>_test)

  One must define SRCTOP (inspired by projects/bmake), OBJTOP, and TESTSRC
  (e.g. contrib/netbsd-tests/lib/libc/gen) to use the Makefile snippet

  Test programs are specific either via NETBSD_ATF_TESTS_C or NETBSD_ATF_TESTS_SH

  C++ analogs aren't currently implemented.

  The imported testcases will be cleaned up to use this Makefile snippet pseudo
  "API".

r274079:

  Import proper fix for misc/49356 (/usr/include/atf-c/config.h) after atf-c/config.h
  was removed from the build

  Pointyhat to: me (again, for not running make delete-old after running test builds)

r274090:

  Fix the Jenkins test run by skipping the negative testcases earlier

  The problem is that lib.libc.locale.t_io:bad_big5_wprintf was printing out
  illegal Unicode characters, which causes XML parsers to bail immediately, e.g.

  % kyua report-junit > ~/report.junit
  % python2 -c 'import xml.dom.minidom as md; md.parse("/home/ngie/report.junit")'
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/usr/local/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
      return expatbuilder.parse(file)
    File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
      result = builder.parseFile(fp)
    File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
      parser.Parse(buffer, 0)
  xml.parsers.expat.ExpatError: not well-formed (invalid token): line 27137, column 13

r274142:

  Remove expected failure from lib.libc.sys.t_mincore:mincore_resid

  The failure was added based on observation seen on 11.0-CURRENT @ r273153, not
  based on internal testing at EMC/Isilon

  PR: 194829
  Tested with the following configuration:
  - amd64/i386
  - 11.0-CURRENT @ r273153
  - 100 times in a tight loop as root with the following commands...
  -- kyua test lib/libc
  -- kyua test lib/libc/sys
  -- kyua test lib/libc/sys/mincore_test

r274143:

  Expect lib.libc.sys.getcontext_test.setcontext_link to fail on amd64; add
  additional debugging to make the underlying problem more visible

  Calling setcontext(2) on amd64 as shown in the test program is failing on
  amd64, not i386, with a return code of -1 and an errno of EINVAL

  Further investigation is being done in the PR to determine the root cause for
  the failure

  PR: 194828
  Tested with the following configuration:
  - amd64/i386
  - 11.0-CURRENT @ r273153
  - 100 times in a tight loop as root with the following commands...
  -- kyua test lib/libc
  -- kyua test lib/libc/sys
  -- kyua test lib/libc/sys/getcontext_test

r274571:

  Use _exit instead of exit so the file descriptors aren't flushed twice in the
  child processes

  Submitted by: pho

r274572:

  Only expect timeouts on powerpc with NetBSD

  Submitted by: pho

r274573:

  Expect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD

  PR: 191906
  In collaboration with: pho

r274574:

  Add pthread_np.h #include and initialize the pthread attribute on FreeBSD

  Submitted by: pho

r274575:

  #ifdef out a printf on !NetBSD that causes the testcase to fail when comparing
  the output from the helper program

  Submitted by: pho

r274576:

  Port helper program to FreeBSD, similar to ../../lib/libc/stdlib/h_atexit.c

  Submitted by: pho
  In collaboration with: kib

r274577:

  Add missing sys/time.h #include for timespecsub macro in lib/libnetbsd/sys/time.h

r274579:

  Call sem_unlink on semaphores before attempting to create them

  Due to the lack of uniqueness in the semaphore name, and the fact that the
  tests don't have cleanup routines, an interrupted test can leave a semaphore
  "laying around", causing all subsequent attempts to run the test to fail

  I will file a NetBSD PR for this issue soon

r274597:

  Skip the long-double epsilon checks on FreeBSD/i386

  Sponsored by: EMC / Isilon Storage Division

r274598:

  Reset errno to 0 before running scalbn to be sure that the tested errno is
  valid

  Sponsored by: EMC / Isilon Storage Division

r274599:

  Alias isinff to isinf on FreeBSD

  isinf on FreeBSD automatically picks the appropriate type per math.h

  Sponsored by: EMC / Isilon Storage Division

r274600:

  - Expect exp2_powers to fail on FreeBSD/i386
  - Expect exp2_values to fail on FreeBSD due to the small epsilon

  Sponsored by: EMC / Isilon Storage Division

r274601:

  - Skip over the testcases that call cbrtl on platforms where LDBL_PREC == 53
  (arm, mips, powerpc). This fixes the build on these platforms, based on some
  ad hoc tinderbox runs I did a while ago
  - Skip cast the arguments to powl as long double so powl properly interprets
  those arugments at compile-time when picking the type

  Sponsored by: EMC / Isilon Storage Division

r274626:

  Mechanically replace #if defined(__FreeBSD__) and #if defined(__NetBSD__) with
  their #ifdef equivalents for everything changed in contrib/netbsd-tests. There
  are some items from the vendor tree that use #if defined(__FreeBSD__) or
  #if defined(__NetBSD__) which are being left alone

  Requested by: bde, rpaulo
  Sponsored by: EMC / Isilon Storage Division

r275033:

  Only pass 6 arguments to the 'run' function on amd64.  amd64's
  makecontext on FreeBSD only supports a maximum of 6 arguments.  This
  fixes the setcontext_link test on amd64.

  PR:		194828

r276046:

  Add __FreeBSD_version guards around hsearch_r to ease MFCing the code to
  stable/10

  It was added when __FreeBSD_version was ~1100027

r276430:

  Expect access_test:access_inval to fail before __FreeBSD_version == 1100033

  This will allow me to MFC the test, as jilles@ requested that I don't MFC the
  access(2) KBI change to 10-STABLE in r271655
2014-12-31 20:13:31 +00:00
peterj
bb94e30e60 MFH r274083:
convert .Nm to proper .Xr's...

MFH r275298:
Cross reference tap(4) and tun(4) and include a short explanation as
to how they differ.  This will assist users in selecting which interface
is more appropriate for their purposes.

No objection:	jmg (r274083)
Approved by:	grog (co-mentor)
2014-12-30 23:52:48 +00:00
ngie
b7c609250b MFC r274077:
As an optimization (in simple, well used cases) only call cat ${.ALLSRC} when
  generating files from various sources instead of calling cat ${.ALLSRC} | sed

  The perl case was skipped because it's not being used in the tree at this time
2014-12-30 20:46:01 +00:00
ngie
28d09f6c08 MFC r267276:
Ensure files are created during the build when using bsd.subdir.mk.

  When FILES is defined in a Makefile that _also_ includes bsd.subdir.mk, the
  build of the files (if any) was not properly triggered during the build
  stage.  This was because bsd.files.mk did not define the buildfiles target
  if it was already defined... and bsd.subdir.mk defined this target on its
  own, thus causing a conflict.

  Fix this by unconditionally defining buildfiles from bsd.files.mk; this is
  safe because nothing else in the tree needs to redefine this and because the
  target itself contains no commands: all it does is define dependencies.
  Also ensure that bsd.files.mk is always pulled in by bsd.test.mk regardless
  of what bsd.prog.mk does.

  These fixes allow "make installworld" to run cleanly on a system with
  read-only src and obj trees.

  This is "make tinderbox" clean.

  Reviewed by:	imp
  Obtained from:	jilles
2014-12-30 20:44:05 +00:00
ngie
21a79436a4 MFC r275908,r276309:
r275908:

  Document STRIP_CMD in build(7) and note its importance with LOCAL_ITOOLS

  Phabric: D1335
  Reviewed by: brueffer
  Sponsored by: EMC / Isilon Storage Division

r276309:

  Bump .Dd for change done in r275908
2014-12-27 17:14:53 +00:00
ian
d082e488cb MFC r274641, r274644, r274822, r276049:
Allow i2c bus speed to be configured via hints, FDT data, and sysctl.

  Implement bus speed setting for OMAP4, AM335x, and imx5/6.

  Fix the i2c bus speed divisors for TI OMAP4 and AM335x to give the
  advertised 100, 400, and 1000 KHz speeds.

PR:		195009
2014-12-27 02:37:52 +00:00
ae
7a82e24551 MFC r273087 (with modifications):
Overhaul if_gif(4):
   o convert to if_transmit;
   o use rmlock to protect access to gif_softc;
   o use sx lock to protect from concurrent ioctls;
   o remove a lot of unneeded and duplicated code;
   o remove cached route support (it won't work with concurrent io);
   o style fixes.

MFC r273090:
  Move memset under ifdef INET6.

MFC r273091:
  Add more ifdefs. SIOC*_IN6 are defined only with INET6.

MFC r273121:
  Add inet/inet6 to the dependency list. Without them if_gif is useless.

MFC r273209 by bz:
  After r273087,r273090,r273091,r273121 changes to gif(4) try to fix
  NOIP builds for real.

MFC r273587:
  Remove redundant check and m_pullup() call.
2014-12-23 16:33:44 +00:00
ngie
964f5a1f13 MFC r273803,r273810:
r273803:

  Filter out TESTS_SUBDIRS already added to SUBDIR instead of blindly
  appending the TESTS_SUBDIRS variable to SUBDIR

  Duplicate directory entries can cause unexpected side effects, like
  installing the same files multiple times. This can be easily
  reproduced via the following testcase prior to this commit:

    SUBDIR= dir
    TESTS_SUBDIRS+= dir

    .include <bsd.test.mk>

  Sponsored by: EMC / Isilon Storage Division

r273810:

  Fix the logic inversion in the previous commit by ensuring that the matched
  expression (:M) is empty, not the not matched (:N) is empty. The former case
  means we have not found the TEST_SUBDIR value in SUBDIR

  Reported by: rodrigc
  Pointyhat to: me (did not use a clean install root)
  Sponsored by: EMC / Isilon Storage Division
2014-12-22 00:50:08 +00:00
ngie
8cd5c94ddb MFC r273186,r273873:
r273186:

  Don't define rules based on PROGS if PROGS is empty.

  Reviewed by:	sjg, ngie
  Sponsored by:	EMC / Isilon Storage Division

r273873:

  Use the right depend file for each program.

  bsd.progs.mk generates a separate depend file for every program being
  built, but then it does not properly tell each submake to use those
  individual files.  Properly propagate the depend file to use.

  Discovered while preparing the update of atf to 0.21 and noticing that
  the test programs were not being relinked to the new library.

  This change is "make tinderbox" clean.
2014-12-22 00:21:24 +00:00
ngie
dc3ad5131f MFC r273929:
r273929 (by jmmv):

  MFV: Import atf-0.21.
2014-12-21 08:30:18 +00:00
andrew
498f8a6312 Revert r275778, gcc 4.2.1 doesn't handle -march=armv7. 2014-12-15 18:13:03 +00:00
andrew
7f8f9c5128 MFC 275379:
Set the correct architecture when targeting ARMv7

Sponsored by:	ABT Systems Ltd
2014-12-14 18:51:13 +00:00
avg
36fdb56baa MFC r275045: callout(9): add sbt flavors of callout_schedule
Not applicable to earlier releases.
2014-12-08 13:13:17 +00:00
ngie
2ceba1b134 MFC r272057,r272083,r272084,r272087,r274016:
r272057:

  Import pjdfstest from ^/vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91

  - Remove tools/regression/pjdfstest
  - Add upgrade directions for contrib/pjdfstest
  - Add a note to UPDATING for the move (the reachover Makefiles are coming
    soon)

  Functional differences:
  - ftruncate testcases are added from upstream (github)

  Non-functional differences:
  - The copyright for the project has been updated to 2012
  - pjd's contact information has been updated

  Discussed with: -testing, jmmv, pjd
  Sponsored by: EMC / Isilon Storage Division

r272083:

  Expect ELOOP on Darwin/Linux with "O_NOFOLLOW was specified and the target is a
  symbolic link" case. Assume EMLINK on the rest of the OSes (FreeBSD, Solaris,
  etc)

  Sponsored by: EMC / Isilon Storage Division

r272084:

  Fix the executed testplan count

  Sponsored by: EMC / Isilon Storage Division

r272087:

  Increase the memory disk size in the following testcases to avoid mount
  failures, which would cause cascade failures in the rest of the test
  run:

  link/15.t, open/19.t, mkdir/11.t, mkfifo/11.t, symlink/11.t

  Fail quickly in all of the testcases if mdconfig, mount, umount, etc
  fails to avoid issues similar to this in the future

  Submitted by: Casey Peel <cpeel@isilon.com>
  Sponsored by: EMC / Isilon Storage Division

r274016:

  Integrate pjdfstest test suite execution into kyua

  pjdfstest execution is opt-in and must be done as root due to some of the
  assumptions made by the test suite and lack of error checking in the non-root
  case

  A description of how to execute pjdfstest with kyua is provided in
  share/pjdfstest/README

  Phabric: D824 (an earlier prototype patch)
  Relnotes: yes
  Sponsored by: EMC / Isilon Storage Division
2014-12-05 11:44:18 +00:00
bryanv
f9a98c5bdd MFC r273515, r274055, r274063, r274215, r274065, r274502:
Add VirtIO console driver.
2014-11-29 22:48:40 +00:00
trasz
6d726858a2 MFC r273690:
Mention VAAI and ODX in ctl(4).

Sponsored by:	The FreeBSD Foundation
2014-11-27 10:31:11 +00:00
dteske
7230e71362 MFC r274116:
Add new libraries/utilities for data throughput visualization.
dpv(3): dialog progress view library
dpv(1): stream data from stdin or multiple paths with dialog progress view
figpar(3): configuration file parsing library

MFC r274120, r274121, r274123, r274124, r274144, r274146, r274159, r274192,
r274203, r274209, r274226, r274270, and r274851: Fixes following r274116

Reviews:        D714
Relnotes:       New libdpv/libfigpar and dpv(1) utility
Reviewed by:    jelischer, shurd
Discussed at:   MeetBSD California 2014 Vendor/Dev Summit
Discussed on:   -current
Thanks to:      ngie, ian, jelischer, shurd, bapt
2014-11-25 13:47:53 +00:00
dumbbell
2b470c5d75 drm: Take vt(4) default mode from loader tunables
By default, vt(4) gets the "preferred mode" from DRM, when using a DRM
video driver as its backend. The preferred mode is usually the native
screen resolution.

Now, if this mode isn't appropriate, a user can use loader tunables to
select a mode. The tunables are read in the following order:
    1. kern.vt.fb.modes.$connector_name
    2. kern.vt.fb.default_mode

For example, to set a 1024x768 mode, no matter the connector:
    kern.vt.fb.default_mode="1024x768"

To set a 800x600 mode only on the laptop builtin screen:
    kern.vt.fb.modes.LVDS-1="800x600"

Beside r274031, this MFC includes:

r274049:
  drm: When reading connector mode tunables, list connectors

  ... and their associated tunables. This gives a way to know the list of
  available connectors, no matter the driver.

  The problem is that xrandr(1) can list connectors but it uses a
  different naming.

r274050:
  vt(4): Document kern.vt.fb.default_mode and kern.vt.fb.modes.*

  Those tunables are used to set a specific mode in vt(4) instead of using
  the default mode.

  Differential Revision:	https://reviews.freebsd.org/D1098
  Reviewed by:	ak@, emaste@, kwm@

r274051:
  vt(4): Improve the description of kern.vt.fb.modes.$connector

  Differential Revision:	https://reviews.freebsd.org/D1098
  Submitted by:	emaste@

r274053:
  vt(4): Start new sentences on their own lines

  Submitted by:	brueffer@

MFC of:		r274031, r274049, r274050, r274051, r274053
2014-11-22 17:37:51 +00:00
mav
e86b237c8d MFC r274532: Remove mostly obsolete hint to disable LAPIC timers.
It is partially covered by new code and partially by new CPUs.

PR:		195016
Submitted by:	tobias.rehbein@web.de
2014-11-21 00:58:58 +00:00
kib
e4b2ee7e2b Merge the fueword(9) and casueword(9). In particular,
MFC r273783:
Add fueword(9) and casueword(9) functions.
MFC note: ia64 is handled like arm, with NO_FUEWORD define.

MFC r273784:
Replace some calls to fuword() by fueword() with proper error checking.

MFC r273785:
Convert kern_umtx.c to use fueword() and casueword().
MFC note: the sys__umtx_lock and sys__umtx_unlock syscalls are not
converted, they are removed from HEAD, and not used.  The do_sem2*()
family is not yet merged to stable/10, corresponding chunk will be
merged after do_sem2* are committed.

MFC r273788 (by jkim):
Actually install casuword(9) to fix build.

MFC r273911:
Add type qualifier volatile to the base (userspace) address argument
of fuword(9) and suword(9).
2014-11-18 12:53:32 +00:00
kib
e01547e9e7 MFC r273966:
Fix two issues with lockmgr(9) LK_CAN_SHARE() test, related
to the exclusive locker starvation.

MFC r273986:
Fix the build with ADAPTIVE_LOCKMGRS kernel option.
2014-11-16 23:02:32 +00:00
delphij
b671144801 MFV r273747:
Remove an extra copy of hv_kvp_daemon(8) [1].

While I'm there also correct typos in OptionalObsoleteFiles and add
information of the command line options for hv_kvp_daemon(8).

Reported by:	jmg [1]
Reviewed by:	jmg
2014-11-11 05:55:37 +00:00
jpaetzel
2b3683aa2c MFC: 258080
Add support for multiple instances of ftp-proxy
and pflog devices.

PR:     conf/158171
Submitted by:   Thomas Johnson <tom@claimlynx.com>
2014-11-09 20:08:43 +00:00
lwhsu
7cb84aa335 MFC r271992
Reflect the chanages in sleepqueue.h and subr_sleepqueue.c
  - Priority argument is introduced to sleepq_*wait* in r177085
  - sleepq_calc_signal_retval is removed from implementation
  - sleepq_catch_signals is internal now

MFC r272475

  - Bump .Dd

Approved by:  kevlo
2014-11-05 16:24:57 +00:00
jhb
a245d679cf MFC 273644,273738:
Clarify that pthread_cleanup_push()/pop() are implemented as macros that
create a new code block and thus must be balanced at the same lexical
scope.  (This is also a requirement in POSIX.)

PR:		194280
Submitted by:	dr2867.business@pacbell.net
2014-11-02 23:22:22 +00:00
hrs
e57a7947db MFC r272974,272976:
Add ${name}_env and ${name}_prepend.  ${name}_env is an argument list which
will be passed to env(1).  ${name}_prepend is simply prepended to the command
line for $command.
2014-11-02 22:41:55 +00:00
hselasky
07b5c0c04d MFC r271159, r271168 and r271680:
Add USB LED driver for the Dream Cheeky WebMail Notifier.
2014-10-31 07:33:56 +00:00
sbruno
47c62aa0b0 MFC r272720, 273061, 273062, 273063, 273064
Implement PLPMTUD blackhole detection (RFC 4821), inspired by code
from xnu sources.  If we encounter a network where ICMP is blocked
the Needs Frag indicator may not propagate back to us.  Attempt to
downshift the mss once to a preconfigured value.

Note, this is turned off by default.
2014-10-29 22:17:45 +00:00
mav
f3c02a878d MFC r273457: Document sort_io_queue sysctls/tunables. 2014-10-29 00:27:02 +00:00
ian
14eb39a57d MFC r271907: Add a man page for the cgem(4) driver. 2014-10-26 03:55:55 +00:00
ian
3c5c1218bc MFC r271057: Create a /boot/dtb directory to house DTB blobs. 2014-10-26 02:27:10 +00:00
emaste
26b32ff4ad Add vtfontcvt(8) cross-reference to vt(4) man page
MFC of r273332
2014-10-23 02:18:23 +00:00
ngie
0154db985c MFC r272917:
Add LDFLAGS to PROG_VARS so it can be overridden on a per-PROG basis

  Sponsored by: EMC / Isilon Storage Division
2014-10-23 01:08:31 +00:00
ngie
813210d1c2 MFC r272055:
Improve bsd.progs.mk compatibility with bsd.prog.mk

  1. Do not install FILES/SCRIPTS multiple times if PROGS is specified; this is
     already handled via bsd.prog.mk when it's called recursively (PR: 191055,
     191955).
  2. Some variables, like BINDIR and PROGNAME, default to a value if unset
     whereas others get appended to, like CFLAGS. Add support for the former case
     (PR: 191056)
  3. Make "checkdpadd" and "clean" available targets for recursive execution.

  Reviewed by: marcel, sjg
  Phabric: D822
  PR: 191055, 191056, 191955
  Sponsored by: EMC / Isilon Storage Division
2014-10-23 00:54:52 +00:00
ngie
2b8c74e174 MFC r271365:
Remove many false positives with make checkdpadd

  - Reduce DPADD and LDADD in checkdpadd to -l<foo>
  - Skip over -Wl,[es]*-group because -Wl,--end-group and
    -Wl,--start-group might be required to properly link objects (see
    usr.bin/clang/lldb as an example)

  This caveat has been present for a while with some components of
  the build. However, these false positives were made more more apparent
  after r269648.

  Phabric: D635
  Reviewed by: jmmv (an earlier version)
  PR: 192730
2014-10-23 00:51:52 +00:00
emaste
6c5ddf4faf Add basic UEFI boot procedure manpage
MFC of r273218 and r273235.
2014-10-21 14:47:26 +00:00
mav
32b4feead7 MFC r271926: Mention read_ahead tunables/sysctls. 2014-10-21 06:25:41 +00:00
mav
3e285508e6 MFC r262332 (by ivoras): Grammar fix 2014-10-21 06:24:15 +00:00
mav
227f786a57 MFC r262294 (by ivoras):
Explain how and where kern.cam.ada.write_cache can be set in practical
situations.
2014-10-21 06:23:14 +00:00
yongari
07a67189e8 MFC r272731:
Document newly added controller AR816x/AR817x.
2014-10-21 04:54:37 +00:00
mav
173113fe4e MFC r273072: Add LBPERE mode bit definition. 2014-10-20 08:09:36 +00:00
emaste
f22cd31080 MFC r273178: Update vt(4) for UEFI defaults and special keys
vt(4) is the default console for UEFI boot [1], and the bitmapped
  kern.vt.spclkeys sysctl has been replaced with individual kern.vt.kbd_*
  enable sysctls.

PR:		193710
2014-10-20 00:22:08 +00:00
jhb
c818e625dc MFC 268369,268817,272771,272772:
Rewrite timeout(9) to be callout(9)-centric instead.  Move the description
of timeout(9) to the end and mark it prominently as deprecated.  Document
somewhat how times are specified for the 'sbt' variants.  Better explain
how using callout_init_*() to associate a lock with a callout resolves
common races.
2014-10-17 20:03:01 +00:00
gjb
dcfed64a2e MFC r272414:
Merge the following revisions from ^/projects/release-vmimage:

  r272234, r272236, r272262, r272264, r272269, r272271, r272272,
  r272277, r272279, r272376, r272380, r272381, r272392, r272234,
  r272412:

  r272234:
    Initial commit to include virtual machine images as part
    of the FreeBSD release builds.

    This adds a make(1) environment variable requirement,
    WITH_VMIMAGES, which triggers the virtual machine image
    targets when not defined to an empty value.

    Relevant user-driven variables include:

     o VMFORMATS:	The virtual machine image formats to create.
       Valid formats are provided by running 'mkimg --formats'

     o VMSIZE:	The size of the resulting virtual machine
       image.  Typical compression is roughly 140Mb, regardless
       of the target size (10GB, 15GB, 20GB, 40GB sizes have been
       tested with the same result).

     o VMBASE:	The prefix of the virtual machine disk images.
       The VMBASE make(1) environment variable is suffixed with
       each format in VMFORMATS for each individual disk image, as
       well as '.img' for the source UFS filesystem passed to
       mkimg(1).

    This also includes a new script, mk-vmimage.sh, based on how
    the VM images for 10.0-RELEASE, 9.3-RELEASE, and 10.1-RELEASE
    were created (mk-vmimage.sh in ^/user/gjb/thermite/).

    With the order in which the stages need to occur, as well as
    sanity-checking error cases, it makes much more sense to
    execute a shell script called from make(1), using env(1) to
    set specific parameters for the target image than it does to
    do this in make(1) directly.

  r272236:
    Use VMBASE in place of a hard-coded filename in the CLEANFILES
    list.

  r272262:
    Remove a 'set -x' that snuck in during testing.

  r272264:
    release/Makefile:
      Connect the virtual machine image build to the release
      target if WITH_VMIMAGES is set to a non-empty value.

    release/release.sh:
      Add WITH_VMIMAGES to RELEASE_RMAKEFLAGS.

    release/release.conf.sample:
      Add commented entries for tuning the release build if the
      WITH_VMIMAGES make(1) environment variable is set to
      a non-empty value.

  r272269:
    release/Makefile:
      Include .OBJDIR in DESTDIR in the vm-base target.

    release/release.sh:
      Provide the full path to mddev.

  r272271:
    Fix UFS label for the root filesystem.

  r272272:
    Remove comments left in accidentally while testing, so the
    VM /etc/fstab is actually created.

  r272277:
    Remove the UFS label from the root filesystem since it is added
    by mkimg(1) as a gpt label, consistent with the fstab(5) entry.

  r272279:
    Comment cleanup in panic() message when mkimg(1) does not support
    the requested disk image format.

  r272376:
    Separate release/scripts/mk-vmimage.sh to machine-specific
    scripts, making it possible to mimic the functionality for
    non-x86 targets.

    Move echo output if MAKEFLAGS is empty outside of usage().

    Remove TARGET/TARGET_ARCH evaluation.

  r272380:
    Avoid using env(1) to set values passed to mk-vmimage.sh,
    and instead pass the values as arguments to the script,
    making it easier to run this by hand, without 'make release'.

    Add usage_vm_base() and usage_vm_image() usage helpers.

  r272381:
    After evaluating WITH_VMIMAGES is non-empty, ensure
    the mk-vmimage.sh script exists before running it.

  r272392:
    Add WITH_COMPRESSED_VMIMAGES variable, which when set enables
    xz(1) compression of the virtual machine images.

    This is intentionally separate to allow more fine-grained
    tuning over which images are compressed, especially in cases
    where compressing 20GB sparse images can take hours.

  r272412:
    Document the new 'vm-image' target, and associated release.conf
    variables.

  r272413:
    Remove two stray comments added during the initial iterations
    of testing, no longer needed.

Sponsored by:	The FreeBSD Foundation
2014-10-14 12:23:44 +00:00