tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: DIAGNOSTIC for modules (Re: CVS commit: src/sys/dev/usb)



On Tue, 12 Feb 2019, Rin Okuyama wrote:

Hi,

As Martin pointed out, it is useful for debugging to turn on
DIAGNOSTIC for modules (for non-release branches).

Now, all modules for amd64 are successfully built with DIAGNOSTIC.

I'd like to commit the patch below, if there's no objection.

This would be very helpful.

I would also wonder if we could increase the WARNS?= level from 3 to 5 (to match the current WARNS?= level used for kernel builds). Has anyone tried to see how many modules would fail with WARNS?=5 ??


Thanks,
rin
----
Index: sys/modules/Makefile.inc
===================================================================
RCS file: /home/netbsd/src/sys/modules/Makefile.inc,v
retrieving revision 1.6
diff -p -u -r1.6 Makefile.inc
--- sys/modules/Makefile.inc	11 Sep 2011 18:38:02 -0000	1.6
+++ sys/modules/Makefile.inc	10 Feb 2019 11:39:11 -0000
@@ -5,6 +5,10 @@ CPPFLAGS+=	-I${NETBSDSRCDIR}/common/incl
USE_FORT=	no
WARNS?=		3
+# inexpensive kernel consistency checks
+# XXX to be commented out on release branch
+CPPFLAGS+=	-DDIAGNOSTIC
+
.if !empty(IOCONF)
_BSD_IOCONF_MK_USER_=1
.include <bsd.ioconf.mk>

On 2019/02/09 23:13, Martin Husemann wrote:
On Sat, Feb 09, 2019 at 11:53:57AM +0100, Michael van Elst wrote:
And that's why I see it for modules:

Index: sys/modules/Makefile.inc
===================================================================
RCS file: /cvsroot/src/sys/modules/Makefile.inc,v
retrieving revision 1.6
diff -p -u -r1.6 Makefile.inc
--- sys/modules/Makefile.inc    11 Sep 2011 18:38:02 -0000      1.6
+++ sys/modules/Makefile.inc    9 Feb 2019 10:53:03 -0000
@@ -1,7 +1,7 @@
 #      $NetBSD: Makefile.inc,v 1.6 2011/09/11 18:38:02 mbalmer Exp $
  S!=            cd ${.PARSEDIR}/..;pwd
-CPPFLAGS+=     -I${NETBSDSRCDIR}/common/include
+CPPFLAGS+=     -I${NETBSDSRCDIR}/common/include -DDIAGNOSTIC
 USE_FORT=      no
 WARNS?=                3

How about you commit that for HEAD and we remove it on branches for the
first non-beta build (like we remove options DIAGOSTIC from lots of kernels)?

Martin


!DSPAM:5c62daaa30766798715834!


+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+


Home | Main Index | Thread Index | Old Index