Remove duplicate symbols and add test case

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
This commit is contained in:
Daniel P. Berrange 2012-09-06 15:45:57 +01:00
parent 9278578069
commit f299ddd6b1
2 changed files with 9 additions and 6 deletions

View File

@ -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};

View File

@ -1178,8 +1178,6 @@ virDirCreate;
virDoubleToStr;
virEnumFromString;
virEnumToString;
virEventAddHandle;
virEventRemoveHandle;
virFileAbsPath;
virFileAccessibleAs;
virFileBuildPath;