#1 Update lcov.
Closed 4 years ago by berrange. Opened 4 years ago by thm.
rpms/ thm/lcov update-and-add-patches  into  master

@@ -1,94 +0,0 @@ 

- From a5dd9529f9232b8d901a4d6eb9ae54cae179e5b3 Mon Sep 17 00:00:00 2001

- From: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>

- Date: Wed, 7 Mar 2018 14:18:55 +0100

- Subject: [PATCH] geninfo: Add gcc 8 support

- 

- Fix errors and incorrect data when trying to collect coverage data

- for programs compiled with gcc 8.

- 

- Covers the following gcov-related changes in gcc:

- 

- .gcov-file format:

-   - Line coverage data can appear multiple times for the same line

-   - Line coverage count can be suffixed by '*' to indicated unexecuted

-     basic blocks in that line

- 

- .gcno-file format:

-   - new header field 'support unexecuted blocks flag'

-   - new function record fields 'column number', 'ending line number',

-     and 'compiler-generated entity flag'

- 

- Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>

- ---

-  bin/geninfo | 20 ++++++++++++++++++++

-  1 file changed, 20 insertions(+)

- 

- diff --git a/bin/geninfo b/bin/geninfo

- index 8562560..ef6a818 100755

- --- a/bin/geninfo

- +++ b/bin/geninfo

- @@ -68,6 +68,7 @@ our $lcov_url		= "http://ltp.sourceforge.net/coverage/lcov.php";

-  our $gcov_tool		= "gcov";

-  our $tool_name		= basename($0);

-  

- +our $GCOV_VERSION_8_0_0	= 0x80000;

-  our $GCOV_VERSION_4_7_0	= 0x40700;

-  our $GCOV_VERSION_3_4_0	= 0x30400;

-  our $GCOV_VERSION_3_3_0	= 0x30300;

- @@ -1934,6 +1935,9 @@ sub read_gcov_file($)

-  			{

-  				my ($count, $line, $code) = ($1, $2, $3);

-  

- +				# Skip instance-specific counts

- +				next if ($line == $last_line);

- +

-  				$last_line = $line;

-  				$last_block = $UNNAMED_BLOCK;

-  				# Check for exclusion markers

- @@ -1963,6 +1967,9 @@ sub read_gcov_file($)

-  					}

-  				}

-  

- +				# Strip unexecuted basic block marker

- +				$count =~ s/\*$//;

- +

-  				# <exec count>:<line number>:<source code>

-  				if ($line eq "0")

-  				{

- @@ -3537,6 +3544,10 @@ sub read_gcno_function_record(*$$$$$)

-  	graph_expect("function name");

-  	$function = read_gcno_string($handle, $big_endian);

-  	return undef if (!defined($function));

- +	if ($version >= $GCOV_VERSION_8_0_0) {

- +		graph_skip($handle, 4, "compiler-generated entity flag")

- +			or return undef;

- +	}

-  	# Read filename

-  	graph_expect("filename");

-  	$filename = read_gcno_string($handle, $big_endian);

- @@ -3544,6 +3555,11 @@ sub read_gcno_function_record(*$$$$$)

-  	# Read first line number

-  	$lineno = read_gcno_value($handle, $big_endian, "initial line number");

-  	return undef if (!defined($lineno));

- +	# Skip column and ending line number

- +	if ($version >= $GCOV_VERSION_8_0_0) {

- +		graph_skip($handle, 4, "column number") or return undef;

- +		graph_skip($handle, 4, "ending line number") or return undef;

- +	}

-  	# Add to list

-  	push(@{$bb->{$function}->{$filename}}, $lineno);

-  	graph_add_order($fileorder, $function, $filename);

- @@ -3631,6 +3647,10 @@ sub read_gcno($)

-  	debug(sprintf("found version 0x%08x\n", $version));

-  	# Skip stamp

-  	graph_skip(*HANDLE, 4, "file timestamp") or goto incomplete;

- +	if ($version >= $GCOV_VERSION_8_0_0) {

- +		graph_skip(*HANDLE, 4, "support unexecuted blocks flag")

- +			or goto incomplete;

- +	}

-  	while (!eof(HANDLE)) {

-  		my $next_pos;

-  		my $curr_pos;

- -- 

- 2.14.3

- 

file added
+1140
The added file is too large to be shown here, see it at: geninfo.patch
file modified
+12 -6
@@ -1,13 +1,15 @@ 

  Name: lcov

- Version: 1.13

- Release: 6%{?dist}

+ Version: 1.14

+ Release: 1%{?dist}

  

  Summary: LTP GCOV extension code coverage tool

  License: GPLv2+

  

- URL: http://ltp.sourceforge.net/coverage/lcov.php

- Source0: http://downloads.sourceforge.net/ltp/lcov-%{version}.tar.gz

- Patch1: 0001-geninfo-Add-gcc-8-support.patch

+ URL: https://github.com/linux-test-project/lcov

+ Source0: https://github.com/linux-test-project/lcov/releases/download/v%{version}/%{name}-%{version}.tar.gz

+ # support gcov's intermediate formats

+ # upstream commits ebfeb3e1 and 75fbae1c

+ Patch1: geninfo.patch

  

  BuildArch: noarch

  BuildRequires: perl-generators
@@ -28,7 +30,6 @@ 

  %patch1 -p1

  

  %install

- rm -rf $RPM_BUILD_ROOT

  make install DESTDIR=$RPM_BUILD_ROOT BIN_DIR=%{_bindir} MAN_DIR=%{_mandir} CFG_DIR=%{_sysconfdir}

  

  %files
@@ -38,6 +39,11 @@ 

  %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/lcovrc

  

  %changelog

+ * Thu May 30 2019 Thomas Moschny <thomas.moschny@gmx.de> - 1.14-1

+ - Update to 1.14.

+ - Update upstream URLs.

+ - Patches to support gcov's intermedia text/json formats.

+ 

  * Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.13-6

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (lcov-1.13.tar.gz) = 54033c0f99dbf7b332fcd70730df8672713ffc36c010809353dfd83a73fcc4f504b6a68e3b5010002d6992da5fa940a7d5f4e03dc3fe6930ab713a7b980dff9e

+ SHA512 (lcov-1.14.tar.gz) = 2d60c3a63e300dda96171c432fe304840acc76bf6275f60934d08e80765f9f85671e8b77bfed758fc45842a80156586dc0d67c42c9f215f4f163840fc5cf65bc

  • Update to 1.14 (bug 1713541).
  • Update upstream URLs (bug 1713537).
  • Patches to support gcov's intermedia text/json formats. (bug 1668843).

Thanks for the proposal. I prefer to have one patch for each logically separate change, so I've pushed equivalent changes to git master & active fedora branches.

Pull-Request has been closed by berrange

4 years ago