[libvirt] [PATCH] Remove duplicate symbols and add test case
From: Daniel P. Berrange berra...@redhat.com When the event symbols were added to the public API, not all of them were removed from the private exports list. Solaris gets unhappy when there are duplicated symbols. Extend the symfile check to test for this scenario --- src/check-symfile.pl | 13 + src/libvirt_private.syms | 2 -- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/check-symfile.pl b/src/check-symfile.pl index 454fed3..c0b7ec7 100755 --- a/src/check-symfile.pl +++ b/src/check-symfile.pl @@ -5,9 +5,11 @@ die syntax: $0 SYMFILE ELFLIB(S) unless int(@ARGV) = 2; my $symfile = shift @ARGV; my @elflibs = @ARGV; -my @wantsyms; +my %wantsyms; my %gotsyms; +my $ret = 0; + open SYMFILE, $symfile or die cannot read $symfile: $!; while (SYMFILE) { @@ -21,7 +23,12 @@ while (SYMFILE) { die malformed line $_ unless /^\s*(\S+);$/; -push @wantsyms, $1; +if (exists $wantsyms{$1}) { + print STDERR Symbol $1 is listed twice\n; + $ret = 1; +} else { + $wantsyms{$1} = 1; +} } close SYMFILE; @@ -37,8 +44,6 @@ foreach my $elflib (@elflibs) { close NM; } -my $ret = 0; - foreach my $sym (@wantsyms) { next if exists $gotsyms{$sym}; diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 65067d6..72d2095 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1177,8 +1177,6 @@ virDirCreate; virDoubleToStr; virEnumFromString; virEnumToString; -virEventAddHandle; -virEventRemoveHandle; virFileAbsPath; virFileAccessibleAs; virFileBuildPath; -- 1.7.11.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Remove duplicate symbols and add test case
On 2012年09月06日 22:47, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com When the event symbols were added to the public API, not all of them were removed from the private exports list. Solaris gets unhappy when there are duplicated symbols. Extend the symfile check to test for this scenario --- src/check-symfile.pl | 13 + src/libvirt_private.syms | 2 -- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/check-symfile.pl b/src/check-symfile.pl index 454fed3..c0b7ec7 100755 --- a/src/check-symfile.pl +++ b/src/check-symfile.pl @@ -5,9 +5,11 @@ die syntax: $0 SYMFILE ELFLIB(S) unless int(@ARGV)= 2; my $symfile = shift @ARGV; my @elflibs = @ARGV; -my @wantsyms; +my %wantsyms; my %gotsyms; +my $ret = 0; + open SYMFILE, $symfile or die cannot read $symfile: $!; while (SYMFILE) { @@ -21,7 +23,12 @@ while (SYMFILE) { die malformed line $_ unless /^\s*(\S+);$/; -push @wantsyms, $1; +if (exists $wantsyms{$1}) { + print STDERR Symbol $1 is listed twice\n; + $ret = 1; +} else { + $wantsyms{$1} = 1; +} } close SYMFILE; @@ -37,8 +44,6 @@ foreach my $elflib (@elflibs) { close NM; } -my $ret = 0; - foreach my $sym (@wantsyms) { next if exists $gotsyms{$sym}; diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 65067d6..72d2095 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1177,8 +1177,6 @@ virDirCreate; virDoubleToStr; virEnumFromString; virEnumToString; -virEventAddHandle; -virEventRemoveHandle; virFileAbsPath; virFileAccessibleAs; virFileBuildPath; ACK. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Remove duplicate symbols and add test case
On 09/06/2012 10:47 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When the event symbols were added to the public API, not all of them were removed from the private exports list. Solaris gets unhappy when there are duplicated symbols. Extend the symfile check to test for this scenario --- src/check-symfile.pl | 13 + src/libvirt_private.syms | 2 -- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/check-symfile.pl b/src/check-symfile.pl index 454fed3..c0b7ec7 100755 --- a/src/check-symfile.pl +++ b/src/check-symfile.pl @@ -5,9 +5,11 @@ die syntax: $0 SYMFILE ELFLIB(S) unless int(@ARGV) = 2; my $symfile = shift @ARGV; my @elflibs = @ARGV; -my @wantsyms; +my %wantsyms; my %gotsyms; +my $ret = 0; + open SYMFILE, $symfile or die cannot read $symfile: $!; while (SYMFILE) { @@ -21,7 +23,12 @@ while (SYMFILE) { die malformed line $_ unless /^\s*(\S+);$/; -push @wantsyms, $1; +if (exists $wantsyms{$1}) { + print STDERR Symbol $1 is listed twice\n; + $ret = 1; +} else { + $wantsyms{$1} = 1; +} } close SYMFILE; @@ -37,8 +44,6 @@ foreach my $elflib (@elflibs) { close NM; } -my $ret = 0; - foreach my $sym (@wantsyms) { next if exists $gotsyms{$sym}; diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 65067d6..72d2095 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1177,8 +1177,6 @@ virDirCreate; virDoubleToStr; virEnumFromString; virEnumToString; -virEventAddHandle; -virEventRemoveHandle; virFileAbsPath; virFileAccessibleAs; virFileBuildPath; ACK. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Remove duplicate symbols and add test case
On 09/06/2012 08:47 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When the event symbols were added to the public API, not all of them were removed from the private exports list. Solaris gets unhappy when there are duplicated symbols. Extend the symfile check to test for this scenario --- src/check-symfile.pl | 13 + src/libvirt_private.syms | 2 -- 2 files changed, 9 insertions(+), 6 deletions(-) This breaks 'syntax-check' due to TABs, I'm pushing the obvious fix. -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list