Author: metze Date: 2005-09-06 04:59:38 +0000 (Tue, 06 Sep 2005) New Revision: 10049
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10049 Log: [EMAIL PROTECTED] (orig r10038): jelmer | 2005-09-05 20:11:15 +0200 Update instructions on using gcov with ldb [EMAIL PROTECTED] (orig r10041): jelmer | 2005-09-05 21:54:35 +0200 Add 'gcov' make target. Run 'make clean gcov' to generate a set of files describing the test coverage of the Samba 4 code. [EMAIL PROTECTED] (orig r10043): jelmer | 2005-09-05 22:56:28 +0200 Only recompile subsystems that actually need recompilation [EMAIL PROTECTED] (orig r10044): abartlet | 2005-09-06 02:33:28 +0200 Microsoft has defined this bit: support.microsoft.com/?kbid=832572 (It inhbits the generation of a PAC). Andrew Bartlett [EMAIL PROTECTED] (orig r10045): abartlet | 2005-09-06 02:34:22 +0200 metze reminded me to use the correct enum entry, rather than 0 for the return here. Andrew Bartlett [EMAIL PROTECTED] (orig r10046): tpot | 2005-09-06 02:42:21 +0200 Don't generate any ethereal dissectors for security.idl [EMAIL PROTECTED] (orig r10047): tpot | 2005-09-06 03:52:34 +0200 Translate an idl NTTIME to an ethereal FT_ABSOLUTE_TIME instead of a FT_UINT64. Not sure about a NTTIME_hyper though. [EMAIL PROTECTED] (orig r10048): tpot | 2005-09-06 03:55:40 +0200 Dissect a security_secinfo as a uint32 just to get the winreg dissector compiling and linking. It's really an enum defined in security.idl. Added: branches/SOC/SAMBA_4_0/source/librpc/idl/security.cnf branches/SOC/SAMBA_4_0/source/librpc/idl/winreg.cnf Modified: branches/SOC/SAMBA_4_0/ branches/SOC/SAMBA_4_0/source/build/m4/check_cc.m4 branches/SOC/SAMBA_4_0/source/build/smb_build/makefile.pm branches/SOC/SAMBA_4_0/source/build/smb_build/output.pm branches/SOC/SAMBA_4_0/source/include/ads.h branches/SOC/SAMBA_4_0/source/lib/ldb/README_gcov.txt branches/SOC/SAMBA_4_0/source/lib/registry/config.mk branches/SOC/SAMBA_4_0/source/main.mk branches/SOC/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm branches/SOC/SAMBA_4_0/source/rpc_server/drsuapi/drsuapi_cracknames.c branches/SOC/SAMBA_4_0/source/torture/config.mk Changeset: Property changes on: branches/SOC/SAMBA_4_0 ___________________________________________________________________ Name: svk:merge - 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:10035 3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba4:9495 a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11627 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/SAMBA_4_0:5616 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/samba-SAMBA_4_0:5609 + 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:10048 3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba4:9495 a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11627 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/SAMBA_4_0:5616 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/samba-SAMBA_4_0:5609 Modified: branches/SOC/SAMBA_4_0/source/build/m4/check_cc.m4 =================================================================== --- branches/SOC/SAMBA_4_0/source/build/m4/check_cc.m4 2005-09-06 01:55:40 UTC (rev 10048) +++ branches/SOC/SAMBA_4_0/source/build/m4/check_cc.m4 2005-09-06 04:59:38 UTC (rev 10049) @@ -127,3 +127,5 @@ # allow for --with-hostcc=gcc AC_ARG_WITH(hostcc,[ --with-hostcc=compiler choose host compiler],[HOSTCC=$withval],[HOSTCC=$CC]) AC_SUBST(HOSTCC) + +AC_PATH_PROG(GCOV,gcov) Modified: branches/SOC/SAMBA_4_0/source/build/smb_build/makefile.pm =================================================================== --- branches/SOC/SAMBA_4_0/source/build/smb_build/makefile.pm 2005-09-06 01:55:40 UTC (rev 10048) +++ branches/SOC/SAMBA_4_0/source/build/smb_build/makefile.pm 2005-09-06 04:59:38 UTC (rev 10049) @@ -77,13 +77,14 @@ CFLAGS=-I\$(srcdir)/include -I\$(srcdir) -D_SAMBA_BUILD_ -DHAVE_CONFIG_H -I\$(srcdir)/lib $config{CFLAGS} $config{CPPFLAGS} LD=$config{LD} -LD_FLAGS=$config{LDFLAGS} -Lbin +GCOV=$config{GCOV} +LD_FLAGS=$config{LDFLAGS} STLD=$config{AR} STLD_FLAGS=-rc SHLD=$config{CC} -SHLD_FLAGS=$config{LDSHFLAGS} -Lbin +SHLD_FLAGS=$config{LDSHFLAGS} XSLTPROC=$config{XSLTPROC} @@ -364,7 +365,7 @@ my $output = "$ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST = $tmpdepend\n"; - $output .= "$ctx->{TARGET}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJS)\n"; + $output .= "$ctx->{TARGET}: \$($ctx->{TYPE}_$ctx->{NAME}_OBJS)\n"; $output .= "[EMAIL PROTECTED] \"Pre-Linking $ctx->{TYPE} $ctx->{NAME}\"\n"; $output .= "[EMAIL PROTECTED](LD) -r \$($ctx->{TYPE}_$ctx->{NAME}_OBJS) -o $ctx->{TARGET}\n"; Modified: branches/SOC/SAMBA_4_0/source/build/smb_build/output.pm =================================================================== --- branches/SOC/SAMBA_4_0/source/build/smb_build/output.pm 2005-09-06 01:55:40 UTC (rev 10048) +++ branches/SOC/SAMBA_4_0/source/build/smb_build/output.pm 2005-09-06 04:59:38 UTC (rev 10049) @@ -120,11 +120,6 @@ foreach $part (values %{$depend}) { next if not defined($part->{OUTPUT_TYPE}); - foreach (@{$part->{DEPENDENCIES}}) { - my $elem = $$_; - push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET}); - } - # Always import the CFLAGS and CPPFLAGS of the unique dependencies foreach my $elem (values %{$part->{UNIQUE_DEPENDENCIES}}) { next if $elem == $part; @@ -134,6 +129,7 @@ push(@{$part->{LINK_LIST}}, $elem->{OUTPUT}) if defined($elem->{OUTPUT}); push(@{$part->{LINK_FLAGS}}, @{$elem->{LIBS}}) if defined($elem->{LIBS}); push(@{$part->{LINK_FLAGS}},@{$elem->{LDFLAGS}}) if defined($elem->{LDFLAGS}); + push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET}); push(@{$part->{SUBSYSTEM_INIT_FUNCTIONS}}, $elem->{INIT_FUNCTION}) if $part->{OUTPUT_TYPE} eq "BINARY" and Modified: branches/SOC/SAMBA_4_0/source/include/ads.h =================================================================== --- branches/SOC/SAMBA_4_0/source/include/ads.h 2005-09-06 01:55:40 UTC (rev 10048) +++ branches/SOC/SAMBA_4_0/source/include/ads.h 2005-09-06 04:59:38 UTC (rev 10049) @@ -151,7 +151,7 @@ #define UF_UNUSED_5 0x00800000 #define UF_UNUSED_6 0x01000000 -#define UF_UNUSED_7 0x02000000 +#define UF_NO_AUTH_DATA_REQUIRED 0x02000000 #define UF_UNUSED_8 0x04000000 #define UF_UNUSED_9 0x08000000 Modified: branches/SOC/SAMBA_4_0/source/lib/ldb/README_gcov.txt =================================================================== --- branches/SOC/SAMBA_4_0/source/lib/ldb/README_gcov.txt 2005-09-06 01:55:40 UTC (rev 10048) +++ branches/SOC/SAMBA_4_0/source/lib/ldb/README_gcov.txt 2005-09-06 04:59:38 UTC (rev 10049) @@ -1,18 +1,14 @@ Here is how to use gcov to test code coverage in ldb. -Step 1: enable gcov support +Step 1: build ldb with gcov enabled - Edit Makefile.ldb and uncommend the two GCOV_ lines - -Step 2: build ldb + make clean all WITH_GCOV=1 - make -sf Makefile.ldb clean all - Step 3: run the test suite - make -sf Makefile.ldb test-tdb + make test-tdb Step 4: produce the gcov report - make -sf Makefile.ldb gcov + make gcov Step 5: read the summary reports less *.report.gcov @@ -22,7 +18,7 @@ You can also combine steps 2 to 4 like this: - make -sf Makefile.ldb clean all test-tdb gcov + make clean all test-tdb gcov WITH_GCOV=1 Note that you should not expect 100% coverage, as some error paths (such as memory allocation failures) are very hard to trigger. There Modified: branches/SOC/SAMBA_4_0/source/lib/registry/config.mk =================================================================== --- branches/SOC/SAMBA_4_0/source/lib/registry/config.mk 2005-09-06 01:55:40 UTC (rev 10048) +++ branches/SOC/SAMBA_4_0/source/lib/registry/config.mk 2005-09-06 04:59:38 UTC (rev 10049) @@ -16,6 +16,7 @@ NOPROTO = YES INIT_OBJ_FILES = lib/registry/tdr_regf.o +lib/registry/reg_backend_nt4.c: lib/registry/tdr_regf.c lib/registry/tdr_regf.c: lib/registry/regf.idl @./pidl/pidl --header --outputdir=lib/registry --parse --tdr-header --tdr-parser -- lib/registry/regf.idl Added: branches/SOC/SAMBA_4_0/source/librpc/idl/security.cnf =================================================================== --- branches/SOC/SAMBA_4_0/source/librpc/idl/security.cnf 2005-09-06 01:55:40 UTC (rev 10048) +++ branches/SOC/SAMBA_4_0/source/librpc/idl/security.cnf 2005-09-06 04:59:38 UTC (rev 10049) @@ -0,0 +1 @@ +NOEMIT Added: branches/SOC/SAMBA_4_0/source/librpc/idl/winreg.cnf =================================================================== --- branches/SOC/SAMBA_4_0/source/librpc/idl/winreg.cnf 2005-09-06 01:55:40 UTC (rev 10048) +++ branches/SOC/SAMBA_4_0/source/librpc/idl/winreg.cnf 2005-09-06 04:59:38 UTC (rev 10049) @@ -0,0 +1 @@ +IMPORT security_secinfo offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_GetKeySecurity_sec_info, NULL); Modified: branches/SOC/SAMBA_4_0/source/main.mk =================================================================== --- branches/SOC/SAMBA_4_0/source/main.mk 2005-09-06 01:55:40 UTC (rev 10048) +++ branches/SOC/SAMBA_4_0/source/main.mk 2005-09-06 04:59:38 UTC (rev 10049) @@ -78,6 +78,7 @@ @echo " LD_FLAGS = $(LD_FLAGS)" @echo " STLD_FLAGS = $(STLD_FLAGS)" @echo " SHLD_FLAGS = $(SHLD_FLAGS)" + @echo " LIBS = $(LIBS)" install: showlayout installbin installdat installswat installmisc Modified: branches/SOC/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm =================================================================== --- branches/SOC/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm 2005-09-06 01:55:40 UTC (rev 10048) +++ branches/SOC/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm 2005-09-06 04:59:38 UTC (rev 10049) @@ -33,9 +33,13 @@ return "FT_UINT$1" if $t =~ /uint(8|16|32|64)/; return "FT_INT$1" if $t =~ /int(8|16|32|64)/; - return "FT_UINT64", if $t eq "HYPER_T" or $t eq "NTTIME" - or $t eq "NTTIME_1sec" or $t eq "NTTIME_hyper" or $t eq "hyper"; + return "FT_UINT64", if $t eq "HYPER_T" or $t eq "NTTIME_hyper" + or $t eq "hyper"; + # TODO: should NTTIME_hyper be a FT_ABSOLUTE_TIME as well? + + return "FT_ABSOLUTE_TIME" if $t eq "NTTIME" or $t eq "NTTIME_1sec"; + return "FT_STRING" if ($t eq "string"); return "FT_NONE"; Modified: branches/SOC/SAMBA_4_0/source/rpc_server/drsuapi/drsuapi_cracknames.c =================================================================== --- branches/SOC/SAMBA_4_0/source/rpc_server/drsuapi/drsuapi_cracknames.c 2005-09-06 01:55:40 UTC (rev 10048) +++ branches/SOC/SAMBA_4_0/source/rpc_server/drsuapi/drsuapi_cracknames.c 2005-09-06 04:59:38 UTC (rev 10049) @@ -105,7 +105,7 @@ } if (strcasecmp(str, alias_from) == 0) { *alias_to = mapping; - return 0; + return DRSUAPI_DS_NAME_STATUS_OK; } } while (p); } Modified: branches/SOC/SAMBA_4_0/source/torture/config.mk =================================================================== --- branches/SOC/SAMBA_4_0/source/torture/config.mk 2005-09-06 01:55:40 UTC (rev 10048) +++ branches/SOC/SAMBA_4_0/source/torture/config.mk 2005-09-06 04:59:38 UTC (rev 10049) @@ -282,3 +282,15 @@ MANPAGE = torture/man/locktest.1 # End BINARY locktest ################################# + +GCOV_FLAGS = -ftest-coverage -fprofile-arcs +GCOV_LIBS = -lgcov + +gcov: + @$(MAKE) test \ + CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \ + LD_FLAGS="$(LD_FLAGS) $(GCOV_FLAGS)" \ + LIBS="$(LIBS) $(GCOV_LIBS)" + for I in $(sort $(dir $(_ALL_OBJS_OBJS))); \ + do $(GCOV) -p -o $$I $$I/*.c; \ + done