Re: svn commit: r325504 - head/lib/libclang_rt

2017-11-07 Thread Ngie Cooper (yaneurabeya)

> On Nov 7, 2017, at 11:20, Bryan Drewery  wrote:
> 
> On 11/6/2017 10:26 PM, Ngie Cooper wrote:
>> Author: ngie
>> Date: Tue Nov  7 06:26:48 2017
>> New Revision: 325504
>> URL: https://svnweb.freebsd.org/changeset/base/325504
>> 
>> Log:
>>  Redo r325502
>> 
>>  :U:Mfoo expands to :Mfoo, apparently. Explicit check for CPUTYPE being
>>  defined, and test for it's value not containing *soft* before calling 
>> CRTARCH
>>  armhf.
>> 
>>  Tested, somewhat. Unfortunately recent changes appear to have affected
>>  cross-builds where it no longer works, per my tests after universe12a being
>>  upgraded from 07/2017 to 11/2017 sources (DESTDIR isn't being used in 
>> WORLDTMP;
>>  MK_SYSTEM_COMPILER might be causing issues right now).
>> 
> 
> In buildworld DESTDIR usually is set to WORLDTMP.  But how does the
> comment relate to CPUTYPE?  What "no longer works" about cross-builds?

If I had my log, I would dig it up, but it’s easy to trigger with “make 
tinderbox TARGETS=arm” on that branch :/.

Basically, it wasn’t looking for libraries in the host toolchain’s directory 
(`/usr/lib/…`), not `/usr/lib/…`.

Cheers,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r325504 - head/lib/libclang_rt

2017-11-06 Thread Ngie Cooper
Author: ngie
Date: Tue Nov  7 06:26:48 2017
New Revision: 325504
URL: https://svnweb.freebsd.org/changeset/base/325504

Log:
  Redo r325502
  
  :U:Mfoo expands to :Mfoo, apparently. Explicit check for CPUTYPE being
  defined, and test for it's value not containing *soft* before calling CRTARCH
  armhf.
  
  Tested, somewhat. Unfortunately recent changes appear to have affected
  cross-builds where it no longer works, per my tests after universe12a being
  upgraded from 07/2017 to 11/2017 sources (DESTDIR isn't being used in 
WORLDTMP;
  MK_SYSTEM_COMPILER might be causing issues right now).
  
  MFC after:1 week
  MFC with: r325502
  Reported by:  imp

Modified:
  head/lib/libclang_rt/Makefile.inc

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Tue Nov  7 05:07:09 2017
(r325503)
+++ head/lib/libclang_rt/Makefile.inc   Tue Nov  7 06:26:48 2017
(r325504)
@@ -3,7 +3,8 @@
 .include 
 
 .if ${MACHINE} == "arm"
-.if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:U:M*soft*} == ""
+.if ${MACHINE_ARCH:Marmv[67]*} != "" && \
+(defined(CPUTYPE) && ${CPUTYPE:M*soft*} == "")
 CRTARCH=   armhf
 .endif
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r325502 - head/lib/libclang_rt

2017-11-06 Thread Ngie Cooper
Author: ngie
Date: Tue Nov  7 05:02:36 2017
New Revision: 325502
URL: https://svnweb.freebsd.org/changeset/base/325502

Log:
  Handle arm/armv[67] hosted/targeted builds gracefully
  
  CPUTYPE (apparently) isn't defined in non-cross-builds, which caused
  arm/armv[67] hosted/targeted builds to fail when evaluating CPUTYPE.
  
  Add the :U modifier to CPUTYPE so it evaluates to "". This allows armv[67] to
  get past the conditional successfully.
  
  MFC after:1 week
  Reported by:  bob prohaska 

Modified:
  head/lib/libclang_rt/Makefile.inc

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Tue Nov  7 04:56:53 2017
(r325501)
+++ head/lib/libclang_rt/Makefile.inc   Tue Nov  7 05:02:36 2017
(r325502)
@@ -3,7 +3,7 @@
 .include 
 
 .if ${MACHINE} == "arm"
-.if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:M*soft*} == ""
+.if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:U:M*soft*} == ""
 CRTARCH=   armhf
 .endif
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r325501 - head/lib/libclang_rt

2017-11-06 Thread Ngie Cooper
Author: ngie
Date: Tue Nov  7 04:56:53 2017
New Revision: 325501
URL: https://svnweb.freebsd.org/changeset/base/325501

Log:
  Remove unnecessary src.opts.mk .include
  
  MK_ isn't used in lib/libcompiler_rt/Makefile at all. Remove it to reduce
  namespace pollution.
  
  MFC after:1 week

Modified:
  head/lib/libclang_rt/Makefile

Modified: head/lib/libclang_rt/Makefile
==
--- head/lib/libclang_rt/Makefile   Tue Nov  7 04:55:23 2017
(r325500)
+++ head/lib/libclang_rt/Makefile   Tue Nov  7 04:56:53 2017
(r325501)
@@ -1,7 +1,5 @@
 # $FreeBSD$
 
-.include 
-
 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
 SUBDIR+=   include
 SUBDIR+=   asan
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r325500 - head/lib/libclang_rt

2017-11-06 Thread Ngie Cooper
Author: ngie
Date: Tue Nov  7 04:55:23 2017
New Revision: 325500
URL: https://svnweb.freebsd.org/changeset/base/325500

Log:
  Use bsd.compiler.mk instead of src.opts.mk
  
  - MK_PROFILE is controlled in bsd.opts.mk, which is pulled in via bsd.own.mk,
which is pulled in via bsd.init.mk . All upstream Makefiles which build off
of this one use bsd.init.mk.
  - COMPILER_{TYPE,VERSION} is set via bsd.compiler.mk .
  
  This reduces the namespace pollution/complexity somewhat.
  
  MFC after:1 week

Modified:
  head/lib/libclang_rt/Makefile.inc

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Tue Nov  7 04:26:57 2017
(r325499)
+++ head/lib/libclang_rt/Makefile.inc   Tue Nov  7 04:55:23 2017
(r325500)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.include 
+.include 
 
 .if ${MACHINE} == "arm"
 .if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:M*soft*} == ""
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r325450 - head/bin/rm

2017-11-05 Thread Ngie Cooper
Author: ngie
Date: Sun Nov  5 21:43:26 2017
New Revision: 325450
URL: https://svnweb.freebsd.org/changeset/base/325450

Log:
  Fix cosmetic nit when printing out "override $mode" and "$owner/$group ..."
  
  The wrong index was being checked for == ' ' in the resulting stringified
  mode from strmode(3) -- it should have been the 11th value, not the 10th.
  
  MFC after:3 days
  PR:   76711
  Submitted by: Vasil Dimov 

Modified:
  head/bin/rm/rm.c

Modified: head/bin/rm/rm.c
==
--- head/bin/rm/rm.cSun Nov  5 20:38:40 2017(r325449)
+++ head/bin/rm/rm.cSun Nov  5 21:43:26 2017(r325450)
@@ -515,7 +515,7 @@ check(const char *path, const char *name, struct stat 
"%s: -P was specified, but file is not writable",
path);
(void)fprintf(stderr, "override %s%s%s/%s %s%sfor %s? ",
-   modep + 1, modep[9] == ' ' ? "" : " ",
+   modep + 1, modep[10] == ' ' ? "" : " ",
user_from_uid(sp->st_uid, 0),
group_from_gid(sp->st_gid, 0),
*flagsp ? flagsp : "", *flagsp ? " " : "",
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r325449 - in head: . lib/libclang_rt

2017-11-05 Thread Ngie Cooper
Author: ngie
Date: Sun Nov  5 20:38:40 2017
New Revision: 325449
URL: https://svnweb.freebsd.org/changeset/base/325449

Log:
  Choose a simpler, more philosophically correct version for CRTARCH with 
armv[67]
  
  This is a rework of r325443.
  
  PR:   222925
  Tested with:  make buildenv with appropriate TARGET/TARGET_ARCH pairs

Modified:
  head/ObsoleteFiles.inc
  head/lib/libclang_rt/Makefile.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Sun Nov  5 20:28:28 2017(r325448)
+++ head/ObsoleteFiles.inc  Sun Nov  5 20:38:40 2017(r325449)
@@ -38,6 +38,21 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20171105: fixing lib/libclang_rt CRTARCH for arm:armv[67].
+.if ${MACHINE} == "arm"
+.if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:M*soft*} == ""
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-arm.a
+OLD_LIBS+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-arm.so
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a
+.endif
+.endif
 # 20171104: libcap_random should be in /lib not in /usr/lib
 OLD_LIBS+=usr/lib/libcap_random.so.0
 # 20171104: Casper can work only as shared library

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Sun Nov  5 20:28:28 2017
(r325448)
+++ head/lib/libclang_rt/Makefile.inc   Sun Nov  5 20:38:40 2017
(r325449)
@@ -2,7 +2,12 @@
 
 .include 
 
-CRTARCH=   ${MACHINE_CPUARCH:C/amd64/x86_64/}
+.if ${MACHINE} == "arm"
+.if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:M*soft*} == ""
+CRTARCH=   armhf
+.endif
+.endif
+CRTARCH?=  ${MACHINE_CPUARCH:C/amd64/x86_64/}
 CRTSRC=${SRCTOP}/contrib/compiler-rt
 
 .PATH: ${CRTSRC}/lib
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r325446 - in head: . lib/libclang_rt share/mk

2017-11-05 Thread Ngie Cooper
Author: ngie
Date: Sun Nov  5 20:01:00 2017
New Revision: 325446
URL: https://svnweb.freebsd.org/changeset/base/325446

Log:
  Revert r325443
  
  Despite the fact that it's a working solution, it doesn't follow the design
  philosophy of only doing TARGET_* in Makefile.inc1 and special locations in
  the source tree.
  
  PR:   222925
  Requested by: imp

Modified:
  head/ObsoleteFiles.inc
  head/lib/libclang_rt/Makefile.inc
  head/share/mk/sys.mk
Directory Properties:
  head/   (props changed)

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Sun Nov  5 19:52:11 2017(r325445)
+++ head/ObsoleteFiles.inc  Sun Nov  5 20:01:00 2017(r325446)
@@ -38,21 +38,6 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
-# 20171105: fixing lib/libclang_rt CRTARCH for arm:armv[67].
-.if ${MACHINE} == "arm"
-.if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:M*soft*} == ""
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-arm.a
-OLD_LIBS+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-arm.so
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a
-.endif
-.endif
 # 20171104: libcap_random should be in /lib not in /usr/lib
 OLD_LIBS+=usr/lib/libcap_random.so.0
 # 20171104: Casper can work only as shared library

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Sun Nov  5 19:52:11 2017
(r325445)
+++ head/lib/libclang_rt/Makefile.inc   Sun Nov  5 20:01:00 2017
(r325446)
@@ -2,14 +2,7 @@
 
 .include 
 
-# NOTE: based on TARGET_ABI/TARGET_CPUTYPE, set in Makefile.inc1 .
-.if ${MACHINE} == "arm"
-.if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:M*soft*} == ""
-CRTARCH=   armhf
-.endif
-.endif
-
-CRTARCH?=  ${TARGET_CPUARCH:C/amd64/x86_64/}
+CRTARCH=   ${MACHINE_CPUARCH:C/amd64/x86_64/}
 CRTSRC=${SRCTOP}/contrib/compiler-rt
 
 .PATH: ${CRTSRC}/lib

Modified: head/share/mk/sys.mk
==
--- head/share/mk/sys.mkSun Nov  5 19:52:11 2017(r325445)
+++ head/share/mk/sys.mkSun Nov  5 20:01:00 2017(r325446)
@@ -15,11 +15,6 @@ unix ?=  We run FreeBSD, not UNIX.
 #
 
__TO_CPUARCH=C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/
 MACHINE_CPUARCH=${MACHINE_ARCH:${__TO_CPUARCH}}
-.ifdef TARGET_ARCH
-TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}}
-.else
-TARGET_CPUARCH=${MACHINE_CPUARCH}
-.endif
 .endif
 
 __DEFAULT_YES_OPTIONS+= \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r325443 - in head: . lib/libclang_rt share/mk

2017-11-05 Thread Ngie Cooper (yaneurabeya)

> On Nov 5, 2017, at 11:38, Ngie Cooper  wrote:
> 
> Author: ngie
> Date: Sun Nov  5 19:38:51 2017
> New Revision: 325443
> URL: https://svnweb.freebsd.org/changeset/base/325443
> 
> Log:
>  Fix paths for cross-built versions of lib/libclang_rt and hardfloat arm 
> variants
> 
>  - Define TARGET_CPUARCH and use in libclang_rt as the basis for CRTARCH
> 
>When cross-compiling, the wrong architecture was being embedded in the
>libclang_rt binary filenames. It should be based on TARGET_ARCH (target), 
> not
>MACHINE_ARCH (host).
> 
>If TARGET_ARCH isn't defined (host-builds), fallback to MACHINE_ARCH.
> 
>  - Define CRTARCH to armhf when TARGET/TARGET_ARCH are set to arm/armv[67]
> 
>TARGET_ABI/TARGET_CPU in Makefile.inc1 sets the ABI to gnueabihf, which
>affects the clang lookup path per `getArchNameForCompilerRTLib(..)` in
>contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp, so chase clang and
>Linux's assumed naming convention for hard-float arm architectures.
> 
>CROSSENV (in Makefile.inc1) sets CPUTYPE/MACHINE(_ARCH)? to the
>TARGET*-relevant values when building the `libraries` target, so test
>those variables instead.
> 
>  - Add OLD_FILES/OLD_LIBS entries for TARGET/TARGET_ARCH == arm/armv[67]. This
>impacts only arm/armv6 and arm/armv7.
> 
>  PR:  222925

MFC after:  2 weeks


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r325442 - in head/lib/libclang_rt: . profile

2017-11-05 Thread Ngie Cooper (yaneurabeya)

> On Nov 5, 2017, at 11:25, Ngie Cooper  wrote:
> 
> Author: ngie
> Date: Sun Nov  5 19:25:06 2017
> New Revision: 325442
> URL: https://svnweb.freebsd.org/changeset/base/325442
> 
> Log:
>  Support compiling lib/libclang_rt/profile a bit more with recent versions of 
> gcc
> 
>  Several of the flags were being treated as CFLAGS, when they were actually
>  technically CXXFLAGS. Move them there.
> 
>  Only apply -fno-sanitize=safe-stack with clang.
> 
>  PR: 223179

MFC after:  2 weeks


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r325443 - in head: . lib/libclang_rt share/mk

2017-11-05 Thread Ngie Cooper
Author: ngie
Date: Sun Nov  5 19:38:51 2017
New Revision: 325443
URL: https://svnweb.freebsd.org/changeset/base/325443

Log:
  Fix paths for cross-built versions of lib/libclang_rt and hardfloat arm 
variants
  
  - Define TARGET_CPUARCH and use in libclang_rt as the basis for CRTARCH
  
When cross-compiling, the wrong architecture was being embedded in the
libclang_rt binary filenames. It should be based on TARGET_ARCH (target), 
not
MACHINE_ARCH (host).
  
If TARGET_ARCH isn't defined (host-builds), fallback to MACHINE_ARCH.
  
  - Define CRTARCH to armhf when TARGET/TARGET_ARCH are set to arm/armv[67]
  
TARGET_ABI/TARGET_CPU in Makefile.inc1 sets the ABI to gnueabihf, which
affects the clang lookup path per `getArchNameForCompilerRTLib(..)` in
contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp, so chase clang and
Linux's assumed naming convention for hard-float arm architectures.
  
CROSSENV (in Makefile.inc1) sets CPUTYPE/MACHINE(_ARCH)? to the
TARGET*-relevant values when building the `libraries` target, so test
those variables instead.
  
  - Add OLD_FILES/OLD_LIBS entries for TARGET/TARGET_ARCH == arm/armv[67]. This
impacts only arm/armv6 and arm/armv7.
  
  PR:   222925

Modified:
  head/ObsoleteFiles.inc
  head/lib/libclang_rt/Makefile.inc
  head/share/mk/sys.mk
Directory Properties:
  head/   (props changed)

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Sun Nov  5 19:25:06 2017(r325442)
+++ head/ObsoleteFiles.inc  Sun Nov  5 19:38:51 2017(r325443)
@@ -38,6 +38,21 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20171105: fixing lib/libclang_rt CRTARCH for arm:armv[67].
+.if ${MACHINE} == "arm"
+.if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:M*soft*} == ""
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-arm.a
+OLD_LIBS+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-arm.so
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-arm.a
+OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a
+.endif
+.endif
 # 20171104: libcap_random should be in /lib not in /usr/lib
 OLD_LIBS+=usr/lib/libcap_random.so.0
 # 20171104: Casper can work only as shared library

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Sun Nov  5 19:25:06 2017
(r325442)
+++ head/lib/libclang_rt/Makefile.inc   Sun Nov  5 19:38:51 2017
(r325443)
@@ -2,7 +2,14 @@
 
 .include 
 
-CRTARCH=   ${MACHINE_CPUARCH:C/amd64/x86_64/}
+# NOTE: based on TARGET_ABI/TARGET_CPUTYPE, set in Makefile.inc1 .
+.if ${MACHINE} == "arm"
+.if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:M*soft*} == ""
+CRTARCH=   armhf
+.endif
+.endif
+
+CRTARCH?=  ${TARGET_CPUARCH:C/amd64/x86_64/}
 CRTSRC=${SRCTOP}/contrib/compiler-rt
 
 .PATH: ${CRTSRC}/lib

Modified: head/share/mk/sys.mk
==
--- head/share/mk/sys.mkSun Nov  5 19:25:06 2017(r325442)
+++ head/share/mk/sys.mkSun Nov  5 19:38:51 2017(r325443)
@@ -15,6 +15,11 @@ unix ?=  We run FreeBSD, not UNIX.
 #
 
__TO_CPUARCH=C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/
 MACHINE_CPUARCH=${MACHINE_ARCH:${__TO_CPUARCH}}
+.ifdef TARGET_ARCH
+TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}}
+.else
+TARGET_CPUARCH=${MACHINE_CPUARCH}
+.endif
 .endif
 
 __DEFAULT_YES_OPTIONS+= \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r325442 - in head/lib/libclang_rt: . profile

2017-11-05 Thread Ngie Cooper
Author: ngie
Date: Sun Nov  5 19:25:06 2017
New Revision: 325442
URL: https://svnweb.freebsd.org/changeset/base/325442

Log:
  Support compiling lib/libclang_rt/profile a bit more with recent versions of 
gcc
  
  Several of the flags were being treated as CFLAGS, when they were actually
  technically CXXFLAGS. Move them there.
  
  Only apply -fno-sanitize=safe-stack with clang.
  
  PR: 223179

Modified:
  head/lib/libclang_rt/Makefile.inc
  head/lib/libclang_rt/profile/Makefile

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Sun Nov  5 18:45:43 2017
(r325441)
+++ head/lib/libclang_rt/Makefile.inc   Sun Nov  5 19:25:06 2017
(r325442)
@@ -20,13 +20,13 @@ CFLAGS+=-DNDEBUG
 CFLAGS+=   ${PICFLAG}
 CFLAGS+=   -fno-builtin
 CFLAGS+=   -fno-exceptions
-CFLAGS+=   -fno-rtti
-.if ${COMPILER_VERSION} >= 30700
+CXXFLAGS+= -fno-rtti
+.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700
 CFLAGS+=   -fno-sanitize=safe-stack
 .endif
 CFLAGS+=   -fno-stack-protector
 CFLAGS+=   -funwind-tables
-CFLAGS+=   -fvisibility-inlines-hidden
-CFLAGS+=   -fvisibility=hidden
+CXXFLAGS+= -fvisibility-inlines-hidden
+CXXFLAGS+= -fvisibility=hidden
 CFLAGS+=   -I${CRTSRC}/lib
 CXXFLAGS+= -std=c++11

Modified: head/lib/libclang_rt/profile/Makefile
==
--- head/lib/libclang_rt/profile/Makefile   Sun Nov  5 18:45:43 2017
(r325441)
+++ head/lib/libclang_rt/profile/Makefile   Sun Nov  5 19:25:06 2017
(r325442)
@@ -5,7 +5,7 @@
 LIB=   clang_rt.profile-${CRTARCH}
 
 # This is needed for --coverage
-CFLAGS+=   -fvisibility=default
+CXXFLAGS+= -fvisibility=default
 
 SRCS+= profile/GCDAProfiling.c
 SRCS+= profile/InstrProfiling.c
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r325116 - head

2017-11-04 Thread Ngie Cooper (yaneurabeya)

> On Nov 4, 2017, at 08:31, Bryan Drewery  wrote:
> 
> On 11/4/2017 12:08 AM, Ngie Cooper (yaneurabeya) wrote:
>>  I just ran into this with bash on universe12a.freebsd.org by doing ^d. 
>> I think the change should be reverted.
>> Thanks,
>> -Ngie
>> 
>> $ exit
>> *** Error code 130
>> 
>> Stop.
>> make[1]: stopped in /scratch/tmp/ngie/svn
>> *** Error code 1
>> 
>> Stop.
>> make: stopped in /scratch/tmp/ngie/svn
>> 
> 
> When you first go into buildenv check 'echo $?'.
> My problem was a construct like '[ -f xxx ] && . xxx' at the end of one
> of my profile scripts.  It needs to be 'if [ -f xxx ]; then . xxx; fi'
> to avoid the bad status.  It's really unrelated to buildenv.

The last line in my ~/.bashrc on my VM is export PATH that doesn’t fail with a 
syntax error, and the last line on my ~/.bashrc on universe12a is an alias set, 
which also doesn’t fail with a syntax error. Both cases set $? = 0.

The issue I reported is caused by doing ^c + ^d (hence the error code 130 in my 
original reply). I guess this is expected, but it’s going to confuse people and 
force them to have to investigate the issue, unnecessarily, when it wasn’t an 
“issue” before.

-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r325116 - head

2017-11-04 Thread Ngie Cooper (yaneurabeya)
I just ran into this with bash on universe12a.freebsd.org by doing ^d. 
I think the change should be reverted.
Thanks,
-Ngie

$ exit
*** Error code 130

Stop.
make[1]: stopped in /scratch/tmp/ngie/svn
*** Error code 1

Stop.
make: stopped in /scratch/tmp/ngie/svn



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r325320 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2017-11-02 Thread Ngie Cooper

> On Nov 2, 2017, at 06:49, Andriy Gapon  wrote:
> 
> Author: avg
> Date: Thu Nov  2 13:49:08 2017
> New Revision: 325320
> URL: https://svnweb.freebsd.org/changeset/base/325320
> 
> Log:
>  Disable posix_fallocate(2) for ZFS
> 
>  The generic (naive) implementation of posix_fallocate cannot provide the
>  standard mandated guarantee that overwrites would never fail due to the lack
>  of free space.  The fundamental reason is the copy-on-write architecture
>  of ZFS.  Other features like compression and deduplication can also
>  increase the size difference between the (pre-)allocated dummy content
>  and the future content.
> 
>  So, until ZFS can properly implement the feature it's better to report
>  that it is unsupported rather than providing an ersatz implementation.
>  Please note that EINVAL is used to report that the underlying file system
>  does not support the operation (POSIX.1-2008).
> 
>  illumos and ZoL seem to do the same.
> 
>  MFC after:3 weeks
>  Sponsored by:Panzura

It’d be nice if it worked though and was reported via the file system.  Posix 
suggests it should be, as of 2013: http://austingroupbugs.net/view.php?id=687 .

Need to go poking around and see what’s in freebsd later on tonight. Bug filed: 
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223383 .

> Modified:
>  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
> 
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
> ==
> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.cThu 
> Nov  2 12:16:50 2017(r325319)
> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.cThu 
> Nov  2 13:49:08 2017(r325320)
> @@ -6009,6 +6009,7 @@ struct vop_vector zfs_vnodeops = {
>.vop_inactive =zfs_freebsd_inactive,
>.vop_reclaim =zfs_freebsd_reclaim,
>.vop_access =zfs_freebsd_access,
> +.vop_allocate =VOP_EINVAL,
>.vop_lookup =zfs_cache_lookup,
>.vop_cachedlookup =zfs_freebsd_lookup,
>.vop_getattr =zfs_freebsd_getattr,
> 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Re: svn commit: r325192 - head/etc/mtree

2017-10-31 Thread Ngie Cooper

> On Oct 30, 2017, at 18:43, Bryan Drewery  wrote:
> 
> Author: bdrewery
> Date: Tue Oct 31 01:43:36 2017
> New Revision: 325192
> URL: https://svnweb.freebsd.org/changeset/base/325192
> 
> Log:
>  Fix installworld/distrib-dirs for pathconv after r325186.

*sigh*

Julian never completed the tests. They’re breaking Jenkins since they’re now 
integrated into the build..

Please test test commits next time (make obj depend all; sudo make check 
install).

I’ll go fix them ;/..

>  Sponsored by:Dell EMC Isilon
> 
> Modified:
>  head/etc/mtree/BSD.tests.dist
> 
> Modified: head/etc/mtree/BSD.tests.dist
> ==
> --- head/etc/mtree/BSD.tests.distTue Oct 31 00:26:42 2017(r325191)
> +++ head/etc/mtree/BSD.tests.distTue Oct 31 01:43:36 2017(r325192)
> @@ -358,6 +358,8 @@
> dlopen
> ..
> ..
> +libpathconv
> +..
> libutil
> ..
> libxo
> 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r325208 - head/lib/libcasper/services/cap_grp

2017-10-30 Thread Ngie Cooper
Author: ngie
Date: Tue Oct 31 04:02:50 2017
New Revision: 325208
URL: https://svnweb.freebsd.org/changeset/base/325208

Log:
  Add `static` to `cap_setgrent` prototype in !WITH_CASPER case
  
  This unbreaks the default powerpc/sparc64 build configuration after r325062.

Modified:
  head/lib/libcasper/services/cap_grp/cap_grp.h

Modified: head/lib/libcasper/services/cap_grp/cap_grp.h
==
--- head/lib/libcasper/services/cap_grp/cap_grp.h   Tue Oct 31 03:47:22 
2017(r325207)
+++ head/lib/libcasper/services/cap_grp/cap_grp.h   Tue Oct 31 04:02:50 
2017(r325208)
@@ -65,7 +65,7 @@ int cap_grp_limit_groups(cap_channel_t *chan, const ch
 
 #definecap_setgroupent(chan, stayopen) etgroupent(stayopen)
 #define endgrent(chan) endgrent()
-inline int
+static inline int
 cap_setgrent(cap_channel_t *chan __unused)
 {
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r325062 - in head/lib: . libcasper libcasper/libcasper libcasper/services libcasper/services/cap_dns libcasper/services/cap_dns/tests libcasper/services/cap_grp libcasper/services/cap_

2017-10-30 Thread Ngie Cooper (yaneurabeya)

> On Oct 28, 2017, at 12:23, Mariusz Zaborski  wrote:
> 
> Author: oshogbo
> Date: Sat Oct 28 19:23:57 2017
> New Revision: 325062
> URL: https://svnweb.freebsd.org/changeset/base/325062
> 
> Log:
>  Introduce caspermocks.
> 
>  The idea behinds mocks is that we don't need to ifdef a lot of code in
>  tools itself but those defines are hidden in the casper library.
>  Right now the mocks are implemented as define/inlines functions.
>  There was a very long discussion how this should be implemented.
>  This approach has some advantages like we don't need to link to any 
> additional
>  libraries. Unfortunately there are also some disadvantages for example it is
>  easy to get library out of sync between two versions of functions or that we
>  need extra define to compile program with casper support.
>  This isn't an ideal solution but it's good enough for now and should simplify
>  capsicumizing programs. This also doesn't close us any other ways to do those
>  mocks and this should evolve in time.
> 
>  Discussed with:  pjd, emaste, ed, rwatson, bapt, cem, bdrewery
>  Differential Revision:https://reviews.freebsd.org/D8753

This change broke tinderbox/Jenkins for powerpc and sparc64: 
https://ci.freebsd.org/job/FreeBSD-head-powerpc-build/1865/console .
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r322951 - head

2017-10-30 Thread Ngie Cooper (yaneurabeya)

> On Oct 25, 2017, at 13:34, Bryan Drewery  wrote:

…

> I don't understand what you're saying here. If I build with MK_TCSH=yes
> and the host does not have tcsh, a failure occurs AFTER or BEFORE this
> change?
> Neither case makes sense to me.
> What is the failure?
> 
> The change here is to build-tools which just calls 'make build-tools' in
> bin/csh which just builds 'gethost'.

Yes. The relnotes concerns I mentioned are bogus.

Yeah, a ~400 line C file isn’t that bad, I agree.

I really don’t care about arguing this or debating it. Yes, you’re right on all 
counts. It’s a micro optimization.


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r325125 - head/sys/conf

2017-10-29 Thread Ngie Cooper
Author: ngie
Date: Mon Oct 30 06:51:03 2017
New Revision: 325125
URL: https://svnweb.freebsd.org/changeset/base/325125

Log:
  Remove unnecessary C in .fwo file I accidentally made consistent
  
  MFC after:1 month
  MFC with: r325122, r325124

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Mon Oct 30 06:48:38 2017(r325124)
+++ head/sys/conf/files Mon Oct 30 06:51:03 2017(r325125)
@@ -2019,11 +2019,11 @@ iwm8265fw.c optional iwm8265fw | 
iwmfw  \
compile-with"${AWK} -f $S/tools/fw_stub.awk iwm8265.fw:iwm8265fw 
-miwm8265fw -c${.TARGET}" \
no-implicit-rule before-depend local\
clean   "iwm8265fw.c"
-iwm8265Cfw.fwo optional iwm8265fw | iwmfw  \
+iwm8265fw.fwo  optional iwm8265fw | iwmfw  \
dependency  "iwm8265.fw"\
compile-with"${NORMAL_FWO}" \
no-implicit-rule\
-   clean   "iwm8265Cfw.fwo"
+   clean   "iwm8265fw.fwo"
 dev/iwn/if_iwn.c   optional iwn
 iwn1000fw.coptional iwn1000fw | iwnfw  \
compile-with"${AWK} -f $S/tools/fw_stub.awk iwn1000.fw:iwn1000fw 
-miwn1000fw -c${.TARGET}" \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r325124 - head/sys/conf

2017-10-29 Thread Ngie Cooper
Author: ngie
Date: Mon Oct 30 06:48:38 2017
New Revision: 325124
URL: https://svnweb.freebsd.org/changeset/base/325124

Log:
  Fix a bad copy-paste (8000C -> 8265) done in r325122
  
  This fixes the clean rule for "device iwm8265fw".
  
  MFC after:1 month
  MFC with: r325122

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Mon Oct 30 06:43:40 2017(r325123)
+++ head/sys/conf/files Mon Oct 30 06:48:38 2017(r325124)
@@ -2023,7 +2023,7 @@ iwm8265Cfw.fwooptional iwm8265fw | 
iwmfw  \
dependency  "iwm8265.fw"\
compile-with"${NORMAL_FWO}" \
no-implicit-rule\
-   clean   "iwm8000Cfw.fwo"
+   clean   "iwm8265Cfw.fwo"
 dev/iwn/if_iwn.c   optional iwn
 iwn1000fw.coptional iwn1000fw | iwnfw  \
compile-with"${AWK} -f $S/tools/fw_stub.awk iwn1000.fw:iwn1000fw 
-miwn1000fw -c${.TARGET}" \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r325123 - head/share/man/man4

2017-10-29 Thread Ngie Cooper
Author: ngie
Date: Mon Oct 30 06:43:40 2017
New Revision: 325123
URL: https://svnweb.freebsd.org/changeset/base/325123

Log:
  Reference iwm8265fw support in iwm(4) as well
  
  This documentation update is similar to what was done in iwmfw(4) in r325121.
  
  MFC after:1 month
  MFC with: r325121

Modified:
  head/share/man/man4/iwm.4

Modified: head/share/man/man4/iwm.4
==
--- head/share/man/man4/iwm.4   Mon Oct 30 06:35:09 2017(r325122)
+++ head/share/man/man4/iwm.4   Mon Oct 30 06:43:40 2017(r325123)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 26, 2016
+.Dd October 29, 2017
 .Dt IWM 4
 .Os
 .Sh NAME
@@ -49,6 +49,7 @@ Choose one from:
 .Cd "device iwm7260fw"
 .Cd "device iwm7265fw"
 .Cd "device iwm8000Cfw"
+.Cd "device iwm8265fw"
 .Ed
 .Pp
 Or you can use
@@ -67,6 +68,7 @@ iwm3160fw_load="YES"
 iwm7260fw_load="YES"
 iwm7265fw_load="YES"
 iwm8000Cfw_load="YES"
+iwm8265fw_load="YES"
 .Ed
 .Sh DESCRIPTION
 The
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r325122 - head/sys/conf

2017-10-29 Thread Ngie Cooper
Author: ngie
Date: Mon Oct 30 06:35:09 2017
New Revision: 325122
URL: https://svnweb.freebsd.org/changeset/base/325122

Log:
  Fill in the blanks for iwm8265fw(4) rules, missed in r324434
  
  Now using "device iwmfw" or "device iwm8265fw" in one's kernel configuration
  will potentially result in a working IWM8265 series wireless SoC.
  
  This is an alternative to the fix that was made in r324470 for
  `sys/modules/iwmfw`.
  
  MFC after:1 month

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Mon Oct 30 06:06:37 2017(r325121)
+++ head/sys/conf/files Mon Oct 30 06:35:09 2017(r325122)
@@ -2010,6 +2010,20 @@ iwm8000C.fw  optional iwm8000Cfw | 
iwmfw \
compile-with"${NORMAL_FW}"  \
no-obj no-implicit-rule \
clean   "iwm8000C.fw"
+iwm8265.fw optional iwm8265fw | iwmfw  \
+   dependency  "$S/contrib/dev/iwm/iwm-8265-22.fw.uu" \
+   compile-with"${NORMAL_FW}"  \
+   no-obj no-implicit-rule \
+   clean   "iwm8265.fw"
+iwm8265fw.coptional iwm8265fw | iwmfw  \
+   compile-with"${AWK} -f $S/tools/fw_stub.awk iwm8265.fw:iwm8265fw 
-miwm8265fw -c${.TARGET}" \
+   no-implicit-rule before-depend local\
+   clean   "iwm8265fw.c"
+iwm8265Cfw.fwo optional iwm8265fw | iwmfw  \
+   dependency  "iwm8265.fw"\
+   compile-with"${NORMAL_FWO}" \
+   no-implicit-rule\
+   clean   "iwm8000Cfw.fwo"
 dev/iwn/if_iwn.c   optional iwn
 iwn1000fw.coptional iwn1000fw | iwnfw  \
compile-with"${AWK} -f $S/tools/fw_stub.awk iwn1000.fw:iwn1000fw 
-miwn1000fw -c${.TARGET}" \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r325121 - head/share/man/man4

2017-10-29 Thread Ngie Cooper
Author: ngie
Date: Mon Oct 30 06:06:37 2017
New Revision: 325121
URL: https://svnweb.freebsd.org/changeset/base/325121

Log:
  iwmfw(4): update support info
  
  - Document iwm8265fw firmware knobs.
  - Note that 8000 series cards are also covered by the iwmfw(4) firmware module
set.

Modified:
  head/share/man/man4/iwmfw.4

Modified: head/share/man/man4/iwmfw.4
==
--- head/share/man/man4/iwmfw.4 Mon Oct 30 05:52:26 2017(r325120)
+++ head/share/man/man4/iwmfw.4 Mon Oct 30 06:06:37 2017(r325121)
@@ -22,7 +22,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 26, 2016
+.Dd October 29, 2017
 .Dt IWMFW 4
 .Os
 .Sh NAME
@@ -46,6 +46,7 @@ of the following:
 .Cd "device iwm7260fw"
 .Cd "device iwm7265fw"
 .Cd "device iwm8000Cfw"
+.Cd "device iwm8265fw"
 .Ed
 .Pp
 Alternatively, to load the driver as a
@@ -57,10 +58,11 @@ iwm7260fw_load="YES"
 iwm7265fw_load="YES"
 iwm7265Dfw_load="YES"
 iwm8000Cfw_load="YES"
+iwm8265fw_load="YES"
 .Ed
 .Sh DESCRIPTION
 This module provides access to firmware sets for the
-Intel Dual Band Wireless WiFi 3160, 3165, 7260, 7265 and 8260 series of
+Intel Dual Band Wireless WiFi 3160, 3165, 7260, 7265, 8000, and 8260 series of
 IEEE 802.11n/11ac adapters.
 It may be
 statically linked into the kernel, or loaded as a module.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r325016 - head/lib/libdevdctl

2017-10-27 Thread Ngie Cooper

> On Oct 26, 2017, at 10:56, Alan Somers  wrote:
> 
> Author: asomers
> Date: Thu Oct 26 17:56:34 2017
> New Revision: 325016
> URL: https://svnweb.freebsd.org/changeset/base/325016
> 
> Log:
>  Partially revert r325011: restore Guid's default constructor
> 
>  Reported by:ohartmann
>  MFC after:3 weeks
>  X-MFC-With:325011
>  Sponsored by:Spectra Logic Corp
> 
> Modified:
>  head/lib/libdevdctl/guid.h

Or you could satisfy both signatures via optional parameters ;)..
-Ngie
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r324929 - head/lib/libugidfw

2017-10-23 Thread Ngie Cooper
Author: ngie
Date: Mon Oct 23 16:55:22 2017
New Revision: 324929
URL: https://svnweb.freebsd.org/changeset/base/324929

Log:
  Clean up trailing whitespace
  
  MFC after:1 week

Modified:
  head/lib/libugidfw/Makefile
  head/lib/libugidfw/ugidfw.c

Modified: head/lib/libugidfw/Makefile
==
--- head/lib/libugidfw/Makefile Mon Oct 23 16:54:30 2017(r324928)
+++ head/lib/libugidfw/Makefile Mon Oct 23 16:55:22 2017(r324929)
@@ -2,7 +2,7 @@
 
 PACKAGE=lib${LIB}
 LIB=   ugidfw
-SHLIB_MAJOR=   5   
+SHLIB_MAJOR=   5
 SRCS=  ugidfw.c
 INCS=  ugidfw.h
 

Modified: head/lib/libugidfw/ugidfw.c
==
--- head/lib/libugidfw/ugidfw.c Mon Oct 23 16:54:30 2017(r324928)
+++ head/lib/libugidfw/ugidfw.c Mon Oct 23 16:55:22 2017(r324929)
@@ -194,7 +194,7 @@ bsde_rule_to_string(struct mac_bsdextended_rule *rule,
cur += len;
}
if (rule->mbr_subject.mbs_flags & MBS_PRISON_DEFINED) {
-   len = snprintf(cur, left, "jailid %d ", 
+   len = snprintf(cur, left, "jailid %d ",
rule->mbr_subject.mbs_prison);
if (len < 0 || len > left)
goto truncated;
@@ -334,7 +334,7 @@ bsde_rule_to_string(struct mac_bsdextended_rule *rule,
&(mntbuf[i].f_fsid),
sizeof(mntbuf[i].f_fsid)) == 0)
break;
-   len = snprintf(cur, left, "filesys %s ", 
+   len = snprintf(cur, left, "filesys %s ",
i == numfs ? "???" : mntbuf[i].f_mntonname);
if (len < 0 || len > left)
goto truncated;
@@ -972,7 +972,7 @@ bsde_parse_mode(int argc, char *argv[], mode_t *mode, 
snprintf(errstr, buflen, "Unknown mode letter: %c",
argv[0][i]);
return (-1);
-   } 
+   }
}
 
return (0);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r324928 - head/lib/libugidfw

2017-10-23 Thread Ngie Cooper
Author: ngie
Date: Mon Oct 23 16:54:30 2017
New Revision: 324928
URL: https://svnweb.freebsd.org/changeset/base/324928

Log:
  Remove dead stores
  
  The return value of various snprintf calls was stored in `len` and not used
  in many functions.
  
  MFC after:1 week
  Reported by:  clang-scanbuild

Modified:
  head/lib/libugidfw/ugidfw.c

Modified: head/lib/libugidfw/ugidfw.c
==
--- head/lib/libugidfw/ugidfw.c Mon Oct 23 16:50:33 2017(r324927)
+++ head/lib/libugidfw/ugidfw.c Mon Oct 23 16:54:30 2017(r324928)
@@ -512,7 +512,6 @@ bsde_parse_uidrange(char *spec, uid_t *min, uid_t *max
uid_t uid1, uid2;
char *spec1, *spec2, *endp;
unsigned long value;
-   size_t len;
 
spec2 = spec;
spec1 = strsep(&spec2, ":");
@@ -523,8 +522,7 @@ bsde_parse_uidrange(char *spec, uid_t *min, uid_t *max
else {
value = strtoul(spec1, &endp, 10);
if (*endp != '\0') {
-   len = snprintf(errstr, buflen,
-   "invalid uid: '%s'", spec1);
+   snprintf(errstr, buflen, "invalid uid: '%s'", spec1);
return (-1);
}
uid1 = value;
@@ -541,8 +539,7 @@ bsde_parse_uidrange(char *spec, uid_t *min, uid_t *max
else {
value = strtoul(spec2, &endp, 10);
if (*endp != '\0') {
-   len = snprintf(errstr, buflen,
-   "invalid uid: '%s'", spec2);
+   snprintf(errstr, buflen, "invalid uid: '%s'", spec2);
return (-1);
}
uid2 = value;
@@ -561,7 +558,6 @@ bsde_parse_gidrange(char *spec, gid_t *min, gid_t *max
gid_t gid1, gid2;
char *spec1, *spec2, *endp;
unsigned long value;
-   size_t len;
 
spec2 = spec;
spec1 = strsep(&spec2, ":");
@@ -572,8 +568,7 @@ bsde_parse_gidrange(char *spec, gid_t *min, gid_t *max
else {
value = strtoul(spec1, &endp, 10);
if (*endp != '\0') {
-   len = snprintf(errstr, buflen,
-   "invalid gid: '%s'", spec1);
+   snprintf(errstr, buflen, "invalid gid: '%s'", spec1);
return (-1);
}
gid1 = value;
@@ -590,8 +585,7 @@ bsde_parse_gidrange(char *spec, gid_t *min, gid_t *max
else {
value = strtoul(spec2, &endp, 10);
if (*endp != '\0') {
-   len = snprintf(errstr, buflen,
-   "invalid gid: '%s'", spec2);
+   snprintf(errstr, buflen, "invalid gid: '%s'", spec2);
return (-1);
}
gid2 = value;
@@ -613,7 +607,6 @@ bsde_parse_subject(int argc, char *argv[],
uid_t uid_min, uid_max;
gid_t gid_min, gid_max;
int jid = 0;
-   size_t len;
long value;
 
current = 0;
@@ -630,11 +623,11 @@ bsde_parse_subject(int argc, char *argv[],
while (current < argc) {
if (strcmp(argv[current], "uid") == 0) {
if (current + 2 > argc) {
-   len = snprintf(errstr, buflen, "uid short");
+   snprintf(errstr, buflen, "uid short");
return (-1);
}
if (flags & MBS_UID_DEFINED) {
-   len = snprintf(errstr, buflen, "one uid only");
+   snprintf(errstr, buflen, "one uid only");
return (-1);
}
if (bsde_parse_uidrange(argv[current+1],
@@ -648,11 +641,11 @@ bsde_parse_subject(int argc, char *argv[],
current += 2;
} else if (strcmp(argv[current], "gid") == 0) {
if (current + 2 > argc) {
-   len = snprintf(errstr, buflen, "gid short");
+   snprintf(errstr, buflen, "gid short");
return (-1);
}
if (flags & MBS_GID_DEFINED) {
-   len = snprintf(errstr, buflen, "one gid only");
+   snprintf(errstr, buflen, "one gid only");
return (-1);
}
if (bsde_parse_gidrange(argv[current+1],
@@ -666,17 +659,17 @@ bsde_parse_subject(int argc, char *argv[],
current += 2;
} else if (strcmp(argv[current], "jailid") == 0) {
if (current + 2 > argc) {
-   len = snprintf(errstr, buflen, "prison short");
+  

Re: svn commit: r324911 - head/share/mk

2017-10-23 Thread Ngie Cooper

> On Oct 23, 2017, at 01:48, Konstantin Belousov  wrote:
> 
>> On Mon, Oct 23, 2017 at 07:56:56AM +, Ngie Cooper wrote:
>> Author: ngie
>> Date: Mon Oct 23 07:56:56 2017
>> New Revision: 324911
>> URL: https://svnweb.freebsd.org/changeset/base/324911
>> 
>> Log:
>>  Fix an omission in a comment
>> 
>>  Soft float API support applies to armv7 too after r324340
> Does it ?  From my understanding, requiring hw float was one of the
> reason for armv7 appearance.

Hah... the comment’s backwards. Classic!

>> 
>> Modified:
>>  head/share/mk/src.opts.mk
>> 
>> Modified: head/share/mk/src.opts.mk
>> ==
>> --- head/share/mk/src.opts.mkMon Oct 23 07:52:16 2017(r324910)
>> +++ head/share/mk/src.opts.mkMon Oct 23 07:56:56 2017(r324911)
>> @@ -271,7 +271,7 @@ __DEFAULT_NO_OPTIONS+=GDB_LIBEXEC
>> .else
>> __DEFAULT_YES_OPTIONS+=GDB_LIBEXEC
>> .endif
>> -# Only doing soft float API stuff on armv6
>> +# Only doing soft float API stuff on armv6 and armv7
>> .if ${__T} != "armv6" && ${__T} != "armv7"
>> BROKEN_OPTIONS+=LIBSOFT
>> .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r324911 - head/share/mk

2017-10-23 Thread Ngie Cooper
Author: ngie
Date: Mon Oct 23 07:56:56 2017
New Revision: 324911
URL: https://svnweb.freebsd.org/changeset/base/324911

Log:
  Fix an omission in a comment
  
  Soft float API support applies to armv7 too after r324340

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Mon Oct 23 07:52:16 2017(r324910)
+++ head/share/mk/src.opts.mk   Mon Oct 23 07:56:56 2017(r324911)
@@ -271,7 +271,7 @@ __DEFAULT_NO_OPTIONS+=GDB_LIBEXEC
 .else
 __DEFAULT_YES_OPTIONS+=GDB_LIBEXEC
 .endif
-# Only doing soft float API stuff on armv6
+# Only doing soft float API stuff on armv6 and armv7
 .if ${__T} != "armv6" && ${__T} != "armv7"
 BROKEN_OPTIONS+=LIBSOFT
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r324890 - head/sys/kern

2017-10-22 Thread Ngie Cooper (yaneurabeya)

> On Oct 22, 2017, at 18:00, Mateusz Guzik  wrote:
> 
> Author: mjg
> Date: Mon Oct 23 01:00:35 2017
> New Revision: 324890
> URL: https://svnweb.freebsd.org/changeset/base/324890
> 
> Log:
>  Bump WITNESS_PENDLIST to accomodate sleepq chain bump.
> 
>  Reported by: ngie

*crosses fingers and waits for next Jenkins run*


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r324870 - in head/sys: amd64/include kern

2017-10-22 Thread Ngie Cooper (yaneurabeya)

> On Oct 22, 2017, at 13:43, Mateusz Guzik  wrote:
> 
> Author: mjg
> Date: Sun Oct 22 20:43:50 2017
> New Revision: 324870
> URL: https://svnweb.freebsd.org/changeset/base/324870
> 
> Log:
>  Make the sleepq chain hash size configurable per-arch and bump on amd64.
> 
>  While here cache-align chains.
> 
>  This shortens longest found chain during poudriere -j 80 from 32 to 16.
> 
>  Pushing this higher up will probably require allocation on boot.

Hi Mateusz,
This change causes the Jenkins VMs to panic at boot with "panic: 
witness_init: pending locks list is too small, increase WITNESS_PENDLIST” when 
WITNESS is enabled: 
https://ci.freebsd.org/job/FreeBSD-head-amd64-test/4781/console .
Please fix or revert.
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r324863 - in head/sys: kern sys

2017-10-22 Thread Ngie Cooper (yaneurabeya)

> On Oct 22, 2017, at 06:42, Mateusz Guzik  wrote:
> 
> Author: mjg
> Date: Sun Oct 22 13:42:56 2017
> New Revision: 324863
> URL: https://svnweb.freebsd.org/changeset/base/324863
> 
> Log:
>  Change kdb_active type to u_char.
> 
>  Fixes warnings from gcc and keeps the small size. Perhaps nesting should be 
> moved
>  to another variablle.
> 
>  Reported by: ngie

Thank you for fixing this.

Question though — since u_char is unsigned, are you concerned about underflow 
(-1 -> 255)?

Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r324862 - head/sys/kern

2017-10-22 Thread Ngie Cooper
Author: ngie
Date: Sun Oct 22 12:12:52 2017
New Revision: 324862
URL: https://svnweb.freebsd.org/changeset/base/324862

Log:
  Clean up trailing whitespace in kdb_thr_ctx(..)
  
  MFC after:1 week

Modified:
  head/sys/kern/subr_kdb.c

Modified: head/sys/kern/subr_kdb.c
==
--- head/sys/kern/subr_kdb.cSun Oct 22 11:45:51 2017(r324861)
+++ head/sys/kern/subr_kdb.cSun Oct 22 12:12:52 2017(r324862)
@@ -513,12 +513,12 @@ kdb_reenter(void)
 
 struct pcb *
 kdb_thr_ctx(struct thread *thr)
-{  
+{
 #if defined(SMP) && defined(KDB_STOPPEDPCB)
struct pcpu *pc;
 #endif
- 
-   if (thr == curthread) 
+
+   if (thr == curthread)
return (&kdb_pcb);
 
 #if defined(SMP) && defined(KDB_STOPPEDPCB)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r324789 - in head/sys: kern sys

2017-10-22 Thread Ngie Cooper (yaneurabeya)

> On Oct 19, 2017, at 21:02, Mateusz Guzik  wrote:
> 
> Author: mjg
> Date: Fri Oct 20 04:02:53 2017
> New Revision: 324789
> URL: https://svnweb.freebsd.org/changeset/base/324789
> 
> Log:
>  Mark kdb_active as __read_frequently and switch to bool to eat less space.
> 
> Modified:
>  head/sys/kern/subr_kdb.c
>  head/sys/sys/kdb.h
> 
> Modified: head/sys/kern/subr_kdb.c
> ==
> --- head/sys/kern/subr_kdb.c  Fri Oct 20 03:38:58 2017(r324788)
> +++ head/sys/kern/subr_kdb.c  Fri Oct 20 04:02:53 2017(r324789)
> @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
> #include 
> #endif
> 
> -int kdb_active = 0;
> +bool __read_frequently kdb_active = 0;
> static void *kdb_jmpbufp = NULL;
> struct kdb_dbbe *kdb_dbbe = NULL;
> static struct pcb kdb_pcb;
> 
> Modified: head/sys/sys/kdb.h
> ==
> --- head/sys/sys/kdb.hFri Oct 20 03:38:58 2017(r324788)
> +++ head/sys/sys/kdb.hFri Oct 20 04:02:53 2017(r324789)
> @@ -59,7 +59,7 @@ struct kdb_dbbe {
>   };  \
>   DATA_SET(kdb_dbbe_set, name##_dbbe)
> 
> -extern int kdb_active;   /* Non-zero while in debugger. 
> */
> +extern bool kdb_active;  /* Non-zero while in debugger. 
> */
> extern int debugger_on_panic; /* enter the debugger on panic. */
> extern struct kdb_dbbe *kdb_dbbe; /* Default debugger backend or NULL. */
> extern struct trapframe *kdb_frame;   /* Frame to kdb_trap(). */

This broke `kdb_active` use in `kdb_trap`. It’s noticed by gcc on 
riscv64: https://ci.freebsd.org/job/FreeBSD-head-riscv64-build/4356/console .
Please fix or revert.
Thanks,
-Ngie



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r324851 - head/share/man/man5

2017-10-22 Thread Ngie Cooper
Author: ngie
Date: Sun Oct 22 07:36:28 2017
New Revision: 324851
URL: https://svnweb.freebsd.org/changeset/base/324851

Log:
  Regenerate src.conf(5) after r324340 (armv7 addition)

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Sun Oct 22 07:25:28 2017
(r324850)
+++ head/share/man/man5/src.conf.5  Sun Oct 22 07:36:28 2017
(r324851)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd October 06, 2017
+.Dd October 10, 2017
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -162,7 +162,7 @@ Set to build and install binutils (as, ld, objcopy, an
 of the normal system build.
 .Pp
 This is a default setting on
-amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, 
mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, 
powerpc/powerpcspe and sparc64/sparc64.
+amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, 
mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, 
mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64.
 .It Va WITHOUT_BINUTILS_BOOTSTRAP
 Set to not build binutils (as, ld, objcopy and objdump)
 as part of the bootstrap process.
@@ -178,7 +178,7 @@ Set build binutils (as, ld, objcopy and objdump)
 as part of the bootstrap process.
 .Pp
 This is a default setting on
-amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, 
mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, 
powerpc/powerpcspe and sparc64/sparc64.
+amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, 
mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, 
mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64.
 .It Va WITHOUT_BLACKLIST
 Set this if you do not want to build
 .Xr blacklistd 8
@@ -220,11 +220,6 @@ Set to not build the BSD licensed version of cpio base
 .Xr libarchive 3 .
 .It Va WITH_BSD_GREP
 Install BSD-licensed grep as '[ef]grep' instead of GNU grep.
-.It Va WITHOUT_BSD_GREP_FASTMATCH
-Set this option to exclude the fastmatch implementation from
-.Xr bsdgrep 1 ,
-instead using only
-.Xr regex 3 .
 .It Va WITHOUT_BSNMP
 Set to not build or install
 .Xr bsnmpd 1
@@ -325,7 +320,7 @@ When set, it enforces these options:
 Set to build the Clang C/C++ compiler during the normal phase of the build.
 .Pp
 This is a default setting on
-amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, 
mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64 and powerpc/powerpcspe.
+amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, 
i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64 and powerpc/powerpcspe.
 .It Va WITHOUT_CLANG_BOOTSTRAP
 Set to not build the Clang C/C++ compiler during the bootstrap phase of
 the build.
@@ -338,7 +333,7 @@ mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mi
 Set to build the Clang C/C++ compiler during the bootstrap phase of the build.
 .Pp
 This is a default setting on
-amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64 and i386/i386.
+amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64 and 
i386/i386.
 .It Va WITH_CLANG_EXTRAS
 Set to build additional clang and llvm tools, such as bugpoint.
 .It Va WITHOUT_CLANG_FULL
@@ -352,7 +347,7 @@ Set to build the ARCMigrate, Rewriter and StaticAnalyz
 Clang C/C++ compiler.
 .Pp
 This is a default setting on
-amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, 
mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64 and powerpc/powerpcspe.
+amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, 
i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64 and powerpc/powerpcspe.
 .It Va WITHOUT_CLANG_IS_CC
 Set to install the GCC compiler as
 .Pa /usr/bin/cc ,
@@ -370,7 +365,7 @@ and
 .Pa /usr/bin/cpp .
 .Pp
 This is a default setting on
-amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64 and i386/i386.
+amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64 and 
i386/i386.
 .It Va WITHOUT_CPP
 Set to not build
 .Xr cpp 1 .
@@ -437,7 +432,7 @@ Set to not build
 .Xr 

Re: svn commit: r324835 - head/etc

2017-10-21 Thread Ngie Cooper (yaneurabeya)

> On Oct 21, 2017, at 14:58, Brad Davis  wrote:
> 
> Author: brd (doc,ports committer)
> Date: Sat Oct 21 21:58:24 2017
> New Revision: 324835
> URL: https://svnweb.freebsd.org/changeset/base/324835
> 
> Log:
>  Remove a atrun check that is nullified by r318443.
> 
>  Approved by: will

Thanks :).
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r324811 - in head/sys/dev/pms/freebsd/driver: common ini/src

2017-10-21 Thread Ngie Cooper (yaneurabeya)

> On Oct 21, 2017, at 00:23, Ryan Libby  wrote:
> 
> Author: rlibby
> Date: Sat Oct 21 07:23:45 2017
> New Revision: 324811
> URL: https://svnweb.freebsd.org/changeset/base/324811
> 
> Log:
>  pms/freebsd: fix compiler warnings
> 
>   - A number of unused variable warnings,
>   - a missing prototype warning (actually a dead function),
>   - and a potential use of an uninitialized variable.

You probably should look for the other _fantastic_ fixes that Danny Ryan cooked 
up for the driver. I don’t think you’ve found the branches that result in logic 
errors which trigger corruption yet…
Cheers,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r324666 - head/sys/kern

2017-10-17 Thread Ngie Cooper (yaneurabeya)

> On Oct 16, 2017, at 09:14, Matt Joras  wrote:
> 
> Author: mjoras
> Date: Mon Oct 16 16:14:50 2017
> New Revision: 324666
> URL: https://svnweb.freebsd.org/changeset/base/324666
> 
> Log:
>  Properly reset the fields in clean_unrhdr.
> 
>  In r324542 I neglected to reset the first and last fields of struct
>  unrhdr. This causes a tmpfs to fail the unr(9) consistency checks with
>  DIAGNOSTIC on. Fix this by resetting the fields by calling init_unrhdr.
>  While here, change a loop to use TAILQ_FOREACH_SAFE since it is more
>  readable and equally fast.

Thanks!


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r324541 - in head: share/man/man9 sys/kern sys/sys

2017-10-13 Thread Ngie Cooper (yaneurabeya)

> On Oct 11, 2017, at 14:53, Matt Joras  wrote:
> 
> Author: mjoras
> Date: Wed Oct 11 21:53:50 2017
> New Revision: 324541
> URL: https://svnweb.freebsd.org/changeset/base/324541
> 
> Log:
>  Add clearing function for unr(9).
> 
>  Previously before you could call unrhdr_delete you needed to
>  individually free every allocated unit. It is useful to be able to tear
>  down the unr without having to go through this process, as it is
>  significantly faster than freeing the individual units.
> 
>  Reviewed by: cem, lidl
>  Approved by: rstone (mentor)
>  Sponsored by:Dell EMC Isilon
>  Differential Revision:   https://reviews.freebsd.org/D12591
> 
> Modified:
>  head/share/man/man9/Makefile
>  head/share/man/man9/unr.9
>  head/sys/kern/subr_unit.c
>  head/sys/sys/systm.h
> 
> Modified: head/share/man/man9/Makefile
> ==
> --- head/share/man/man9/Makefile  Wed Oct 11 20:36:22 2017
> (r324540)
> +++ head/share/man/man9/Makefile  Wed Oct 11 21:53:50 2017
> (r324541)
> @@ -414,6 +414,7 @@ MAN=  accept_filter.9 \
> MLINKS=   unr.9 alloc_unr.9 \
>   unr.9 alloc_unrl.9 \
>   unr.9 alloc_unr_specific.9 \
> + unr.9 clear_unrhdr.9 \
>   unr.9 delete_unrhdr.9 \
>   unr.9 free_unr.9 \
>   unr.9 new_unrhdr.9
> 
> Modified: head/share/man/man9/unr.9
> ==
> --- head/share/man/man9/unr.9 Wed Oct 11 20:36:22 2017(r324540)
> +++ head/share/man/man9/unr.9 Wed Oct 11 21:53:50 2017(r324541)
> @@ -24,11 +24,12 @@
> .\"
> .\" $FreeBSD$
> .\"
> -.Dd July 5, 2010
> +.Dd October 4, 2017
> .Dt UNR 9
> .Os
> .Sh NAME
> .Nm new_unrhdr ,
> +.Nm clear_unrhdr ,
> .Nm delete_unrhdr ,
> .Nm alloc_unr ,
> .Nm alloc_unr_specific ,
> @@ -39,6 +40,8 @@
> .Ft "struct unrhdr *"
> .Fn new_unrhdr "int low" "int high" "struct mtx *mutex"
> .Ft void
> +.Fn clear_unrhdr "struct unrhdr *uh"
> +.Ft void
> .Fn delete_unrhdr "struct unrhdr *uh"
> .Ft int
> .Fn alloc_unr "struct unrhdr *uh"
> @@ -70,8 +73,16 @@ is not
> .Dv NULL ,
> it is used for locking when allocating and freeing units.
> Otherwise, internal mutex is used.
> +.It Fn clear_unrhdr uh
> +Clear all units from the specified unit number allocator entity.
> +This function resets the entity as if it were just initialized with
> +.Fn new_unrhdr .
> .It Fn delete_unrhdr uh
> -Destroy specified unit number allocator entity.
> +Delete specified unit number allocator entity.
> +This function frees the memory associated with the entity, it does not free
> +any units.
> +To free all units use
> +.Fn clear_unrhdr .
> .It Fn alloc_unr uh
> Return a new unit number.
> The lowest free number is always allocated.
> 
> Modified: head/sys/kern/subr_unit.c
> ==
> --- head/sys/kern/subr_unit.c Wed Oct 11 20:36:22 2017(r324540)
> +++ head/sys/kern/subr_unit.c Wed Oct 11 21:53:50 2017(r324541)
> @@ -366,6 +366,27 @@ delete_unrhdr(struct unrhdr *uh)
>   Free(uh);
> }
> 
> +void
> +clear_unrhdr(struct unrhdr *uh)
> +{
> + struct unr *up, *uq;
> +
> + KASSERT(TAILQ_EMPTY(&uh->ppfree),
> + ("unrhdr has postponed item for free"));
> + up = TAILQ_FIRST(&uh->head);
> + while (up != NULL) {

Could this be done with TAILQ_FOREACH_SAFE?
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r324471 - head/sys/boot

2017-10-13 Thread Ngie Cooper

> On Oct 9, 2017, at 21:57, Ngie Cooper (yaneurabeya)  
> wrote:
> 
> 
>> On Oct 9, 2017, at 21:56, Warner Losh  wrote:
>> 
>> DO NOT MAKE EDITS TO sys/boot. YOU ARE CREATING CONFLICTS FOR ME.
>> 
>> DO NOT MAKE ANY COMMITS TO sys/boot.
>> 
>> BACK OFF.
>> 
>> Seriously, though, extra changes create extra friction, and these changes 
>> aren't worth any friction at all. I'm deleting LIBSAU and this guarantees a 
>> conflict when I update.
>> 
>> So please, do not make any edits to sys/boot whatsoever, no matter how 
>> trivial.
>> 
>> At least until I'm done.
> 
> Ok

So... what’s the status?
-Ngie
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r324497 - head/usr.bin/su

2017-10-10 Thread Ngie Cooper
Author: ngie
Date: Tue Oct 10 15:41:35 2017
New Revision: 324497
URL: https://svnweb.freebsd.org/changeset/base/324497

Log:
  Mute gcc warning about p not being possibly initialized
  
  I'm running into this warning on a tinderbox run with gcc 4.2.1 with mips and
  powerpc.
  
  MFC after:1 week

Modified:
  head/usr.bin/su/su.c

Modified: head/usr.bin/su/su.c
==
--- head/usr.bin/su/su.cTue Oct 10 13:06:11 2017(r324496)
+++ head/usr.bin/su/su.cTue Oct 10 15:41:35 2017(r324497)
@@ -172,7 +172,7 @@ main(int argc, char *argv[])
au_id_t  auid;
 #endif
 
-   shell = class = cleanenv = NULL;
+   p = shell = class = cleanenv = NULL;
asme = asthem = fastlogin = statusp = 0;
user = "root";
iscsh = UNSET;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r324478 - in head: sbin/growfs/tests tests/sys/geom/class/eli

2017-10-09 Thread Ngie Cooper
Author: ngie
Date: Tue Oct 10 05:58:33 2017
New Revision: 324478
URL: https://svnweb.freebsd.org/changeset/base/324478

Log:
  Check the exit code from fsck_ffs instead of relying on MODIFIED being in the 
output
  
  ^/head@r323923 changed when MODIFIED is printed at exit. It's better to 
follow the
  documented way of determining whether or not a filesystem is clean per 
fsck_ffs, i.e.,
  ensure that the exit code is either 0 or 7.
  
  The pass/fail determination is brittle prior to this commit, and 
^/head@r323923 made
  the issue apparent -- thus this needs to be fixed independent of 
^/head@r323923.
  
  PR:   222780
  MFC after:1 week
  MFC with: r323923
  Reported by:  Jenkins

Modified:
  head/sbin/growfs/tests/legacy_test.pl
  head/tests/sys/geom/class/eli/resize_test.sh

Modified: head/sbin/growfs/tests/legacy_test.pl
==
--- head/sbin/growfs/tests/legacy_test.pl   Tue Oct 10 05:52:28 2017
(r324477)
+++ head/sbin/growfs/tests/legacy_test.pl   Tue Oct 10 05:58:33 2017
(r324478)
@@ -2,6 +2,7 @@
 
 use strict;
 use warnings;
+use POSIX;
 use Test::More tests => 19;
 use Fcntl qw(:DEFAULT :seek);
 
@@ -11,6 +12,22 @@ use constant BLKS_PER_MB => 2048;
 my $unit;
 END { system "mdconfig -du$unit" if defined $unit };
 
+sub fsck_md {
+my ($is_clean, $md);
+
+$md = shift;
+
+chomp(my @fsck_output = `fsck_ffs -Ffy ${md}a`);
+$is_clean = WIFEXITED($?) &&
+   (WEXITSTATUS($?) == 0 || WEXITSTATUS($?) == 7);
+ok($is_clean, "checking ${md}a's filesystem");
+if ($is_clean) {
+   diag "filesystem reported clean";
+} else {
+   diag "filesystem not reported clean: " . join("\n", @fsck_output);
+}
+}
+
 sub setsize {
 my ($partszMB, $unitszMB) = @_;
 
@@ -46,9 +63,8 @@ SKIP: {
ok(setsize(10, 40), "Sized ${md}a to 10m");
system "newfs -O $type -U ${md}a >/dev/null";
is($?, 0, "Initialised the filesystem on ${md}a as UFS$type");
-   chomp(my @out = `fsck -tufs -y ${md}a`);
-   ok(!grep(/MODIFIED/, @out), "fsck says ${md}a is clean, " .
-   scalar(@out) . " lines of output");
+
+   fsck_md($md);
}
 
extend20_zeroed: {
@@ -62,9 +78,7 @@ SKIP: {
fill(30 * BLKS_PER_MB - $unallocated, $unallocated, chr(0))
if $unallocated;
 
-   chomp(my @out = `fsck -tufs -y ${md}a`);
-   ok(!grep(/MODIFIED/, @out), "fsck says ${md}a is clean, " .
-   scalar(@out) . " lines of output");
+   fsck_md($md);
}
 
extend30_garbaged: {
@@ -78,9 +92,7 @@ SKIP: {
fill(30 * BLKS_PER_MB - $unallocated, $unallocated, chr(0))
if $unallocated;
 
-   chomp(my @out = `fsck -tufs -y ${md}a`);
-   ok(!grep(/MODIFIED/, @out), "fsck says ${md}a is clean, " .
-   scalar(@out) . " lines of output");
+   fsck_md($md);
}
 }
 

Modified: head/tests/sys/geom/class/eli/resize_test.sh
==
--- head/tests/sys/geom/class/eli/resize_test.shTue Oct 10 05:52:28 
2017(r324477)
+++ head/tests/sys/geom/class/eli/resize_test.shTue Oct 10 05:58:33 
2017(r324478)
@@ -12,6 +12,19 @@ md=$(mdconfig -s40m) || exit 1
 unit=${md#md}
 i=1
 
+fsck_md()
+{
+   local is_clean
+
+   out=$(fsck_ffs -Ffy ${md}a.eli)
+   if [ $? -eq 0 -o $? -eq 7 ]; then
+   echo "ok $i - fsck says ${md}a.eli is clean"
+   else
+   echo "not ok $i - fsck says ${md}a.eli is dirty"
+   fi
+   i=$((i + 1))
+}
+
 setsize() {
 partszMB=$1 unitszMB=$2
 
@@ -38,13 +51,8 @@ i=$((i + 1))
 newfs -U ${md}a.eli >/dev/null || echo -n "not "
 echo ok $i - "Initialised the filesystem on ${md}a.eli"
 i=$((i + 1))
-out=$(fsck -tufs -y ${md}a.eli)
-echo "$out" | fgrep -q MODIFIED && echo -n "not "
-echo ok $i - "fsck says ${md}a.eli is clean," $(echo $(echo "$out" | wc -l)) \
-"lines of output"
-i=$((i + 1))
+fsck_md
 
-
 # Doing a backup, resize & restore must be forced (with -f) as geli
 # verifies that the provider size in the metadata matches the consumer.
 
@@ -78,13 +86,8 @@ growfs -y ${md}a.eli >/dev/null || echo -n "not "
 echo ok $i - "Extended the filesystem on ${md}a.eli"
 i=$((i + 1))
 
-out=$(fsck -tufs -y ${md}a.eli)
-echo "$out" | fgrep -q MODIFIED && echo -n "not "
-echo ok $i - "fsck says ${md}a.eli is clean," $(echo $(echo "$out" | wc -l)) \
-"lines of output"
-i=$((i + 1))
+fsck_md
 
-
 # Now do the resize properly
 
 geli detach ${md}a.eli || echo -n "not "
@@ -110,11 +113,7 @@ growfs -y ${md}a.eli >/dev/null || echo -n "not "
 echo ok $i - "Extended the filesystem on ${md}a.eli"
 i=$((i + 1))
 
-out=$(fsck -tufs -y ${md}a.eli)
-echo "$out" | fgrep -q MODIFIED && echo -n "not "
-echo ok $i - "fsck says ${md}a.eli is clean," $(echo $(echo "$

Re: svn commit: r324471 - head/sys/boot

2017-10-09 Thread Ngie Cooper (yaneurabeya)

> On Oct 9, 2017, at 21:56, Warner Losh  wrote:
> 
> DO NOT MAKE EDITS TO sys/boot. YOU ARE CREATING CONFLICTS FOR ME.
> 
> DO NOT MAKE ANY COMMITS TO sys/boot.
> 
> BACK OFF.
> 
> Seriously, though, extra changes create extra friction, and these changes 
> aren't worth any friction at all. I'm deleting LIBSAU and this guarantees a 
> conflict when I update.
> 
> So please, do not make any edits to sys/boot whatsoever, no matter how 
> trivial.
> 
> At least until I'm done.

Ok


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r324471 - head/sys/boot

2017-10-09 Thread Ngie Cooper
Author: ngie
Date: Tue Oct 10 04:53:26 2017
New Revision: 324471
URL: https://svnweb.freebsd.org/changeset/base/324471

Log:
  Fix typos: `stand alon{e,g}` should be spelled like `standalone`

Modified:
  head/sys/boot/Makefile.inc

Modified: head/sys/boot/Makefile.inc
==
--- head/sys/boot/Makefile.inc  Tue Oct 10 04:50:05 2017(r324470)
+++ head/sys/boot/Makefile.inc  Tue Oct 10 04:53:26 2017(r324471)
@@ -6,11 +6,11 @@
 __BOOT_MAKEFILE_INC__=${MFILE}
 
 SASRC=${SRCTOP}/lib/libstand
-# Normal stand alone library
+# Normal standalone library
 LIBSA=${OBJTOP}/sys/boot/libsa/libstand.a
-# stand alone library compiled for 32-bit version of the processor
+# Standalone library compiled for 32-bit version of the processor
 LIBSA32=${OBJTOP}/sys/boot/libstand32/libstand.a
-# stand along library compiled for userboot
+# Standalone library compiled for userboot
 LIBSAU=${OBJTOP}/sys/boot/userboot/libstand/libstand.a
 
 CFLAGS+=-I${SASRC}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r324470 - head/sys/modules/iwmfw

2017-10-09 Thread Ngie Cooper
Author: ngie
Date: Tue Oct 10 04:50:05 2017
New Revision: 324470
URL: https://svnweb.freebsd.org/changeset/base/324470

Log:
  Add missing SUBDIR needed for iwmfw to load after ^/head@r324434
  
  Submitted by: Pete Wright 
  MFC after:1 month
  MFC with: r324434

Modified:
  head/sys/modules/iwmfw/Makefile

Modified: head/sys/modules/iwmfw/Makefile
==
--- head/sys/modules/iwmfw/Makefile Tue Oct 10 04:47:01 2017
(r324469)
+++ head/sys/modules/iwmfw/Makefile Tue Oct 10 04:50:05 2017
(r324470)
@@ -4,6 +4,7 @@ SUBDIR= iwm3160fw \
iwm7260fw \
iwm7265fw \
iwm7265Dfw \
-   iwm8000Cfw
+   iwm8000Cfw \
+   iwm8265fw
 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r324469 - head/sys/modules/iwmfw

2017-10-09 Thread Ngie Cooper
Author: ngie
Date: Tue Oct 10 04:47:01 2017
New Revision: 324469
URL: https://svnweb.freebsd.org/changeset/base/324469

Log:
  Sort SUBDIR and put entries on a single list
  
  This is to aid with identifying diffs between commits.
  
  MFC after:3 days

Modified:
  head/sys/modules/iwmfw/Makefile

Modified: head/sys/modules/iwmfw/Makefile
==
--- head/sys/modules/iwmfw/Makefile Tue Oct 10 03:40:38 2017
(r324468)
+++ head/sys/modules/iwmfw/Makefile Tue Oct 10 04:47:01 2017
(r324469)
@@ -1,5 +1,9 @@
 # $FreeBSD$
 
-SUBDIR=iwm3160fw iwm7260fw iwm7265fw iwm8000Cfw iwm7265Dfw
+SUBDIR=iwm3160fw \
+   iwm7260fw \
+   iwm7265fw \
+   iwm7265Dfw \
+   iwm8000Cfw
 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r324452 - in head/sys/boot: . arm/uboot efi/boot1 efi/loader i386/gptboot i386/gptzfsboot i386/loader i386/zfsboot mips/beri/boot2 mips/beri/loader mips/uboot powerpc/kboot powerpc/ofw

2017-10-09 Thread Ngie Cooper (yaneurabeya)

> On Oct 9, 2017, at 16:23, John Baldwin  wrote:

…

> s/along/alone/.  bde@ probably prefers that the comments start with a capital
> letter as well.

Also: standalone is one word, not 2.
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r324406 - head/sys/modules/em

2017-10-09 Thread Ngie Cooper (yaneurabeya)

> On Oct 9, 2017, at 18:54, Ian Lepore  wrote:

...

> I think the right answer here is just
> 
>   LINKS= ${KMODDIR}/${KMOD}.ko ${KMODDIR}/if_igb.ko

That will definitely work and is probably the best pattern.
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r324406 - head/sys/modules/em

2017-10-08 Thread Ngie Cooper

> On Oct 7, 2017, at 16:33, Sean Bruno  wrote:
> 
> Author: sbruno
> Date: Sat Oct  7 23:33:14 2017
> New Revision: 324406
> URL: https://svnweb.freebsd.org/changeset/base/324406
> 
> Log:
>  Fix symlink if_igb.ko in -current such that its relative and doesn't
>  end up with non-standard DESTDIR information in its symlink.  This
>  can happen very trivially if the release scripts are used.
> 
>  Sponsored by:Limelight Networks
> 
> Modified:
>  head/sys/modules/em/Makefile
> 
> Modified: head/sys/modules/em/Makefile
> ==
> --- head/sys/modules/em/MakefileSat Oct  7 23:30:57 2017(r324405)
> +++ head/sys/modules/em/MakefileSat Oct  7 23:33:14 2017(r324406)
> @@ -23,6 +23,6 @@ CFLAGS += -I${SRCTOP}/sys/dev/e1000
> #CFLAGS  += -DDEVICE_POLLING
> 
> afterinstall:
> -ln -sf ${DESTDIR}${KMODDIR}/${KMOD}.ko ${DESTDIR}${KMODDIR}/if_igb.ko
> +cd ${DESTDIR}${KMODDIR} && ln -sf if_em.ko if_igb.ko

While this is definitely better, the same thing could be achieved via:

ln -sf if_em.ko ${DESTDIR}/.../if_igb.ko
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r324360 - in head/sys/boot/efi: include libefi loader

2017-10-07 Thread Ngie Cooper (yaneurabeya)

> On Oct 7, 2017, at 09:29, Guy Yur  wrote:
> 
> On 6 October 2017 at 15:21, Warner Losh  wrote:
>> Author: imp
>> Date: Fri Oct  6 12:21:46 2017
>> New Revision: 324360
>> URL: https://svnweb.freebsd.org/changeset/base/324360
>> 
>> Log:
>>  Encapsulate  ZFS preferences into efi_zfs_is_preferred
>> 
>>  Move the retrieval of the image information into loader's main instead
>>  of doing it in efizfs.c
>> 
>>  Differential Revision: https://reviews.freebsd.org/D12564
>>  Submitted by: Eric McCorkle
>> 
>> Modified:
>>  head/sys/boot/efi/include/efizfs.h
>>  head/sys/boot/efi/libefi/efizfs.c
>>  head/sys/boot/efi/loader/main.c
>> 
>> ...
> 
> Hi,
> 
> When setting WITHOUT_ZFS in src.conf the build fails with:
> 
> /usr/src/sys/boot/efi/loader/main.c:78:1: error: no previous prototype
> for function 'efi_zfs_is_preferred'
>  [-Werror,-Wmissing-prototypes]
> efi_zfs_is_preferred(EFI_HANDLE *h)
> ^
> 1 error generated.
> *** Error code 1
> 
> 
> The prototype is under #ifdef EFI_ZFS_BOOT guard but the function is not.

Fixed: r324388.
Thanks!
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r324388 - head/sys/boot/efi/loader

2017-10-07 Thread Ngie Cooper
Author: ngie
Date: Sat Oct  7 17:40:31 2017
New Revision: 324388
URL: https://svnweb.freebsd.org/changeset/base/324388

Log:
  Unbreak building efiboot with MK_ZFS == no
  
  Wrap `efi_zfs_is_preferred` with `#ifdef EFI_ZFS_BOOT`.
  
  Reported by:  Guy Yur 

Modified:
  head/sys/boot/efi/loader/main.c

Modified: head/sys/boot/efi/loader/main.c
==
--- head/sys/boot/efi/loader/main.c Sat Oct  7 17:32:39 2017
(r324387)
+++ head/sys/boot/efi/loader/main.c Sat Oct  7 17:40:31 2017
(r324388)
@@ -74,12 +74,13 @@ EFI_GUID inputid = SIMPLE_TEXT_INPUT_PROTOCOL;
 
 static EFI_LOADED_IMAGE *img;
 
+#ifdef EFI_ZFS_BOOT
 bool
 efi_zfs_is_preferred(EFI_HANDLE *h)
 {
 return (h == img->DeviceHandle);
 }
-
+#endif
 
 static int
 has_keyboard(void)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r324249 - head/lib/libc/net

2017-10-04 Thread Ngie Cooper

> On Oct 3, 2017, at 23:06, Cy Schubert  wrote:
> 
> Author: cy
> Date: Wed Oct  4 06:06:22 2017
> New Revision: 324249
> URL: https://svnweb.freebsd.org/changeset/base/324249
> 
> Log:
>  Clarify the wording describing the stayopen flag.
> 
>  MFC after:1 week
> 
> Modified:
>  head/lib/libc/net/gethostbyname.3
> 
> Modified: head/lib/libc/net/gethostbyname.3
> ==
> --- head/lib/libc/net/gethostbyname.3Wed Oct  4 03:39:54 2017(r324248)
> +++ head/lib/libc/net/gethostbyname.3Wed Oct  4 06:06:22 2017(r324249)
> @@ -28,7 +28,7 @@
> .\" From: @(#)gethostbyname.38.4 (Berkeley) 5/25/95
> .\" $FreeBSD$
> .\"
> -.Dd May 12, 2006
> +.Dd October 4, 2017
> .Dt GETHOSTBYNAME 3
> .Os
> .Sh NAME
> @@ -189,19 +189,18 @@ function
> may be used to request the use of a connected
> .Tn TCP
> socket for queries.
> -If the
> +Queries will by defaulat use
> +.Tn UDP
> +datagrams. If the

manlint: new sentences must start on new lines.
Cheers,
-Ngie
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r324257 - head/usr.sbin/mountd

2017-10-04 Thread Ngie Cooper

> On Oct 4, 2017, at 01:43, Emmanuel Vadot  wrote:
> 
> Author: manu
> Date: Wed Oct  4 08:43:56 2017
> New Revision: 324257
> URL: https://svnweb.freebsd.org/changeset/base/324257
> 
> Log:
>  mountd: Convert exportlist to SLIST
> 
>  Use SLIST from sys/queue.h instead of homebrew linked list for the 
> exportlist.
> 
>  Reviewed by:bapt, rmacklem
>  MFC after:1 week
>  Sponsored by:Gandi.net
>  Differential Revision:https://reviews.freebsd.org/D12502
> 
> Modified:
>  head/usr.sbin/mountd/mountd.c

...

> -ep2 = exphead;
> -epp = &exphead;
> +SLIST_INSERT_HEAD(&exphead, ep, entries);
> 
> -/*
> - * Insert in the list in alphabetical order.
> - */
> -while (ep2 && strcmp(ep2->ex_fsdir, ep->ex_fsdir) < 0) {
> -epp = &ep2->ex_next;
> -ep2 = ep2->ex_next;
> -}
> -if (ep2)
> -ep->ex_next = ep2;
> -*epp = ep;
>ep->ex_flag |= EX_LINKED;

The new code isn’t functionally equivalent to the old code: the mount list 
is no longer sorted on insert. Is that intentional?
Thanks,
-Ngie
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r324143 - head

2017-09-30 Thread Ngie Cooper
Author: ngie
Date: Sat Sep 30 21:00:08 2017
New Revision: 324143
URL: https://svnweb.freebsd.org/changeset/base/324143

Log:
  Adjust r322633 to only apply to libexec/rtld-elf, and not usr.bin/ldd,
  when running build32/install32
  
  This unbreaks installing usr.bin/ldd as ldd32 when NO_RTLD is defined.
  
  MFC after:  1 week
  MFC with:   r322633

Modified:
  head/Makefile.libcompat

Modified: head/Makefile.libcompat
==
--- head/Makefile.libcompat Sat Sep 30 20:50:31 2017(r324142)
+++ head/Makefile.libcompat Sat Sep 30 21:00:08 2017(r324143)
@@ -179,10 +179,12 @@ build${libcompat}: .PHONY
 .endfor
${_+_}cd ${.CURDIR}; \
${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries
-.if ${libcompat} == "32" && !defined(NO_RTLD)
+.if ${libcompat} == "32"
 .for _t in ${_obj} all
+.if !defined(NO_RTLD)
${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 
${LIBCOMPATWMAKE} \
-DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t}
+.endif
${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATWMAKE} \
DIRPRFX=usr.bin/ldd ${_t}
 .endfor
@@ -192,9 +194,11 @@ distribute${libcompat} install${libcompat}: .PHONY
 .for _dir in ${_LC_LIBDIRS.yes}
${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATIMAKE} 
${.TARGET:S/${libcompat}$//}
 .endfor
-.if ${libcompat} == "32" && !defined(NO_RTLD)
+.if ${libcompat} == "32"
+.if !defined(NO_RTLD)
${_+_}cd ${.CURDIR}/libexec/rtld-elf; \
PROG=ld-elf32.so.1 ${LIBCOMPATIMAKE} ${.TARGET:S/32$//}
+.endif
${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATIMAKE} \
${.TARGET:S/32$//}
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r324109 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/dispatcher sys/contrib/dev/acpica/components/h

2017-09-30 Thread Ngie Cooper (yaneurabeya)

> On Sep 30, 2017, at 09:16, Konstantin Belousov  wrote:

Given the number of panic reports, could the commit be reverted and a 
fix be submitted later so others can develop on ^/head?
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r323960 - head/tests/sys/opencrypto

2017-09-23 Thread Ngie Cooper
Author: ngie
Date: Sun Sep 24 00:14:48 2017
New Revision: 323960
URL: https://svnweb.freebsd.org/changeset/base/323960

Log:
  Convert some idioms over to py3k-compatible idioms
  
  - Import print_function from __future__ and use print(..) instead of `print 
..`.
  - Use repr instead of backticks when the object needs to be dumped, unless
print(..) can do it lazily. Use str instead of backticks as appropriate
for simplification reasons.
  
  This doesn't fully convert these modules over py3k. It just gets over some of
  the trivial compatibility hurdles.

Modified:
  head/tests/sys/opencrypto/cryptodev.py
  head/tests/sys/opencrypto/cryptotest.py

Modified: head/tests/sys/opencrypto/cryptodev.py
==
--- head/tests/sys/opencrypto/cryptodev.py  Sun Sep 24 00:07:18 2017
(r323959)
+++ head/tests/sys/opencrypto/cryptodev.py  Sun Sep 24 00:14:48 2017
(r323960)
@@ -30,6 +30,7 @@
 # $FreeBSD$
 #
 
+from __future__ import print_function
 import array
 import dpkt
 from fcntl import ioctl
@@ -174,9 +175,9 @@ class Crypto:
if not cipher and not mac:
raise ValueError('one of cipher or mac MUST be 
specified.')
ses.crid = crid
-   #print `ses`
+   #print(ses)
s = array.array('B', ses.pack_hdr())
-   #print `s`
+   #print(s)
ioctl(_cryptodev, CIOCGSESSION2, s, 1)
ses.unpack(s)
 
@@ -206,7 +207,7 @@ class Crypto:
ivbuf = array.array('B', iv)
cop.iv = ivbuf.buffer_info()[0]
 
-   #print 'cop:', `cop`
+   #print('cop:', cop)
ioctl(_cryptodev, CIOCCRYPT, str(cop))
 
s = s.tostring()
@@ -234,7 +235,8 @@ class Crypto:
if tag is None:
tag = array.array('B', [0] * self._maclen)
else:
-   assert len(tag) == self._maclen, `len(tag), 
self._maclen`
+   assert len(tag) == self._maclen, \
+'%d != %d' % (len(tag), self._maclen)
tag = array.array('B', tag)
 
caead.tag = tag.buffer_info()[0]
@@ -288,8 +290,8 @@ class Crypto:
 
signal.signal(signal.SIGALRM, oldalarm)
 
-   print 'time:', end - start
-   print 'perf MB/sec:', (reps * size) / (end - start) / 1024 / 
1024
+   print('time:', end - start)
+   print('perf MB/sec:', (reps * size) / (end - start) / 1024 / 
1024)
 
def encrypt(self, data, iv, aad=None):
if aad is None:
@@ -332,7 +334,7 @@ class KATParser:
if i[0] == '[':
yield i[1:].split(']', 1)[0], self.fielditer()
else:
-   raise ValueError('unknown line: %s' % `i`)
+   raise ValueError('unknown line: %r' % repr(i))
 
def eatblanks(self):
while True:
@@ -362,12 +364,12 @@ class KATParser:
if line == 'FAIL':
f, v = 'FAIL', ''
else:
-   print 'line:', `line`
+   print('line:', repr(line))
raise
v = v.strip()
 
if f in values:
-   raise ValueError('already present: %s' 
% `f`)
+   raise ValueError('already present: %r' 
% repr(f))
values[f] = v
line = self.fp.readline().strip()
if not line:
@@ -377,7 +379,7 @@ class KATParser:
remain = self.fields.copy() - set(values.keys())
# XXX - special case GCM decrypt
if remain and not ('FAIL' in values and 'PT' in remain):
-   raise ValueError('not all fields found: 
%s' % `remain`)
+   raise ValueError('not all fields found: %r' % 
repr(remain))
 
yield values
 
@@ -388,22 +390,22 @@ if __name__ == '__main__':
if True:
try:
crid = Crypto.findcrid('aesni0')
-   print 'aesni:', crid
+   print('aesni:', crid)
except IOError:
-   print 'aesni0 not found'
+   print('aesni0 not found')
 
for i in xrange(10):
try:
name = Crypto.getcridname(i)
-   print '%2d: %s' % (i, `name`)
+ 

Re: svn commit: r323935 - head/sys/kern

2017-09-22 Thread Ngie Cooper (yaneurabeya)

> On Sep 22, 2017, at 13:01, Conrad Meyer  wrote:
> 
> Author: cem
> Date: Fri Sep 22 20:01:12 2017
> New Revision: 323935
> URL: https://svnweb.freebsd.org/changeset/base/323935
> 
> Log:
>  ddb(4): Add 'show badstacks' command to show witness badstacks
> 
>  Add a DDB command that mirrors sysctl debug.witness.badstacks.
> 
>  Reported by: rstone
>  Reviewed by: rstone
>  Sponsored by:Dell EMC Isilon
>  Differential Revision:   https://reviews.freebsd.org/D12468

This broke GENERIC:

--- subr_witness.o ---
/usr/src/sys/kern/subr_witness.c:2577:4: error: use of undeclared identifier 
'req'
req->oldidx = 0;
^
/usr/src/sys/kern/subr_witness.c:2603:5: error: use of undeclared identifier 
'req'
req->oldidx = 0;
^
/usr/src/sys/kern/subr_witness.c:2662:3: error: use of undeclared identifier 
'req'
req->oldidx = 0;
^


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r323899 - head/tests/sys/opencrypto

2017-09-22 Thread Ngie Cooper (yaneurabeya)

> On Sep 21, 2017, at 21:41, Conrad Meyer  wrote:
> 
> Author: cem
> Date: Fri Sep 22 04:41:48 2017
> New Revision: 323899
> URL: https://svnweb.freebsd.org/changeset/base/323899
> 
> Log:
>  cryptotest.py: Like r323869, skip SHA HMAC tests on non-SHA drivers
> 
>  Sponsored by:Dell EMC Isilon
> 
> Modified:
>  head/tests/sys/opencrypto/cryptotest.py
> 
> Modified: head/tests/sys/opencrypto/cryptotest.py
> ==
> --- head/tests/sys/opencrypto/cryptotest.py   Fri Sep 22 04:25:44 2017
> (r323898)
> +++ head/tests/sys/opencrypto/cryptotest.py   Fri Sep 22 04:41:48 2017
> (r323899)
> @@ -237,6 +237,7 @@ def GenTestCase(cname):
>   #for i in iglob('SHA1*'):
>   #   self.runSHA(i)
> 
> + @unittest.skipIf(cname not in shamodules, 'skipping SHA on %s' 
> % `name`)

Backticks for stringily’ing things isn’t py3k compatible, FYI.
-Ngie



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r323635 - in head/sys: dev/bnxt dev/e1000 kern net sys

2017-09-15 Thread Ngie Cooper (yaneurabeya)

> On Sep 15, 2017, at 19:41, Stephen Hurd  wrote:
> 
> Author: shurd
> Date: Sat Sep 16 02:41:38 2017
> New Revision: 323635
> URL: https://svnweb.freebsd.org/changeset/base/323635
> 
> Log:
>  Revert r323516 (iflib rollup)
> 
>  This was really too big of a commit even if everything worked, but there
>  are multiple new issues introduced in the one huge commit, so it's not
>  worth keeping this until it's fixed.
> 
>  I'll work on splitting this up into logical chunks and introduce them one
>  at a time over the next week or two.

Thank you,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys

2017-09-12 Thread Ngie Cooper

> On Sep 12, 2017, at 18:18, Stephen Hurd  wrote:
> 
> Author: shurd
> Date: Wed Sep 13 01:18:42 2017
> New Revision: 323516
> URL: https://svnweb.freebsd.org/changeset/base/323516
> 
> Log:
>  Roll up iflib commits from github.  This pulls in most of the work done
>  by Matt Macy as well as other changes which he has accepted via pull
>  request to his github repo at https://github.com/mattmacy/networking/
> 
>  This should bring -CURRENT and the github repo into close enough sync to
>  allow small feature branches rather than a large chain of interdependant
>  patches being developed out of tree.  The reset of the synchronization
>  should be able to be completed on github by splitting the remaining
>  changes that are not yet ready into short feature branches for later
>  review as smaller commits.
> 
>  Here is a summary of changes included in this patch:
> 
>  1)  More checks when INVARIANTS are enabled for eariler problem
>  detection
>  2)  Group Task Queue cleanups
>  - Fix use of duplicate shortdesc for gtaskqueue malloc type.
>Some interfaces such as memguard(9) use the short description to
>identify malloc types, so duplicates should be avoided.
>  3)  Allow gtaskqueues to use ithreads in addition to taskqueues
>  - In some cases, this can improve performance
>  4)  Better logging when taskqgroup_attach*() fails to set interrupt
>  affinity.
>  5)  Do not start gtaskqueues until they're needed
>  6)  Have mp_ring enqueue function enter the ABDICATED rather than BUSY
>  state.  This moves the TX to the gtaskq and allows processing to
>  continue faster as well as make TX batching more likely.
>  7)  Add an ift_txd_errata function to struct if_txrx.  This allows
>  drivers to inspect/modify mbufs before transmission.
>  8)  Add a new IFLIB_NEED_ZERO_CSUM for drivers to indicate they need
>  checksums zeroed for checksum offload to work.  This avoids modifying
>  packet data in the TX path when possible.
>  9)  Use ithreads for iflib I/O instead of taskqueues
>  10) Clean up ioctl and support async ioctl functions
>  11) Prefetch two cachlines from each mbuf instead of one up to 128B.  We
>  often need to parse packet header info beyond 64B.
>  12) Fix potential memory corruption due to fence post error in
>  bit_nclear() usage.
>  13) Improved hang detection and handling
>  14) If the packet is smaller than MTU, disable the TSO flags.
>  This avoids extra packet parsing when not needed.
>  15) Move TCP header parsing inside the IS_TSO?() test.
>  This avoids extra packet parsing when not needed.
>  16) Pass chains of mbufs that are not consumed by lro to if_input()
>  rather call if_input() for each mbuf.
>  17) Re-arrange packet header loads to get as much work as possible done
>  before a cache stall.
>  18) Lock the context when calling IFDI_ATTACH_PRE()/IFDI_ATTACH_POST()/
>  IFDI_DETACH();
>  19) Attempt to distribute RX/TX tasks across cores more sensibly,
>  especially when RX and TX share an interrupt.  RX will attempt to
>  take the first threads on a core, and TX will attempt to take
>  successive threads.
>  20) Allow iflib_softirq_alloc_generic() to request affinity to the same
>  cpus an interrupt has affinity with.  This allows TX queues to
>  ensure they are serviced by the socket the device is on.
>  21) Add new iflib sysctls to net.iflib:
>  - timer_int - interval at which to run per-queue timers in ticks
>  - force_busdma
>  22) Add new per-device iflib sysctls to dev.X.Y.iflib
>  - rx_budget allows tuning the batch size on the RX path
>  - watchdog_events Count of watchdog events seen since load
>  23) Fix error where netmap_rxq_init() could get called before
>  IFDI_INIT()
>  24) e1000: Fixed version of r323008: post-cold sleep instead of DELAY
>  when waiting for firmware
>  - After interrupts are enabled, convert all waits to sleeps
>  - Eliminates e1000 software/firmware synchronization busy waits after
>startup
>  25) e1000: Remove special case for budget=1 in em_txrx.c
>  - Premature optimization which may actually be incorrect with
>multi-segment packets
>  26) e1000: Split out TX interrupt rather than share an interrupt for
>  RX and TX.
>  - Allows better performance by keeping RX and TX paths separate
>  27) e1000: Separate igb from em code where suitable
>  Much easier to understand separate functions and "if (is_igb)" than
>  previous tests like "if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC))"
> 
>  #blamebruno
> 
>  Reviewed by:sbruno
>  Approved by:sbruno (mentor)
>  Sponsored by:Limelight Networks
>  Differential Revision:https://reviews.freebsd.org/D12235

*gasps at the LoC count and number of changed drivers*

Could someone please better break this up in the future..?

Thank you,
-Ngie
___
svn-src-head@freebsd.org mailing list
https://

Re: svn commit: r323508 - head/usr.sbin/bsdinstall/partedit

2017-09-12 Thread Ngie Cooper

> On Sep 12, 2017, at 15:19, Ravi Pokala  wrote:
> 
> Author: rpokala
> Date: Tue Sep 12 22:19:21 2017
> New Revision: 323508
> URL: https://svnweb.freebsd.org/changeset/base/323508
> 
> Log:
>  When doing a non-interactive installation, don't display an interactive
>  warning about a filesystem which doesn't have a mountpoint. Presumably, the
>  person who wrote the install script knew what they were doing.

This seems very counterintuitive. It should fail citing the error, not 
prompt. This only mutes the prompt.
Thanks,
-Ngie
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r323365 - in head: cddl/lib/libzpool gnu/usr.bin/binutils/libbfd usr.bin/svn/lib/libsvn_client

2017-09-09 Thread Ngie Cooper (yaneurabeya)

> On Sep 9, 2017, at 14:51, Konstantin Belousov  wrote:

…

> Then, why peigen.c was left in the SRCS ?

I’m not sure, but you might have thought peigen.c and pepigen.c were the same 
file. If so, they’re not — they have slightly different spelling.
HTH,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r323365 - in head: cddl/lib/libzpool gnu/usr.bin/binutils/libbfd usr.bin/svn/lib/libsvn_client

2017-09-09 Thread Ngie Cooper (yaneurabeya)

> On Sep 9, 2017, at 11:35, Konstantin Belousov  wrote:
> 
> On Sat, Sep 09, 2017 at 01:18:33PM +, Jonathan Anderson wrote:
>> Author: jonathan
>> Date: Sat Sep  9 13:18:32 2017
>> New Revision: 323365
>> URL: https://svnweb.freebsd.org/changeset/base/323365
>> 
>> Log:
>>  Remove redundant source and object files.
> 
>> Modified: head/gnu/usr.bin/binutils/libbfd/Makefile.amd64
>> ==
>> --- head/gnu/usr.bin/binutils/libbfd/Makefile.amd64  Sat Sep  9 12:50:12 
>> 2017(r323364)
>> +++ head/gnu/usr.bin/binutils/libbfd/Makefile.amd64  Sat Sep  9 13:18:32 
>> 2017(r323365)
>> @@ -9,7 +9,6 @@ DEFAULT_VECTOR=  bfd_elf64_x86_64_freebsd_vec
>> 
>> SRCS+=   elf64-x86-64.c \
>>  efi-app-x86_64.c \
>> -efi-app-ia32.c \
>>  elf64.c \
>>  elf64-gen.c \
>>  elf64-target.h \
> Why did you claimed that x86 efi binfmt is  redundant ?

It’s redundant because of how the Makefile gets .include’d (amd64 
requires i386’s Makefile).
Cheers,
-Ngie

$ grep -r efi-app gnu/usr.bin/binutils/libbfd/
gnu/usr.bin/binutils/libbfd/Makefile.amd64: efi-app-x86_64.c \
gnu/usr.bin/binutils/libbfd/Makefile.amd64: efi-app-ia32.c \
gnu/usr.bin/binutils/libbfd/Makefile.i386:  efi-app-ia32.c \
$ grep include gnu/usr.bin/binutils/libbfd/Makefile.amd64
.include "${.CURDIR}/Makefile.i386”


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r323348 - head/usr.bin/tail/tests

2017-09-08 Thread Ngie Cooper
Author: ngie
Date: Sat Sep  9 06:24:21 2017
New Revision: 323348
URL: https://svnweb.freebsd.org/changeset/base/323348

Log:
  Unbreak :broken_pipe
  
  - Capture exit code in pipeline and test in output.
  - Drop awk use in favor of `sleep 2`. This helps guarantee the EPIPE
behavior without the potential race.

Modified:
  head/usr.bin/tail/tests/tail_test.sh

Modified: head/usr.bin/tail/tests/tail_test.sh
==
--- head/usr.bin/tail/tests/tail_test.shSat Sep  9 06:04:05 2017
(r323347)
+++ head/usr.bin/tail/tests/tail_test.shSat Sep  9 06:24:21 2017
(r323348)
@@ -222,10 +222,10 @@ broken_pipe_head()
 }
 broken_pipe_body()
 {
-   atf_expect_fail "Can't seem to get testcase to work in test 
environment.  Reproduces easily in interactive shell."
-
atf_check -o save:ints seq -f '%128g' 1 1000
-   atf_check -s exit:1 -o ignore -e "inline:tail: stdout" tail -n 856 ints 
| awk '{ exit }'
+   atf_check -s ignore \
+   -e "inline:tail: stdout\nexit code: 1\n" \
+   -x '(tail -n 856 ints; echo exit code: $? >&2) | sleep 2'
 }
 
 
@@ -243,5 +243,5 @@ atf_init_test_cases()
atf_add_test_case longfile_rc135782
atf_add_test_case longfile_rc145782_longlines
atf_add_test_case longfile_rn2500
-   #atf_add_test_case broken_pipe
+   atf_add_test_case broken_pipe
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323345 - head/usr.bin/tail/tests

2017-09-08 Thread Ngie Cooper
Author: ngie
Date: Sat Sep  9 05:50:47 2017
New Revision: 323345
URL: https://svnweb.freebsd.org/changeset/base/323345

Log:
  Check result of seq call and save output via atf_check -o
  
  This ensures that seq outputting to ints will not fail as silently if there's
  an error.

Modified:
  head/usr.bin/tail/tests/tail_test.sh

Modified: head/usr.bin/tail/tests/tail_test.sh
==
--- head/usr.bin/tail/tests/tail_test.shSat Sep  9 05:42:23 2017
(r323344)
+++ head/usr.bin/tail/tests/tail_test.shSat Sep  9 05:50:47 2017
(r323345)
@@ -224,7 +224,7 @@ broken_pipe_body()
 {
atf_expect_fail "Can't seem to get testcase to work in test 
environment.  Reproduces easily in interactive shell."
 
-   seq -f '%128g' 1 1000 > ints
+   atf_check -o save:ints seq -f '%128g' 1 1000
atf_check -s exit:1 -o ignore -e "inline:tail: stdout" tail -n 856 ints 
| awk '{ exit }'
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r323329 - head/sys/sys

2017-09-08 Thread Ngie Cooper (yaneurabeya)

> On Sep 8, 2017, at 13:09, Mateusz Guzik  wrote:
> 
> Author: mjg
> Date: Fri Sep  8 20:09:14 2017
> New Revision: 323329
> URL: https://svnweb.freebsd.org/changeset/base/323329
> 
> Log:
>  Allow __builtin_memset instead of bzero for small buffers of known size
> 
>  In particular this eliminates function calls and related register 
> save/restore
>  when only few writes would suffice.
> 
>  Example speed up can be seen in a fstat microbenchmark on AMD Ryzen cpus, 
> where
>  the throughput went up by ~4.5%.
> 
>  Thanks to cem@ for benchmarking and reviewing the patch.

This change breaks all platforms that use gcc. If it’s not reverted in the next 
3 hours, I’ll revert it.

Please fix ASAP if possible: 
https://ci.freebsd.org/job/FreeBSD-head-riscv64-build/3668/console .

Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r323123 - in head/usr.bin/tail: . tests

2017-09-01 Thread Ngie Cooper

> On Sep 1, 2017, at 15:37, Conrad Meyer  wrote:
> 
> Author: cem
> Date: Fri Sep  1 22:37:49 2017
> New Revision: 323123
> URL: https://svnweb.freebsd.org/changeset/base/323123
> 
> Log:
>  tail(1): Do not print bogus errno string
> 
>  In the case where write(2) does not return -1, it does not initialize errno.
>  This can happen when a broken pipe causes a short write.
> 
>  I attempted to adapt the submitted test case to ATF but could not figure out
>  how to make the test run in the ATF environment.  So the aborted test is
>  left disabled, in case someone would like to run it manually or fix it.
> 
>  PR:221976
>  Submitted by: (earlier version)
>  Sponsored by:Dell EMC Isilon
> 
> Modified:
>  head/usr.bin/tail/extern.h
>  head/usr.bin/tail/tests/tail_test.sh
> 
> Modified: head/usr.bin/tail/extern.h
> ==
> --- head/usr.bin/tail/extern.hFri Sep  1 22:04:45 2017(r323122)
> +++ head/usr.bin/tail/extern.hFri Sep  1 22:37:49 2017(r323123)
> @@ -32,9 +32,15 @@
>  */
> 
> #defineWR(p, size) do { \
> -if (write(STDOUT_FILENO, p, size) != (ssize_t)size) \
> -oerr(); \
> -} while(0)
> +ssize_t res; \
> +res = write(STDOUT_FILENO, p, size); \
> +if (res != (ssize_t)size) { \
> +if (res == -1) \
> +oerr(); \
> +else \
> +errx(1, "stdout"); \
> +} \
> +} while (0)
> 
> #define TAILMAPLEN (4<<20)
> 
> 
> Modified: head/usr.bin/tail/tests/tail_test.sh
> ==
> --- head/usr.bin/tail/tests/tail_test.shFri Sep  1 22:04:45 2017
> (r323122)
> +++ head/usr.bin/tail/tests/tail_test.shFri Sep  1 22:37:49 2017
> (r323123)
> @@ -215,7 +215,20 @@ longfile_rn2500_body()
>atf_check cmp expectfile outpipe
> }
> 
> +atf_test_case broken_pipe
> +broken_pipe_head()
> +{
> +atf_set "descr" "Do not print bogus errno based output on short writes"
> +}
> +broken_pipe_body()
> +{
> +atf_expect_fail "Can't seem to get testcase to work in test environment. 
>  Reproduces easily in interactive shell."
> 
> +seq -f '%128g' 1 1000 > ints
> +atf_check -s exit:1 -o ignore -e "inline:tail: stdout" tail -n 856 ints 
> | awk '{ exit }'

Use need to use -x to run the command through the shell, e.g.

atf_check ... -x 'tail 856 ints| awk "{exit}"'

What the original pattern does is pipes atf_check to awk--which probably isn't 
what you want.

Seems like it could be written to not use a temporary file too.. I'll have to 
think about this.

-Ngie
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322953 - head/share/mk

2017-08-27 Thread Ngie Cooper
Author: ngie
Date: Sun Aug 27 17:08:08 2017
New Revision: 322953
URL: https://svnweb.freebsd.org/changeset/base/322953

Log:
  Revert change (r322952) that was not yet destined for ^/head
  
  This unbreaks the build.
  
  This happened because of a botched "svn switch".
  
  Reported by:  cem

Modified:
  head/share/mk/bsd.lib.mk

Modified: head/share/mk/bsd.lib.mk
==
--- head/share/mk/bsd.lib.mkSun Aug 27 16:46:51 2017(r322952)
+++ head/share/mk/bsd.lib.mkSun Aug 27 17:08:08 2017(r322953)
@@ -76,13 +76,6 @@ CTFFLAGS+= -g
 
 .include 
 
-.if ${MK_COVERAGE} != "no" && (!empty(CFLAGS:M-g*) || !empty(CXXFLAGS:M-g*))
-_COV_FLAG= --coverage
-CFLAGS+= ${_COV_FLAG}
-CXXFLAGS+= ${_COV_FLAG}
-.error "foo"
-.endif
-
 # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
 # .pico used for PIC object files
 .SUFFIXES: .out .o .bc .ll .po .pico .S .asm .s .c .cc .cpp .cxx .C .f .y .l 
.ln
@@ -102,14 +95,14 @@ PO_FLAG=-pg
${CTFCONVERT_CMD}
 
 .c.pico:
-   ${CC} ${PICFLAG} -DPIC ${PO_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o 
${.TARGET}
+   ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o 
${.TARGET}
${CTFCONVERT_CMD}
 
 .cc.po .C.po .cpp.po .cxx.po:
${CXX} ${PO_FLAG} ${STATIC_CXXFLAGS} ${PO_CXXFLAGS} -c ${.IMPSRC} -o 
${.TARGET}
 
 .cc.pico .C.pico .cpp.pico .cxx.pico:
-   ${CXX} ${PICFLAG} -DPIC ${PO_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o 
${.TARGET}
+   ${CXX} ${PICFLAG} -DPIC ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o 
${.TARGET}
 
 .f.po:
${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
@@ -149,12 +142,6 @@ _SHLIBDIR:=${SHLIBDIR}
 .if defined(SHLIB_NAME)
 .if ${MK_DEBUG_FILES} != "no"
 SHLIB_NAME_FULL=${SHLIB_NAME}.full
-.if ${MK_COVERAGE} != "no"
-COVERAGEFILEDIR=${COVERAGEDIR}${_SHLIBDIR}
-.if !exists(${DESTDIR}${COVERAGEFILEDIR})
-COVERAGEMKDIR=
-.endif
-.endif
 # Use ${DEBUGDIR} for base system debug files, else .debug subdirectory
 .if ${_SHLIBDIR} == "/boot" ||\
 ${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" ||\
@@ -234,9 +221,6 @@ CLEANFILES+=${SOBJS}
 .if defined(SHLIB_NAME)
 _LIBS+=${SHLIB_NAME}
 
-.if !empty(_COV_FLAG)
-SOLINKOPTS+=   ${_COV_FLAG}
-.endif
 SOLINKOPTS+=   -shared -Wl,-x
 .if defined(LD_FATAL_WARNINGS) && ${LD_FATAL_WARNINGS} == "no"
 SOLINKOPTS+=   -Wl,--no-fatal-warnings
@@ -376,14 +360,6 @@ _libinstall:
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}/
 .if ${MK_DEBUG_FILES} != "no"
-.if ${MK_COVERAGE} != "no"
-.if defined(COVERAGEMKDIR)
-   ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},coverage} -d 
${DESTDIR}${COVERAGEFILEDIR}/
-.endif
-   ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},coverage} -o ${LIBOWN} -g ${LIBGRP} 
-m ${LIBMODE} \
-   ${_INSTALLFLAGS} \
-   ${SHLIB_NAME}.full ${DESTDIR}${COVERAGEFILEDIR}/${SHLIB_NAME}
-.endif
 .if defined(DEBUGMKDIR)
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -d ${DESTDIR}${DEBUGFILEDIR}/
 .endif
@@ -435,11 +411,6 @@ _libinstall:
 
 .if !defined(LIBRARIES_ONLY)
 .include 
-.if defined(_COV_FLAG)
-COV_OBJS=  ${OBJS}
-COV_SRCS=  ${SRCS:M*.[c|cc|cpp|cxx|C]}
-.include 
-.endif
 .include 
 .include 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r322952 - head/share/mk

2017-08-27 Thread Ngie Cooper (yaneurabeya)

> On Aug 27, 2017, at 09:57, Conrad Meyer  wrote:
> 
> This appears to be breaking the build:
> 
> --
 stage 1.1: legacy release compatibility shims
> --
> ===> tools/build (obj,includes,all,install)
> make[5]: "/home/cem/head.svn/share/mk/bsd.lib.mk" line 79: Malformed
> conditional (${MK_COVERAGE} != "no" && (!empty(CFLAGS:M-g*) ||
> !empty(CXXFLAGS:M-g*)))
> make[5]: Fatal errors encountered -- cannot continue
> make[5]: stopped in /home/cem/head.svn/tools/build

The svn switch didn’t complete successfully — great. I’ll fix this shortly.
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r322952 - head/share/mk

2017-08-27 Thread Ngie Cooper
Author: ngie
Date: Sun Aug 27 16:46:51 2017
New Revision: 322952
URL: https://svnweb.freebsd.org/changeset/base/322952

Log:
  Try and rebase the bsd.lib.mk changes after ^/head@r322824 was merged in
  
  Unfortunately the snippet's now broken -- need to get the matching 
expressions to
  work properly.

Modified:
  head/share/mk/bsd.lib.mk

Modified: head/share/mk/bsd.lib.mk
==
--- head/share/mk/bsd.lib.mkSun Aug 27 16:15:37 2017(r322951)
+++ head/share/mk/bsd.lib.mkSun Aug 27 16:46:51 2017(r322952)
@@ -76,6 +76,13 @@ CTFFLAGS+= -g
 
 .include 
 
+.if ${MK_COVERAGE} != "no" && (!empty(CFLAGS:M-g*) || !empty(CXXFLAGS:M-g*))
+_COV_FLAG= --coverage
+CFLAGS+= ${_COV_FLAG}
+CXXFLAGS+= ${_COV_FLAG}
+.error "foo"
+.endif
+
 # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
 # .pico used for PIC object files
 .SUFFIXES: .out .o .bc .ll .po .pico .S .asm .s .c .cc .cpp .cxx .C .f .y .l 
.ln
@@ -95,14 +102,14 @@ PO_FLAG=-pg
${CTFCONVERT_CMD}
 
 .c.pico:
-   ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o 
${.TARGET}
+   ${CC} ${PICFLAG} -DPIC ${PO_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o 
${.TARGET}
${CTFCONVERT_CMD}
 
 .cc.po .C.po .cpp.po .cxx.po:
${CXX} ${PO_FLAG} ${STATIC_CXXFLAGS} ${PO_CXXFLAGS} -c ${.IMPSRC} -o 
${.TARGET}
 
 .cc.pico .C.pico .cpp.pico .cxx.pico:
-   ${CXX} ${PICFLAG} -DPIC ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o 
${.TARGET}
+   ${CXX} ${PICFLAG} -DPIC ${PO_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o 
${.TARGET}
 
 .f.po:
${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
@@ -142,6 +149,12 @@ _SHLIBDIR:=${SHLIBDIR}
 .if defined(SHLIB_NAME)
 .if ${MK_DEBUG_FILES} != "no"
 SHLIB_NAME_FULL=${SHLIB_NAME}.full
+.if ${MK_COVERAGE} != "no"
+COVERAGEFILEDIR=${COVERAGEDIR}${_SHLIBDIR}
+.if !exists(${DESTDIR}${COVERAGEFILEDIR})
+COVERAGEMKDIR=
+.endif
+.endif
 # Use ${DEBUGDIR} for base system debug files, else .debug subdirectory
 .if ${_SHLIBDIR} == "/boot" ||\
 ${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" ||\
@@ -221,6 +234,9 @@ CLEANFILES+=${SOBJS}
 .if defined(SHLIB_NAME)
 _LIBS+=${SHLIB_NAME}
 
+.if !empty(_COV_FLAG)
+SOLINKOPTS+=   ${_COV_FLAG}
+.endif
 SOLINKOPTS+=   -shared -Wl,-x
 .if defined(LD_FATAL_WARNINGS) && ${LD_FATAL_WARNINGS} == "no"
 SOLINKOPTS+=   -Wl,--no-fatal-warnings
@@ -360,6 +376,14 @@ _libinstall:
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}/
 .if ${MK_DEBUG_FILES} != "no"
+.if ${MK_COVERAGE} != "no"
+.if defined(COVERAGEMKDIR)
+   ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},coverage} -d 
${DESTDIR}${COVERAGEFILEDIR}/
+.endif
+   ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},coverage} -o ${LIBOWN} -g ${LIBGRP} 
-m ${LIBMODE} \
+   ${_INSTALLFLAGS} \
+   ${SHLIB_NAME}.full ${DESTDIR}${COVERAGEFILEDIR}/${SHLIB_NAME}
+.endif
 .if defined(DEBUGMKDIR)
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},debug} -d ${DESTDIR}${DEBUGFILEDIR}/
 .endif
@@ -411,6 +435,11 @@ _libinstall:
 
 .if !defined(LIBRARIES_ONLY)
 .include 
+.if defined(_COV_FLAG)
+COV_OBJS=  ${OBJS}
+COV_SRCS=  ${SRCS:M*.[c|cc|cpp|cxx|C]}
+.include 
+.endif
 .include 
 .include 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322951 - head

2017-08-27 Thread Ngie Cooper
Author: ngie
Date: Sun Aug 27 16:15:37 2017
New Revision: 322951
URL: https://svnweb.freebsd.org/changeset/base/322951

Log:
  Respect MK_TCSH with build-tools and native-xtools
  
  This helps reduce the WORLDTMP footprint slightly.
  
  Based on a patch I submitted 5 years ago to GNATS.
  
  PR:   174051
  MFC after:2 weeks
  Relnotes: yes (anyone who cross-builds with MK_TCSH=yes will run into
 build failures if the host doesn't have tcsh(1))
  Reminded by:  Fabian Keil 

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Sun Aug 27 13:02:51 2017(r322950)
+++ head/Makefile.inc1  Sun Aug 27 16:15:37 2017(r322951)
@@ -1984,8 +1984,12 @@ _gcc_tools= gnu/usr.bin/cc/cc_tools
 _rescue=rescue/rescue
 .endif
 
+.if ${MK_TCSH} != "no"
+_tcsh=bin/csh
+.endif
+
 .for _tool in \
-bin/csh \
+${_tcsh} \
 bin/sh \
 ${LOCAL_TOOL_DIRS} \
 lib/ncurses/ncurses \
@@ -2143,7 +2147,7 @@ native-xtools: .PHONY
 bin/cat \
 bin/chmod \
 bin/cp \
-bin/csh \
+${_tcsh} \
 bin/echo \
 bin/expr \
 bin/hostname \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322921 - head/lib/msun/tests

2017-08-25 Thread Ngie Cooper
Author: ngie
Date: Sat Aug 26 06:44:50 2017
New Revision: 322921
URL: https://svnweb.freebsd.org/changeset/base/322921

Log:
  Revert r321457
  
  It doesn't fail after ^/head@r322855 (the releng_50 clang merge).
  
  PR:   220989
  MFC after:2 months
  MFC with: r321369, r322855

Modified:
  head/lib/msun/tests/trig_test.c

Modified: head/lib/msun/tests/trig_test.c
==
--- head/lib/msun/tests/trig_test.c Sat Aug 26 03:21:12 2017
(r322920)
+++ head/lib/msun/tests/trig_test.c Sat Aug 26 06:44:50 2017
(r322921)
@@ -158,11 +158,6 @@ ATF_TC_BODY(reduction, tc)
};
 #endif
 
-#if defined(__clang__) && \
-   ((__clang_major__ >= 5))
-   atf_tc_expect_fail("test fails with clang 5.0+ - bug 220989");
-#endif
-
unsigned i;
 
for (i = 0; i < nitems(f_pi_odd); i++) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r322770 - head/usr.sbin/chown/tests

2017-08-21 Thread Ngie Cooper (yaneurabeya)

> On Aug 21, 2017, at 13:23, Glen Barber  wrote:
> 
> Author: gjb
> Date: Mon Aug 21 20:23:05 2017
> New Revision: 322770
> URL: https://svnweb.freebsd.org/changeset/base/322770
> 
> Log:
>  Apply changes from bin/chmod/tests/chmod_test.sh (r321949, r321950,
>  and r322101), adding atf_expect_fail() before chflags(8) is invoked
>  if the filesystem is ZFS, which does not support UF_IMMUTABLE.
> 
>  MFC after:   3 days
>  Sponsored by:The FreeBSD Foundation

Ah, thanks :)!
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r322678 - in head/usr.sbin/pw: . tests

2017-08-18 Thread Ngie Cooper (yaneurabeya)

> On Aug 18, 2017, at 17:32, Ed Maste  wrote:
> 
> Author: emaste
> Date: Sat Aug 19 00:32:26 2017
> New Revision: 322678
> URL: https://svnweb.freebsd.org/changeset/base/322678
> 
> Log:
>  pw useradd: Validate the user name before creating the entry
> 
>  Previouly it was possible to create users with spaces in the name with:
>  pw useradd -u 1234 -g 1234 -n 'test user'
> 
>  The "-g 1234" is relevant, without it the name was already rejected
>  as expected:
> 
>  [fk@test ~]$ sudo pw useradd -u 1234 -n 'test user'
>  pw: invalid character ` ' at position 4 in userid/group name
> 
>  Bug unintentionally found with a salt config without explicit name entry:
> 
>  test user:
>user.present:
>  - uid: 1234
>  - gid: 1234
>  - fullname: Test user
>  - shell: /usr/local/bin/bash
>  - home: /home/test
>  - groups:
>- wheel
>- salt
> 
>  "Luckily" salt modules rarely bother with input validation either ...
> 
>  PR:  221416
>  Submitted by:Fabian Keil
>  Obtained from:   ElectroBSD
>  MFC after:   1 week
> 
> Modified:
>  head/usr.sbin/pw/pw_user.c
>  head/usr.sbin/pw/tests/pw_useradd_test.sh

Usernames with passwords are permitted in some cases, e.g., AD.
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r322649 - head/usr.bin/calendar/calendars

2017-08-18 Thread Ngie Cooper
Author: ngie
Date: Fri Aug 18 07:34:34 2017
New Revision: 322649
URL: https://svnweb.freebsd.org/changeset/base/322649

Log:
  Clarify the fact that Andrey (ache) passed away in Moscow
  
  Take care friend <3.

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==
--- head/usr.bin/calendar/calendars/calendar.freebsdFri Aug 18 07:27:15 
2017(r322648)
+++ head/usr.bin/calendar/calendars/calendar.freebsdFri Aug 18 07:34:34 
2017(r322649)
@@ -300,7 +300,7 @@
 08/12  Joe Marcus Clarke  born in Lakeland, Florida, 
United States, 1976
 08/12  Max Brazhnikov  born in Leningradskaya, Russian 
Federation, 1979
 08/14  Stefan Esser  born in Cologne, Nordrhein-Westfalen, 
Germany, 1961
-08/16  Andrey Chernov  died, 2017
+08/16  Andrey Chernov  died in Moscow, Russian Federation, 
2017
 08/17  Olivier Houchard  born in Nancy, France, 1980
 08/19  Chin-San Huang  born in Yi-Lan, Taiwan, Republic 
of China, 1979
 08/19  Pav Lucistnik  born in Kutna Hora, Czech Republic, 
1980
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322636 - head/usr.sbin/bootparamd/bootparamd

2017-08-17 Thread Ngie Cooper
Author: ngie
Date: Thu Aug 17 20:41:28 2017
New Revision: 322636
URL: https://svnweb.freebsd.org/changeset/base/322636

Log:
  Don't leak bpf on early return when YP isn't defined (NIS support)
  
  MFC after:1 week
  Reported by:  cppcheck

Modified:
  head/usr.sbin/bootparamd/bootparamd/bootparamd.c

Modified: head/usr.sbin/bootparamd/bootparamd/bootparamd.c
==
--- head/usr.sbin/bootparamd/bootparamd/bootparamd.cThu Aug 17 20:37:01 
2017(r322635)
+++ head/usr.sbin/bootparamd/bootparamd/bootparamd.cThu Aug 17 20:41:28 
2017(r322636)
@@ -239,6 +239,8 @@ int blen;
 warnx("could not close %s", bootpfile);
   return(1);
 #else
+  if (fclose(bpf))
+warnx("could not close %s", bootpfile);
   return(0);   /* ENOTSUP */
 #endif
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322635 - head/usr.sbin/bootparamd/callbootd

2017-08-17 Thread Ngie Cooper
Author: ngie
Date: Thu Aug 17 20:37:01 2017
New Revision: 322635
URL: https://svnweb.freebsd.org/changeset/base/322635

Log:
  Fix WARNS
  
  - Remove ad hoc inet_ntoa prototype declaration; it's already handled
by the included headers.
  - De-K&Rify the function prototypes for eachres_whoami(..),
eachres_getfile(..), and main(..).
  
  MFC after:1 week
  PR:   71667
  Tested with:  clang (5.0), gcc (4.2.1, 5)

Modified:
  head/usr.sbin/bootparamd/callbootd/callbootd.c

Modified: head/usr.sbin/bootparamd/callbootd/callbootd.c
==
--- head/usr.sbin/bootparamd/callbootd/callbootd.c  Thu Aug 17 20:25:50 
2017(r322634)
+++ head/usr.sbin/bootparamd/callbootd/callbootd.c  Thu Aug 17 20:37:01 
2017(r322635)
@@ -32,15 +32,12 @@ int broadcast;
 char cln[MAX_MACHINE_NAME+1];
 char dmn[MAX_MACHINE_NAME+1];
 char path[MAX_PATH_LEN+1];
-extern char *inet_ntoa();
 static void usage(void);
 int printgetfile(bp_getfile_res *);
 int printwhoami(bp_whoami_res *);
 
-bool_t
-eachres_whoami(resultp, raddr)
-bp_whoami_res *resultp;
-struct sockaddr_in *raddr;
+static bool_t
+eachres_whoami(bp_whoami_res *resultp, struct sockaddr_in *raddr)
 {
   struct hostent *he;
 
@@ -51,10 +48,8 @@ struct sockaddr_in *raddr;
   return(0);
 }
 
-bool_t
-eachres_getfile(resultp, raddr)
-bp_getfile_res *resultp;
-struct sockaddr_in *raddr;
+static bool_t
+eachres_getfile(bp_getfile_res *resultp, struct sockaddr_in *raddr)
 {
   struct hostent *he;
 
@@ -67,9 +62,7 @@ struct sockaddr_in *raddr;
 
 
 int
-main(argc, argv)
-int argc;
-char **argv;
+main(int argc, char **argv)
 {
   char *server;
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322633 - head

2017-08-17 Thread Ngie Cooper
Author: ngie
Date: Thu Aug 17 20:15:20 2017
New Revision: 322633
URL: https://svnweb.freebsd.org/changeset/base/322633

Log:
  Honor NO_RTLD for rtld-elf, similar to what's done in libexec/Makefile, with
  libexec/rtld-elf/... for MK_{LIB32,LIBSOFT}.
  
  MFC after:1 week

Modified:
  head/Makefile.libcompat

Modified: head/Makefile.libcompat
==
--- head/Makefile.libcompat Thu Aug 17 20:10:30 2017(r322632)
+++ head/Makefile.libcompat Thu Aug 17 20:15:20 2017(r322633)
@@ -179,7 +179,7 @@ build${libcompat}: .PHONY
 .endfor
${_+_}cd ${.CURDIR}; \
${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries
-.if ${libcompat} == "32"
+.if ${libcompat} == "32" && !defined(NO_RTLD)
 .for _t in ${_obj} all
${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 
${LIBCOMPATWMAKE} \
-DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t}
@@ -192,7 +192,7 @@ distribute${libcompat} install${libcompat}: .PHONY
 .for _dir in ${_LC_LIBDIRS.yes}
${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATIMAKE} 
${.TARGET:S/${libcompat}$//}
 .endfor
-.if ${libcompat} == "32"
+.if ${libcompat} == "32" && !defined(NO_RTLD)
${_+_}cd ${.CURDIR}/libexec/rtld-elf; \
PROG=ld-elf32.so.1 ${LIBCOMPATIMAKE} ${.TARGET:S/32$//}
${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATIMAKE} \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322515 - in head: bin/cat bin/chmod bin/date bin/dd bin/echo bin/expr bin/ln bin/ls bin/mv bin/pax bin/pkill bin/pwait bin/sh bin/sleep bin/test lib/atf/libatf-c lib/atf/libatf-c++ lib...

2017-08-14 Thread Ngie Cooper
Author: ngie
Date: Mon Aug 14 19:21:37 2017
New Revision: 322515
URL: https://svnweb.freebsd.org/changeset/base/322515

Log:
  Add supporting changes for `Add limited sandbox capability to "make check"`
  
  Non-tests/... changes:
  - Add HAS_TESTS= to Makefiles with libraries and programs to enable iteration
and propagate the appropriate environment down to *.test.mk.
  
  tests/... changes:
  - Add appropriate support Makefile.inc's to set HAS_TESTS in a minimal manner,
since tests/... is a special subdirectory tree compared to the others.
  
  MFC after:2 months
  MFC with: r322511
  Reviewed by:  arch (silence), testing (silence)
  Differential Revision:D12014

Added:
  head/tests/Makefile.inc0
 - copied unchanged from r322126, 
projects/make-check-sandbox/tests/Makefile.inc0
  head/tests/etc/Makefile.inc
 - copied unchanged from r322126, 
projects/make-check-sandbox/tests/etc/Makefile.inc
  head/tests/sys/geom/class/Makefile.inc
 - copied unchanged from r322126, 
projects/make-check-sandbox/tests/sys/geom/class/Makefile.inc
  head/tests/sys/pjdfstest/Makefile.inc
 - copied unchanged from r322126, 
projects/make-check-sandbox/tests/sys/pjdfstest/Makefile.inc
  head/tests/sys/pjdfstest/tests/Makefile.inc
 - copied unchanged from r322126, 
projects/make-check-sandbox/tests/sys/pjdfstest/tests/Makefile.inc
Modified:
  head/bin/cat/Makefile
  head/bin/chmod/Makefile
  head/bin/date/Makefile
  head/bin/dd/Makefile
  head/bin/echo/Makefile
  head/bin/expr/Makefile
  head/bin/ln/Makefile
  head/bin/ls/Makefile
  head/bin/mv/Makefile
  head/bin/pax/Makefile
  head/bin/pkill/Makefile
  head/bin/pwait/Makefile
  head/bin/sh/Makefile
  head/bin/sleep/Makefile
  head/bin/test/Makefile
  head/lib/atf/libatf-c++/Makefile
  head/lib/atf/libatf-c/Makefile
  head/lib/libarchive/Makefile
  head/lib/libc/Makefile
  head/lib/libcam/Makefile
  head/lib/libcasper/services/cap_dns/Makefile
  head/lib/libcasper/services/cap_grp/Makefile
  head/lib/libcasper/services/cap_pwd/Makefile
  head/lib/libcasper/services/cap_sysctl/Makefile
  head/lib/libcrypt/Makefile
  head/lib/libkvm/Makefile
  head/lib/libmp/Makefile
  head/lib/libnv/Makefile
  head/lib/libpathconv/Makefile
  head/lib/libproc/Makefile
  head/lib/librt/Makefile
  head/lib/libsbuf/Makefile
  head/lib/libthr/Makefile
  head/lib/libutil/Makefile
  head/lib/libxo/Makefile
  head/lib/msun/Makefile
  head/libexec/atf/atf-check/Makefile
  head/libexec/atf/atf-sh/Makefile
  head/libexec/rtld-elf/Makefile
  head/sbin/devd/Makefile
  head/sbin/dhclient/Makefile
  head/sbin/growfs/Makefile
  head/sbin/ifconfig/Makefile
  head/sbin/mdconfig/Makefile
  head/sbin/pfctl/Makefile
  head/share/examples/Makefile
  head/share/zoneinfo/Makefile
  head/tests/Makefile
  head/tests/sys/Makefile.inc
  head/usr.bin/apply/Makefile
  head/usr.bin/basename/Makefile
  head/usr.bin/bsdcat/Makefile
  head/usr.bin/calendar/Makefile
  head/usr.bin/cmp/Makefile
  head/usr.bin/col/Makefile
  head/usr.bin/comm/Makefile
  head/usr.bin/compress/Makefile
  head/usr.bin/cpio/Makefile
  head/usr.bin/csplit/Makefile
  head/usr.bin/cut/Makefile
  head/usr.bin/diff/Makefile
  head/usr.bin/diff3/Makefile
  head/usr.bin/dirname/Makefile
  head/usr.bin/du/Makefile
  head/usr.bin/file2c/Makefile
  head/usr.bin/getconf/Makefile
  head/usr.bin/grep/Makefile
  head/usr.bin/gzip/Makefile
  head/usr.bin/hexdump/Makefile
  head/usr.bin/ident/Makefile
  head/usr.bin/indent/Makefile
  head/usr.bin/join/Makefile
  head/usr.bin/jot/Makefile
  head/usr.bin/lastcomm/Makefile
  head/usr.bin/limits/Makefile
  head/usr.bin/m4/Makefile
  head/usr.bin/mkimg/Makefile
  head/usr.bin/ncal/Makefile
  head/usr.bin/pr/Makefile
  head/usr.bin/printf/Makefile
  head/usr.bin/procstat/Makefile
  head/usr.bin/sdiff/Makefile
  head/usr.bin/sed/Makefile
  head/usr.bin/soelim/Makefile
  head/usr.bin/stat/Makefile
  head/usr.bin/tail/Makefile
  head/usr.bin/tar/Makefile
  head/usr.bin/timeout/Makefile
  head/usr.bin/tr/Makefile
  head/usr.bin/truncate/Makefile
  head/usr.bin/uniq/Makefile
  head/usr.bin/units/Makefile
  head/usr.bin/uudecode/Makefile
  head/usr.bin/uuencode/Makefile
  head/usr.bin/xargs/Makefile
  head/usr.bin/xinstall/Makefile
  head/usr.bin/xo/Makefile
  head/usr.bin/yacc/Makefile
  head/usr.sbin/chown/Makefile
  head/usr.sbin/etcupdate/Makefile
  head/usr.sbin/extattr/Makefile
  head/usr.sbin/fstyp/Makefile
  head/usr.sbin/makefs/Makefile
  head/usr.sbin/newsyslog/Makefile
  head/usr.sbin/nmtree/Makefile
  head/usr.sbin/pw/Makefile
  head/usr.sbin/rpcbind/Makefile
  head/usr.sbin/sa/Makefile

Modified: head/bin/cat/Makefile
==
--- head/bin/cat/Makefile   Mon Aug 14 19:18:50 2017(r322514)
+++ head/bin/cat/Makefile   Mon Aug 14 19:21:37 2017(r322515)
@@ -6,6 +6,7 @@
 PACKAGE=runtime
 PROG=  cat
 
+HAS_TESTS=
 SUBDIR.${MK_TESTS}+= tests
 
 .include 

Modified: head/bin/chmod/Makefile
=

svn commit: r322514 - head

2017-08-14 Thread Ngie Cooper
Author: ngie
Date: Mon Aug 14 19:18:50 2017
New Revision: 322514
URL: https://svnweb.freebsd.org/changeset/base/322514

Log:
  Add an UPDATING entry for r322511.
  
  MFC after:2 months

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Mon Aug 14 19:12:51 2017(r322513)
+++ head/UPDATING   Mon Aug 14 19:18:50 2017(r322514)
@@ -51,6 +51,27 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 
 ** SPECIAL WARNING: **
 
+20170814:
+   "make check" behavior (made in ^/head@r295380) has been changed to
+   execute from a limited sandbox, as opposed to executing from
+   ${TESTSDIR}.
+
+   Behavioral changes:
+   - The "beforecheck" and "aftercheck" targets are now specified.
+   - ${CHECKDIR} (added in commit noted above) has been removed.
+   - Legacy behavior can be enabled by setting
+ WITHOUT_MAKE_CHECK_USE_SANDBOX in src.conf(5) or the environment.
+
+   If the limited sandbox mode is enabled, "make check" will execute
+   "make distribution", then install, execute the tests, and clean up the
+   sandbox if successful.
+
+   The "make distribution" and "make install" targets are typically run as
+   root to set appropriate permissions and ownership at installation time.
+   The end-user should set "WITH_INSTALL_AS_USER" in src.conf(5) or the
+   environment if executing "make check" with limited sandbox mode using
+   an unprivileged user.
+
 20170808:
Since the switch to GPT disk labels, fsck for UFS/FFS has been
unable to automatically find alternate superblocks. As of r322297,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322512 - head/share/man/man5

2017-08-14 Thread Ngie Cooper
Author: ngie
Date: Mon Aug 14 19:03:55 2017
New Revision: 322512
URL: https://svnweb.freebsd.org/changeset/base/322512

Log:
  Regenerate src.conf(5) after change made in r322511 to "make check" behavior

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Mon Aug 14 19:03:05 2017
(r322511)
+++ head/share/man/man5/src.conf.5  Mon Aug 14 19:03:55 2017
(r322512)
@@ -1043,6 +1043,16 @@ MTA selector.
 Set to not install
 .Xr make 1
 and related support files.
+.It Va WITHOUT_MAKE_CHECK_USE_SANDBOX
+Set to not execute
+.Dq Li "make check"
+in limited sandbox mode.
+This option should be paired with
+.Va WITH_INSTALL_AS_USER
+if executed as an unprivileged user.
+See
+.Xr tests 7
+for more details.
 .It Va WITHOUT_MAN
 Set to not build manual pages.
 When set, these options are also in effect:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322511 - in head: share/mk tools/build/options

2017-08-14 Thread Ngie Cooper
Author: ngie
Date: Mon Aug 14 19:03:05 2017
New Revision: 322511
URL: https://svnweb.freebsd.org/changeset/base/322511

Log:
  Add limited sandbox capability to "make check"
  
  == Rationale ==
  
  r295380 introduced "make check" and consolidated means for running
  test code in an attempt to simplify running tests. One could either
  install files/libraries/programs and run "make check", or run "make check"
  with an explicit CHECKDIR, e.g., `make check CHECKDIR=$(make -V.OBJDIR)``.
  
  One criticism that was received is that "make check" should be run with
  the intent of making dev->test->commit easier, which means that the target
  audience's workflow should be developers. One developer pattern available
  in other opensource projects is to run test code from a developer sandbox,
  instead of installing to a system.
  
  == Method ==
  
  This approach is slightly different from the standard approach, in the sense
  that it builds and installs into a deterministic directory under .OBJDIR (as 
I call it,
  the "sandbox"), then runs "make check" against that. In the event the test
  run is successful, the deterministic directory is removed to save space.
  
  == Approach ==
  
  bsd.lib.mk, bsd.prog.mk:
  
  To support this functionality, a new variable `HAS_TESTS` is being added.
  
  HAS_TESTS enables appropriate behavior with bsd.lib.mk and bsd.prog.mk, as
  follows:
  - Add "make check" as an available target from the directory.
  - Pass down appropriate variables via ${TESTS_ENV}, i.e.,
${TESTS_LD_LIBRARY_PATH} and ${TESTS_PATH}.
  
  One should add "HAS_TESTS" to directories containing tests in them, e.g. from
  bin/sh/Makefile,
  
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
  
  HAS_TESTS doesn't automatically add the tests subdirectory for flexibility
  reasons.
  
  bsd.opts.mk, src.opts.mk:
  - The knob ${MK_MAKE_CHECK_USE_SANDBOX} has been added, both to explicitly
direct (internally) when to set a deterministic ${DESTDIR} and to also allow
users to disable this behavior globally, i.e., via src.conf.
  - MK_TESTS has been promoted from src.opts.mk to bsd.opts.mk to leverage
syntactic sugar for having MK_TESTS be a dependency for
MK_MAKE_CHECK_USE_SANDBOX, but to also ensure that src.opts.mk isn't 
required
to use suite.test.mk (which is a dependency of bsd.test.mk).
  
  suite.test.mk:
  - beforecheck behavior (when MK_MAKE_CHECK_USE_SANDBOX is enabled) is modified
from a no-op to:
  -- Build.
  -- Run "make hierarchy" on the sandbox dir.
  -- Install the tests/files to the sandbox dir.
  - aftercheck behavior (when MK_MAKE_CHECK_USE_SANDBOX is enabled) is modified
from a no-op to:
  -- Remove the sandbox dir.
  
  Again, because the dependency order set in bsd.test.mk is
  beforecheck -> check -> aftercheck, "make check" will not be run unless
  "beforecheck" completes successfully, and "aftercheck" will not be run unless
  "beforecheck" and "check" complete successfully.
  
  == Caveats ==
  
  - This target must either be run with MK_INSTALL_AS_USER or as root. Otherwise
it will fail when running "make install" as the default user/group for many
makefiles when calling INSTALL is root/wheel.
  - This target must be run from a suitable top-level directory. For example,
running tests from `tests/sys/fs/tmpfs` won't work, but `tests/sys/fs` will,
because `tests/sys/fs/tmpfs` relies on files installed by `tests/sys/fs`.
  - Running MK_INSTALL_AS_USER may introduce determinism issues. However, using
it could identify deficiences in tests in terms of needing to be run as
root, which are not properly articulated in the test requirements.
  - The doesn't negate the need for running "make installworld" and
"make checkworld", etc. Again, this just is intended to simplify the
dev->test->commit workflow.
  
  == Cleanup done ==
  - CHECKDIR is removed; one can use "MK_MAKE_CHECK_USE_SANDBOX=no" to enable
"legacy" (r295380) behavior.
  
  MFC after:2 months
  Relnotes: yes (CHECKDIR removed; "make check" behavior changed)
  Requested by: jhb
  Reviewed by:  arch (silence), testing (silence)
  Differential Revision:D11905

Added:
  head/tools/build/options/WITHOUT_MAKE_CHECK_USE_SANDBOX
 - copied, changed from r322452, head/tools/build/options/WITHOUT_TESTS
Modified:
  head/share/mk/bsd.README
  head/share/mk/bsd.lib.mk
  head/share/mk/bsd.opts.mk
  head/share/mk/bsd.prog.mk
  head/share/mk/src.opts.mk
  head/share/mk/suite.test.mk

Modified: head/share/mk/bsd.README
==
--- head/share/mk/bsd.READMEMon Aug 14 18:49:46 2017(r322510)
+++ head/share/mk/bsd.READMEMon Aug 14 19:03:05 2017(r322511)
@@ -566,7 +566,7 @@ It has seven targets:
all:
build the test programs.
check:
-   runs the test programs from CHECKDIR with kyua test.
+   runs the test programs with kyua

svn commit: r322510 - head/share/man/man5

2017-08-14 Thread Ngie Cooper
Author: ngie
Date: Mon Aug 14 18:49:46 2017
New Revision: 322510
URL: https://svnweb.freebsd.org/changeset/base/322510

Log:
  Regenerate src.conf(5) per LLDB default change made in r322415

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Mon Aug 14 15:08:49 2017
(r322509)
+++ head/share/man/man5/src.conf.5  Mon Aug 14 18:49:46 2017
(r322510)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd August 2, 2017
+.Dd August 14, 2017
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -967,12 +967,12 @@ amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarc
 Set to not build the LLDB debugger.
 .Pp
 This is a default setting on
-arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, 
mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, 
powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64.
+arm/arm, arm/armeb, arm/armv6, mips/mipsel, mips/mips, mips/mips64el, 
mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, 
mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, 
riscv/riscv64, riscv/riscv64sf and sparc64/sparc64.
 .It Va WITH_LLDB
 Set to build the LLDB debugger.
 .Pp
 This is a default setting on
-amd64/amd64 and arm64/aarch64.
+amd64/amd64, arm64/aarch64 and i386/i386.
 .It Va WITHOUT_LLD_BOOTSTRAP
 Set to not build the LLD linker during the bootstrap phase of
 the build.
@@ -1254,13 +1254,13 @@ Set to not build profiled libraries for use with
 .Xr gprof 8 .
 .Pp
 This is a default setting on
-riscv/riscv64 and riscv/riscv64sf.
+mips/mips64el, mips/mips64, mips/mips64elhf, mips/mips64hf, riscv/riscv64 and 
riscv/riscv64sf.
 .It Va WITH_PROFILE
 Set to build profiled libraries for use with
 .Xr gprof 8 .
 .Pp
 This is a default setting on
-amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, 
mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64.
+amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, 
mips/mipsel, mips/mips, mips/mipsn32, mips/mipselhf, mips/mipshf, 
powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64.
 .It Va WITHOUT_QUOTAS
 Set to not build
 .Xr quota 1
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322451 - in head/lib/libcasper: services/tests tests

2017-08-12 Thread Ngie Cooper
Author: ngie
Date: Sun Aug 13 01:08:37 2017
New Revision: 322451
URL: https://svnweb.freebsd.org/changeset/base/322451

Log:
  TESTSDIR isn't required; remove it
  
  MFC after:1 week
  MFC with: r322450

Modified:
  head/lib/libcasper/services/tests/Makefile
  head/lib/libcasper/tests/Makefile

Modified: head/lib/libcasper/services/tests/Makefile
==
--- head/lib/libcasper/services/tests/Makefile  Sun Aug 13 01:04:44 2017
(r322450)
+++ head/lib/libcasper/services/tests/Makefile  Sun Aug 13 01:08:37 2017
(r322451)
@@ -1,7 +1,5 @@
 # $FreeBSD$
 
-TESTSDIR=  ${TESTSBASE}/lib/libcasper/services
-
 .PATH: ${SRCTOP}/tests
 KYUAFILE=  yes
 

Modified: head/lib/libcasper/tests/Makefile
==
--- head/lib/libcasper/tests/Makefile   Sun Aug 13 01:04:44 2017
(r322450)
+++ head/lib/libcasper/tests/Makefile   Sun Aug 13 01:08:37 2017
(r322451)
@@ -1,7 +1,5 @@
 # $FreeBSD$
 
-TESTSDIR=  ${TESTSBASE}/lib/libcasper
-
 .PATH: ${SRCTOP}/tests
 KYUAFILE=  yes
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322450 - in head/lib/libcasper: . services services/tests tests

2017-08-12 Thread Ngie Cooper
Author: ngie
Date: Sun Aug 13 01:04:44 2017
New Revision: 322450
URL: https://svnweb.freebsd.org/changeset/base/322450

Log:
  Integrate the tests moved in r305626 in to the FreeBSD test suite
  
  The reachover Kyuafiles were never added, and thus the tests were installed
  as standalone tests, and not integrated into the full suite.
  
  MFC after:1 week
  MFC with: r305626, 305629, r307863, r322447, r322448, r322449

Added:
  head/lib/libcasper/services/tests/
  head/lib/libcasper/services/tests/Makefile
 - copied, changed from r322439, head/tests/etc/Makefile
  head/lib/libcasper/tests/
  head/lib/libcasper/tests/Makefile
 - copied, changed from r322439, head/tests/etc/Makefile
Modified:
  head/lib/libcasper/Makefile
  head/lib/libcasper/services/Makefile

Modified: head/lib/libcasper/Makefile
==
--- head/lib/libcasper/Makefile Sun Aug 13 00:56:43 2017(r322449)
+++ head/lib/libcasper/Makefile Sun Aug 13 01:04:44 2017(r322450)
@@ -3,6 +3,8 @@
 SUBDIR=libcasper
 SUBDIR+=   services
 
+SUBDIR.${MK_TESTS}+=   tests
+
 SUBDIR_PARALLEL=
 
 .include 

Modified: head/lib/libcasper/services/Makefile
==
--- head/lib/libcasper/services/MakefileSun Aug 13 00:56:43 2017
(r322449)
+++ head/lib/libcasper/services/MakefileSun Aug 13 01:04:44 2017
(r322450)
@@ -6,6 +6,8 @@ SUBDIR+=cap_pwd
 SUBDIR+=   cap_random
 SUBDIR+=   cap_sysctl
 
+SUBDIR.${MK_TESTS}+=   tests
+
 SUBDIR_PARALLEL=
 
 .include 

Copied and modified: head/lib/libcasper/services/tests/Makefile (from r322439, 
head/tests/etc/Makefile)
==
--- head/tests/etc/Makefile Sat Aug 12 21:20:51 2017(r322439, copy 
source)
+++ head/lib/libcasper/services/tests/Makefile  Sun Aug 13 01:04:44 2017
(r322450)
@@ -1,12 +1,8 @@
 # $FreeBSD$
 
-.include 
+TESTSDIR=  ${TESTSBASE}/lib/libcasper/services
 
-TESTSDIR=  ${TESTSBASE}/etc
-
 .PATH: ${SRCTOP}/tests
 KYUAFILE=  yes
-
-SUBDIR+=   rc.d
 
 .include 

Copied and modified: head/lib/libcasper/tests/Makefile (from r322439, 
head/tests/etc/Makefile)
==
--- head/tests/etc/Makefile Sat Aug 12 21:20:51 2017(r322439, copy 
source)
+++ head/lib/libcasper/tests/Makefile   Sun Aug 13 01:04:44 2017
(r322450)
@@ -1,12 +1,8 @@
 # $FreeBSD$
 
-.include 
+TESTSDIR=  ${TESTSBASE}/lib/libcasper
 
-TESTSDIR=  ${TESTSBASE}/etc
-
 .PATH: ${SRCTOP}/tests
 KYUAFILE=  yes
-
-SUBDIR+=   rc.d
 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322449 - head/lib/libcasper/services/cap_dns/tests

2017-08-12 Thread Ngie Cooper
Author: ngie
Date: Sun Aug 13 00:56:43 2017
New Revision: 322449
URL: https://svnweb.freebsd.org/changeset/base/322449

Log:
  Use hardcoded IPv4/IPv6 addresses for google-public-dns-a.google.com instead
  of freefall.freebsd.org to unbreak the DNS tests
  
  The address allocations for freefall.freebsd.org have changed in the past 4 
years.
  Use a more stable set of hardcoded addresses for now to make the tests succeed
  reliably.
  
  The hostname should be resolved dynamically instead of hardcoding the 
addresses in
  the future. This is just a bandaid.
  
  MFC after:1 week

Modified:
  head/lib/libcasper/services/cap_dns/tests/dns_test.c

Modified: head/lib/libcasper/services/cap_dns/tests/dns_test.c
==
--- head/lib/libcasper/services/cap_dns/tests/dns_test.cSun Aug 13 
00:14:08 2017(r322448)
+++ head/lib/libcasper/services/cap_dns/tests/dns_test.cSun Aug 13 
00:56:43 2017(r322449)
@@ -297,32 +297,26 @@ runtest(cap_channel_t *capdns)
freeaddrinfo(aic);
}
 
-   /*
-* 8.8.178.135 is IPv4 address of freefall.freebsd.org
-* as of 27 October 2013.
-*/
-   inet_pton(AF_INET, "8.8.178.135", &ip4);
+   /* XXX: hardcoded addresses for "google-public-dns-a.google.com". */
+#defineGOOGLE_DNS_IPV4 "8.8.8.8"
+#defineGOOGLE_DNS_IPV6 "2001:4860:4860::"
+
+   inet_pton(AF_INET, GOOGLE_DNS_IPV4, &ip4);
hps = gethostbyaddr(&ip4, sizeof(ip4), AF_INET);
if (hps == NULL)
-   fprintf(stderr, "Unable to resolve %s.\n", "8.8.178.135");
+   fprintf(stderr, "Unable to resolve %s.\n", GOOGLE_DNS_IPV4);
hpc = cap_gethostbyaddr(capdns, &ip4, sizeof(ip4), AF_INET);
if (hostent_compare(hps, hpc))
result |= GETHOSTBYADDR_AF_INET;
 
-   /*
-* 2001:1900:2254:206c::16:87 is IPv6 address of freefall.freebsd.org
-* as of 27 October 2013.
-*/
-   inet_pton(AF_INET6, "2001:1900:2254:206c::16:87", &ip6);
+   inet_pton(AF_INET6, GOOGLE_DNS_IPV6, &ip6);
hps = gethostbyaddr(&ip6, sizeof(ip6), AF_INET6);
if (hps == NULL) {
-   fprintf(stderr, "Unable to resolve %s.\n",
-   "2001:1900:2254:206c::16:87");
+   fprintf(stderr, "Unable to resolve %s.\n", GOOGLE_DNS_IPV6);
}
hpc = cap_gethostbyaddr(capdns, &ip6, sizeof(ip6), AF_INET6);
if (hostent_compare(hps, hpc))
result |= GETHOSTBYADDR_AF_INET6;
-
return (result);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322448 - head/lib/libcasper/services/cap_sysctl/tests

2017-08-12 Thread Ngie Cooper
Author: ngie
Date: Sun Aug 13 00:14:08 2017
New Revision: 322448
URL: https://svnweb.freebsd.org/changeset/base/322448

Log:
  Make root-privileges a requirement for the test
  
  Some of the testcases try to manipulate sysctls that require root privileges,
  e.g., "kern.sync_on_panic". Make root-privileges a hard requirement so the
  tests don't raise false positives due to privilege issues when calling
  sysctlbyname(3) on writable sysctls.
  
  MFC after:1 week

Modified:
  head/lib/libcasper/services/cap_sysctl/tests/Makefile

Modified: head/lib/libcasper/services/cap_sysctl/tests/Makefile
==
--- head/lib/libcasper/services/cap_sysctl/tests/Makefile   Sun Aug 13 
00:04:50 2017(r322447)
+++ head/lib/libcasper/services/cap_sysctl/tests/Makefile   Sun Aug 13 
00:14:08 2017(r322448)
@@ -8,4 +8,6 @@ LIBADD+=nv
 
 WARNS?=3
 
+TEST_METADATA.sysctl_test+=required_user="root"
+
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322447 - in head/lib/libcasper/services: cap_dns/tests cap_grp/tests cap_pwd/tests cap_sysctl/tests

2017-08-12 Thread Ngie Cooper
Author: ngie
Date: Sun Aug 13 00:04:50 2017
New Revision: 322447
URL: https://svnweb.freebsd.org/changeset/base/322447

Log:
  Fix result printing
  
  - Flushing stdout prevents the buffer from being printed twice, fixing
issues with stdout printing out the testplan, etc, twice.
  - Don't print out raw source/line numbers; hide them behind comments.
  
  MFC after:1 week

Modified:
  head/lib/libcasper/services/cap_dns/tests/dns_test.c
  head/lib/libcasper/services/cap_grp/tests/grp_test.c
  head/lib/libcasper/services/cap_pwd/tests/pwd_test.c
  head/lib/libcasper/services/cap_sysctl/tests/sysctl_test.c

Modified: head/lib/libcasper/services/cap_dns/tests/dns_test.c
==
--- head/lib/libcasper/services/cap_dns/tests/dns_test.cSat Aug 12 
23:40:01 2017(r322446)
+++ head/lib/libcasper/services/cap_dns/tests/dns_test.cSun Aug 13 
00:04:50 2017(r322447)
@@ -52,18 +52,20 @@ static int ntest = 1;
 
 #define CHECK(expr) do {   \
if ((expr)) \
-   printf("ok %d %s:%u\n", ntest, __FILE__, __LINE__); \
+   printf("ok %d # %s:%u\n", ntest, __FILE__, __LINE__);   \
else\
-   printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__); \
+   printf("not ok %d # %s:%u\n", ntest, __FILE__, __LINE__); \
+   fflush(stdout); \
ntest++;\
 } while (0)
 #define CHECKX(expr) do {  \
if ((expr)) {   \
-   printf("ok %d %s:%u\n", ntest, __FILE__, __LINE__); \
+   printf("ok %d # %s:%u\n", ntest, __FILE__, __LINE__);   \
} else {\
-   printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__); \
+   printf("not ok %d # %s:%u\n", ntest, __FILE__, __LINE__); \
exit(1);\
}   \
+   fflush(stdout); \
ntest++;\
 } while (0)
 
@@ -332,6 +334,7 @@ main(void)
int families[2];
 
printf("1..91\n");
+   fflush(stdout);
 
capcas = cap_init();
CHECKX(capcas != NULL);

Modified: head/lib/libcasper/services/cap_grp/tests/grp_test.c
==
--- head/lib/libcasper/services/cap_grp/tests/grp_test.cSat Aug 12 
23:40:01 2017(r322446)
+++ head/lib/libcasper/services/cap_grp/tests/grp_test.cSun Aug 13 
00:04:50 2017(r322447)
@@ -52,6 +52,7 @@ static int ntest = 1;
printf("ok %d %s:%u\n", ntest, __FILE__, __LINE__); \
else\
printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__); \
+   fflush(stdout); \
ntest++;\
 } while (0)
 #define CHECKX(expr) do {  \
@@ -61,6 +62,7 @@ static int ntest = 1;
printf("not ok %d %s:%u\n", ntest, __FILE__, __LINE__); \
exit(1);\
}   \
+   fflush(stdout); \
ntest++;\
 } while (0)
 
@@ -1524,6 +1526,7 @@ main(void)
cap_channel_t *capcas, *capgrp;
 
printf("1..199\n");
+   fflush(stdout);
 
capcas = cap_init();
CHECKX(capcas != NULL);

Modified: head/lib/libcasper/services/cap_pwd/tests/pwd_test.c
==
--- head/lib/libcasper/services/cap_pwd/tests/pwd_test.cSat Aug 12 
23:40:01 2017(r322446)
+++ head/lib/libcasper/services/cap_pwd/tests/pwd_test.cSun Aug 13 
00:04:50 2017(r322447)
@@ -49,18 +49,20 @@ static int ntest = 1;
 
 #define CHECK(expr) do {   \
if ((expr)) \
-   printf("ok %d %s:%u\n", ntest, __FILE__, __LINE__); \
+   printf("ok %d # %s:%u\n", ntest, __FILE__, __LINE__);   \
else\
-   printf("not ok %d %s:%u\n", ntest, __F

svn commit: r322445 - head/lib/ncurses/ncurses

2017-08-12 Thread Ngie Cooper
Author: ngie
Date: Sat Aug 12 22:20:08 2017
New Revision: 322445
URL: https://svnweb.freebsd.org/changeset/base/322445

Log:
  Hide `sccsid` under #if 0, per example in style(9)
  
  This fixes a -Wunused warning with gcc 6.3.0/7.0.0.
  
  MFC after:1 week

Modified:
  head/lib/ncurses/ncurses/termcap.c

Modified: head/lib/ncurses/ncurses/termcap.c
==
--- head/lib/ncurses/ncurses/termcap.c  Sat Aug 12 22:14:09 2017
(r322444)
+++ head/lib/ncurses/ncurses/termcap.c  Sat Aug 12 22:20:08 2017
(r322445)
@@ -59,9 +59,11 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#if 0
 #ifndef lint
 static const char sccsid[] = "@(#)termcap.c8.1 (Berkeley) 6/4/93";
 #endif /* not lint */
+#endif
 
 #include 
 #include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r322418 - head/lib/msun/src

2017-08-12 Thread Ngie Cooper (yaneurabeya)

> On Aug 12, 2017, at 14:45, Ngie Cooper (yaneurabeya)  
> wrote:
> 
>> 
>> On Aug 12, 2017, at 10:55, Ryan Libby  wrote:
> 
> …
> 
>> A few possible quick fixes:
>> 
>> - Change the {arm64,riscv,sparc64}/include/float.h LDBL_MAX_EXP
>>  definitions from (+16384) to 16384.
>> 
>> - Change HALF_LDBL_MAX from
>> #define HALF_LDBL_MAX __CONCAT(__CONCAT(0x0.8p, LDBL_MAX_EXP), L)
>>  to
>> #if LDBL_MAX_EXP != 0x4000
>> #error "Unsupported long double format"
>> #endif
>> #define HALF_LDBL_MAX 0x0.8p16384L
>> 
>> - Change the HALF_LDBL_MAX constant to a variable constructed with
>>  LD80C(), I think with
>> LD80C(0x8000, 16383, 5.9486574767861588254e+4931L)
>>  but this also requires #error for LDBL_MAX_EXP != 0x4000, so not
>>  really any better than the above.
>> 
>> I think I will back the patch out for now and go back to review.
> 
> The issue is an inconsistency with how LDBL_MAX_EXP is defined in the MD 
> headers:

* is an -> is due to an

> $ grep -r LDBL_MAX_EXP sys/sparc64/
> sys/sparc64/include/float.h:#define LDBL_MAX_EXP(+16384)
> $ grep -r LDBL_MAX_EXP sys/x86/
> sys/x86/include/float.h:#define LDBL_MAX_EXP16384

Here are the full gamut of definitions for LDBL_MAX_EXP. It seems that 
sparc64 isn’t the only architecture using this pattern:

$ grep -r DBL_MAX_EXP sys/*/include
sys/arm/include/float.h:#define DBL_MAX_EXP 1024
sys/arm/include/float.h:#define LDBL_MAX_EXPDBL_MAX_EXP
sys/arm64/include/float.h:#define   DBL_MAX_EXP 1024
sys/arm64/include/float.h:#define   LDBL_MAX_EXP(+16384)
sys/mips/include/float.h:#defineDBL_MAX_EXP 1024
sys/mips/include/float.h:#defineLDBL_MAX_EXPDBL_MAX_EXP
sys/powerpc/include/float.h:#define DBL_MAX_EXP 1024
sys/powerpc/include/float.h:#define LDBL_MAX_EXPDBL_MAX_EXP
sys/riscv/include/float.h:#define   DBL_MAX_EXP 1024
sys/riscv/include/float.h:#define   LDBL_MAX_EXP(+16384)
sys/sparc64/include/float.h:#define DBL_MAX_EXP 1024
sys/sparc64/include/float.h:#define LDBL_MAX_EXP(+16384)
sys/x86/include/float.h:#define DBL_MAX_EXP 1024
sys/x86/include/float.h:#define LDBL_MAX_EXP16384

It might also be an inconsistency with how clang vs gcc [4.2.1] handles 
__CONCAT, and what -std= flags are passed to ${CC} in the Makefile, since the 
implementation is predicated by whether or not it’s C++ or __STDC__ is defined. 
There might be an update that we can grab from NetBSD (since the macro 
originated there).
I don’t understand [right now] why the (+foo) form is used *shrugs*.
Cheers,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r322418 - head/lib/msun/src

2017-08-12 Thread Ngie Cooper (yaneurabeya)

> On Aug 12, 2017, at 10:55, Ryan Libby  wrote:

…

> A few possible quick fixes:
> 
> - Change the {arm64,riscv,sparc64}/include/float.h LDBL_MAX_EXP
>   definitions from (+16384) to 16384.
> 
> - Change HALF_LDBL_MAX from
> #define HALF_LDBL_MAX __CONCAT(__CONCAT(0x0.8p, LDBL_MAX_EXP), L)
>   to
> #if LDBL_MAX_EXP != 0x4000
> #error "Unsupported long double format"
> #endif
> #define HALF_LDBL_MAX 0x0.8p16384L
> 
> - Change the HALF_LDBL_MAX constant to a variable constructed with
>   LD80C(), I think with
> LD80C(0x8000, 16383, 5.9486574767861588254e+4931L)
>   but this also requires #error for LDBL_MAX_EXP != 0x4000, so not
>   really any better than the above.
> 
> I think I will back the patch out for now and go back to review.

The issue is an inconsistency with how LDBL_MAX_EXP is defined in the MD 
headers:

$ grep -r LDBL_MAX_EXP sys/sparc64/
sys/sparc64/include/float.h:#define LDBL_MAX_EXP(+16384)
$ grep -r LDBL_MAX_EXP sys/x86/
sys/x86/include/float.h:#define LDBL_MAX_EXP16384

Cheers,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r322441 - head/share/mk

2017-08-12 Thread Ngie Cooper
Author: ngie
Date: Sat Aug 12 21:26:46 2017
New Revision: 322441
URL: https://svnweb.freebsd.org/changeset/base/322441

Log:
  Delete trailing whitespace
  
  MFC after:1 month

Modified:
  head/share/mk/bsd.cpu.mk

Modified: head/share/mk/bsd.cpu.mk
==
--- head/share/mk/bsd.cpu.mkSat Aug 12 21:23:33 2017(r322440)
+++ head/share/mk/bsd.cpu.mkSat Aug 12 21:26:46 2017(r322441)
@@ -399,7 +399,7 @@ CFLAGS_NO_SIMD= -mno-mmx -mno-sse
 .endif
 CFLAGS_NO_SIMD += ${CFLAGS_NO_SIMD.${COMPILER_TYPE}}
 
-# Add in any architecture-specific CFLAGS.  
+# Add in any architecture-specific CFLAGS.
 # These come from make.conf or the command line or the environment.
 CFLAGS += ${CFLAGS.${MACHINE_ARCH}}
 CXXFLAGS += ${CXXFLAGS.${MACHINE_ARCH}}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r322371 - head/lib/libc/tests/gen

2017-08-11 Thread Ngie Cooper

> On Aug 10, 2017, at 11:03, Pedro F. Giffuni  wrote:
> 
> Author: pfg
> Date: Thu Aug 10 17:03:46 2017
> New Revision: 322371
> URL: https://svnweb.freebsd.org/changeset/base/322371
> 
> Log:
>  fnmatch(3): Update testcase for r322368.
> 
> Modified:
>  head/lib/libc/tests/gen/fnmatch_testcases.h

Thank you!!
-Ngie
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322214 - in head/tests: etc/rc.d sys/acl sys/file sys/geom/class/eli sys/geom/class/gate sys/geom/class/mirror sys/geom/class/nop sys/geom/class/uzip sys/kern sys/kqueue/libkqueue sys/...

2017-08-07 Thread Ngie Cooper
Author: ngie
Date: Tue Aug  8 04:59:16 2017
New Revision: 322214
URL: https://svnweb.freebsd.org/changeset/base/322214

Log:
  Make test scripts under tests/... non-executable
  
  Executable bits should be set at install time instead of in the repo.
  Setting executable bits on files triggers false positives with Phabricator.
  
  MFC after:2 months

Modified:
Directory Properties:
  head/tests/etc/rc.d/routing_test.sh   (props changed)
  head/tests/sys/acl/aclfuzzer.sh   (props changed)
  head/tests/sys/acl/mktrivial.sh   (props changed)
  head/tests/sys/file/flock_test.sh   (props changed)
  head/tests/sys/geom/class/eli/conf.sh   (props changed)
  head/tests/sys/geom/class/eli/init_alias_test.sh   (props changed)
  head/tests/sys/geom/class/gate/ggate_test.sh   (props changed)
  head/tests/sys/geom/class/mirror/8_test.sh   (props changed)
  head/tests/sys/geom/class/mirror/9_test.sh   (props changed)
  head/tests/sys/geom/class/nop/nop_test.sh   (props changed)
  head/tests/sys/geom/class/uzip/conf.sh   (props changed)
  head/tests/sys/kern/coredump_phnum_test.sh   (props changed)
  head/tests/sys/kqueue/libkqueue/kqueue_test.sh   (props changed)
  head/tests/sys/mac/portacl/misc.sh   (props changed)
  head/tests/sys/mac/portacl/nobody_test.sh   (props changed)
  head/tests/sys/mac/portacl/root_test.sh   (props changed)
  head/tests/sys/mqueue/mqueue_test.sh   (props changed)
  head/tests/sys/netinet/fibs_test.sh   (props changed)
  head/tests/sys/opencrypto/runtests.sh   (props changed)
  head/tests/sys/vfs/trailing_slash.sh   (props changed)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r322101 - head/bin/chmod/tests

2017-08-05 Thread Ngie Cooper
Author: ngie
Date: Sat Aug  5 16:58:02 2017
New Revision: 322101
URL: https://svnweb.freebsd.org/changeset/base/322101

Log:
  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 after:4 days
  MFC with: r321949

Modified:
  head/bin/chmod/tests/chmod_test.sh

Modified: head/bin/chmod/tests/chmod_test.sh
==
--- head/bin/chmod/tests/chmod_test.sh  Sat Aug  5 16:55:07 2017
(r322100)
+++ head/bin/chmod/tests/chmod_test.sh  Sat Aug  5 16:58:02 2017
(r322101)
@@ -115,7 +115,7 @@ f_flag_body()
 
 f_flag_cleanup()
 {
-   atf_check chflags 0 foo
+   chflags 0 foo || :
 }
 
 atf_test_case h_flag
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r321369 - in head: . contrib/compiler-rt/include/sanitizer contrib/compiler-rt/include/xray contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contrib/compiler-rt/lib/builti

2017-08-04 Thread Ngie Cooper (yaneurabeya)

> On Jul 22, 2017, at 04:08, Dimitry Andric  wrote:
> 
> Author: dim
> Date: Sat Jul 22 11:08:25 2017
> New Revision: 321369
> URL: https://svnweb.freebsd.org/changeset/base/321369
> 
> Log:
>  Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
>  5.0.0 (trunk r308421).  Upstream has branched for the 5.0.0 release,
>  which should be in about a month.  Please report bugs and regressions,
>  so we can get them into the release.
> 
>  Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
>  support to build; see UPDATING for more information.
> 
>  MFC after:   2 months

Hi Dmitry,
This commit changed a lot of mergeinfo under contrib/ and sys/contrib 
unnecessarily — could you please revert those changes before merging back to 
^/head next time?
Thank you!
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r322029 - in head: usr.bin usr.sbin

2017-08-03 Thread Ngie Cooper (yaneurabeya)

> On Aug 3, 2017, at 14:30, Jeremie Le Hen  wrote:
> 
> Author: jlh
> Date: Thu Aug  3 21:30:12 2017
> New Revision: 322029
> URL: https://svnweb.freebsd.org/changeset/base/322029
> 
> Log:
>  rwho/ruptime/rwhod shouldn't be gated by RCMDS.

The why in this commit and the next you made (r322031) would have been 
incredibly helpful. If bugzilla disappears I only have the commit history 
tracking the what.
Cheers,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r322023 - head/lib/libxo/tests

2017-08-03 Thread Ngie Cooper
Author: ngie
Date: Thu Aug  3 17:53:14 2017
New Revision: 322023
URL: https://svnweb.freebsd.org/changeset/base/322023

Log:
  Remove special-case logic for running tests on host machines
  
  I'm not sure what process sjg@ was using, but using CHECKDIR=${.OBJDIR} with
  "make check" on ^/head is the correct thing to do. This unbreaks "make check"
  for me (unsandboxed, not using CHECKDIR=${.OBJDIR}).
  
  While here, fix a whitespace nit with LIBADD.
  
  MFC after:1 week

Modified:
  head/lib/libxo/tests/Makefile

Modified: head/lib/libxo/tests/Makefile
==
--- head/lib/libxo/tests/Makefile   Thu Aug  3 17:43:26 2017
(r322022)
+++ head/lib/libxo/tests/Makefile   Thu Aug  3 17:53:14 2017
(r322023)
@@ -242,13 +242,8 @@ PROGS+= test_11
 
 CFLAGS+=   -I${LIBXOSRC}/libxo -I${.CURDIR:H}
 
-LIBADD=xo util 
+LIBADD=xo util
 
 SUBDIR+=   encoder
-
-.if ${MACHINE} == "host"
-# make it easy to test without install
-TESTSDIR=  ${.OBJDIR}
-.endif
 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r321991 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2

2017-08-03 Thread Ngie Cooper
Author: ngie
Date: Thu Aug  3 13:50:46 2017
New Revision: 321991
URL: https://svnweb.freebsd.org/changeset/base/321991

Log:
  Revert r321969
  
  My change had good intentions, but the implementation was incorrect:
  - printf was returning the number of characters in the format string
plus the NUL, but failed in two regards implementation wise:
  -- the pathological case, printf(""), wasn't being handled properly since
 the pointer is always incremented, so the value returned would be
 off-by-one.
  -- printf(3) reports the number of characters printed post-conversion via
 vfprintf, etc.
  - putchar(3) should return the character printed or EOF, not the number
of characters output to the screen.
  
  My goal in making the change (again) was to increase parity, but as bde
  pointed out these are freestanding functions, so they don't have to
  conform to libc/POSIX. I argued that the functions should be named
  differently since the implementation is different enough to warrant it
  and to allow boot2 code to be usable when linked against sys/boot and
  libstand and other libraries in base. I have no interest in pushing
  this change forward more though, as the original concern I had behind
  the change with zfsboottest was resolved in r321849 and r321852. The
  next person that updates the toolchain gets to deal with the
  inconsistency if it's flagged by a newer compiler.
  
  MFC after:1 month
  Reported by:  ed, markj

Modified:
  head/sys/boot/arm/at91/libat91/lib.h
  head/sys/boot/arm/at91/libat91/printf.c
  head/sys/boot/arm/at91/libat91/putchar.c
  head/sys/boot/arm/ixp425/boot2/ixp425_board.c
  head/sys/boot/arm/ixp425/boot2/lib.h
  head/sys/boot/i386/boot2/boot2.c

Modified: head/sys/boot/arm/at91/libat91/lib.h
==
--- head/sys/boot/arm/at91/libat91/lib.hThu Aug  3 13:45:26 2017
(r321990)
+++ head/sys/boot/arm/at91/libat91/lib.hThu Aug  3 13:50:46 2017
(r321991)
@@ -28,9 +28,9 @@
 #define ARM_BOOT_LIB_H
 
 int getc(int);
-int putchar(int);
-int xputchar(int);
-int printf(const char *fmt,...);
+void putchar(int);
+void xputchar(int);
+void printf(const char *fmt,...);
 
 /* The following function write eeprom at ee_addr using data   */
 /*  from data_add for size bytes.  */

Modified: head/sys/boot/arm/at91/libat91/printf.c
==
--- head/sys/boot/arm/at91/libat91/printf.c Thu Aug  3 13:45:26 2017
(r321990)
+++ head/sys/boot/arm/at91/libat91/printf.c Thu Aug  3 13:50:46 2017
(r321991)
@@ -20,13 +20,12 @@
 #include 
 #include "lib.h"
 
-int
+void
 printf(const char *fmt,...)
 {
va_list ap;
const char *hex = "0123456789abcdef";
char buf[10];
-   const char *fmt_orig = fmt;
char *s;
unsigned u;
int c;
@@ -67,5 +66,5 @@ printf(const char *fmt,...)
}
va_end(ap);
 
-   return (int)(fmt - fmt_orig);
+   return;
 }

Modified: head/sys/boot/arm/at91/libat91/putchar.c
==
--- head/sys/boot/arm/at91/libat91/putchar.cThu Aug  3 13:45:26 2017
(r321990)
+++ head/sys/boot/arm/at91/libat91/putchar.cThu Aug  3 13:50:46 2017
(r321991)
@@ -39,11 +39,11 @@
 #include "lib.h"
 
 /*
- * int putchar(int ch)
+ * void putchar(int ch)
  * Writes a character to the DBGU port.  It assumes that DBGU has
  * already been initialized.
  */
-int
+void
 putchar(int ch)
 {
AT91PS_USART pUSART = (AT91PS_USART)AT91C_BASE_DBGU;
@@ -51,14 +51,12 @@ putchar(int ch)
while (!(pUSART->US_CSR & AT91C_US_TXRDY))
continue;
pUSART->US_THR = (ch & 0xFF);
-   return (1);
 }
 
-int
+void
 xputchar(int ch)
 {
-   if (ch == '\n')
-   putchar('\r');
-   putchar(ch);
-   return (ch == '\n' ? 2 : 1);
+if (ch == '\n')
+   putchar('\r');
+putchar(ch);
 }

Modified: head/sys/boot/arm/ixp425/boot2/ixp425_board.c
==
--- head/sys/boot/arm/ixp425/boot2/ixp425_board.c   Thu Aug  3 13:45:26 
2017(r321990)
+++ head/sys/boot/arm/ixp425/boot2/ixp425_board.c   Thu Aug  3 13:50:46 
2017(r321991)
@@ -165,7 +165,7 @@ getc(int seconds)
return c;
 }
 
-int
+void
 putchar(int ch)
 {
int delay, limit;
@@ -179,16 +179,14 @@ putchar(int ch)
limit = 40;
while ((uart_getreg(ubase, REG_LSR) & LSR_TEMT) == 0 && --limit)
DELAY(delay);
-   return (1);
 }
 
-int
+void
 xputchar(int ch)
 {
if (ch == '\n')
putchar('\r');
putchar(ch);
-   return (ch == '\n' ? 2 : 1);
 }
 
 void

Modified: head/sys/boot/arm/ixp425/boot2/lib.h
==

Re: svn commit: r321969 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2

2017-08-03 Thread Ngie Cooper (yaneurabeya)

> On Aug 3, 2017, at 00:53, Bruce Evans  wrote:
> 
> On Thu, 3 Aug 2017, Ngie Cooper wrote:
> 
>> Log:
>> Fix the return types for printf and putchar to match their libc and
>> POSIX equivalents
>> 
>> Both printf and putchar return int, not void.
>> 
>> This will allow code that leverages the libcalls and checks/rely on the
>> return type to interchangeably between loader code and non-loader
>> code.
>> 
>> MFC after:   1 month
>> 
>> Modified:
>> head/sys/boot/arm/at91/libat91/lib.h
>> head/sys/boot/arm/at91/libat91/printf.c
>> head/sys/boot/arm/at91/libat91/putchar.c
>> head/sys/boot/arm/ixp425/boot2/ixp425_board.c
>> head/sys/boot/arm/ixp425/boot2/lib.h
>> head/sys/boot/i386/boot2/boot2.c
> 
> This is wrong for at least i386/boot2.  It isn't part of the loader, and
> saves space by not returning unused values.
> 
>> Modified: head/sys/boot/i386/boot2/boot2.c
>> ==
>> --- head/sys/boot/i386/boot2/boot2.c Thu Aug  3 03:45:48 2017
>> (r321968)
>> +++ head/sys/boot/i386/boot2/boot2.c Thu Aug  3 05:27:05 2017
>> (r321969)
>> @@ -114,8 +114,8 @@ void exit(int);
>> static void load(void);
>> static int parse(void);
>> static int dskread(void *, unsigned, unsigned);
>> -static void printf(const char *,...);
>> -static void putchar(int);
>> +static int printf(const char *,...);
>> +static int putchar(int);
> 
> These are freestanding static functions, so they have nothing to do
> with library functions except their name is a hint that they are
> similar.
> 
> Since they are static, -funit-at-a-time might allow the unused return values
> to be optimized away.  Then returning unused values would be just an
> obfuscation.
> 
> This file still has a static memcpy() which is quite different from the
> libc version.  It doesn't return an unused value, and its arg types are
> all different (no newfangled size_t or newerfangled restrict).
> 
> Freestanding versions (static and otherwise) cause problems with builtins.
> -ffreestanding turns off all builtins.  The static memcpy used to be
> ifdefed so as to use __builtin_memcpy instead of the static one if the
> compiler is gcc.  That apparently broke with gcc-4.2, since the builtin
> will call libc memcpy() in some cases, although memcpy() is unavailable
> in the freestanding case.

I get the point about them being freestanding functions, but if the functions 
aren’t meant to be compatible they should be named differently. Part of the 
issue some code that bridged loader and non-loader users (bootdevtest and 
zfsboottest for example) relied on feature parity (in part because the ZFS code 
required it and because of how things are compiled/linked together). If 
compilers get pedantic enough, then they’ll flag these issues as errors and 
we’ll have to address these compatibilities at that point.

My intent was ok (I think), but the implementation I did is wrong, so I’ll 
revert the change completely and leave it for someone else to deal with the 
incompatibilities (I’ll just integrate bootdevtest and zfsboottest into 
buildworld under sys/boot so they won’t remain broken for weeks on end, like 
they were recently).

Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


  1   2   3   4   5   6   7   8   9   10   >