[Lsb-messages] /var/www/bzr/lsb/4.1/devchk r2263: Fix detection of equal arch-cpecific ArchType entries (bug #3553)

Denis Silakov denis.silakov at rosalab.ru
Wed Jun 13 20:30:40 UTC 2012


------------------------------------------------------------
revno: 2263
committer: Denis Silakov <denis.silakov at rosalab.ru>
branch nick: devchk
timestamp: Thu 2012-06-14 00:30:40 +0400
message:
  Fix detection of equal arch-cpecific ArchType entries (bug #3553)
modified:
  ts/devchk/mktests
  ts/devchk/qsize.C
-------------- next part --------------
=== modified file 'ts/devchk/mktests'
--- a/ts/devchk/mktests	2012-03-19 13:01:48 +0000
+++ b/ts/devchk/mktests	2012-06-13 20:30:40 +0000
@@ -1792,14 +1792,19 @@
                 # Check for value replication
                 my $one_value = '';
                 my $equal = 1;
+                my $size = '';
+                my $appearedin = '';
+                my $withdrawnin = '';
+                my $basetype = '';
+                my $attribute = '';
 
                 foreach my $aid ( sort {$a <=> $b} keys %$type ){
                     my $te = $type->{$aid};
-                    my $size        = $te->{ATsize};
-                    my $withdrawnin = $te->{ATwithdrawnin} ? "'$te->{ATwithdrawnin}'" : "NULL";
-                    my $appearedin  = $te->{ATappearedin}  ? "'$te->{ATappearedin}'"  : "NULL";
-                    my $attribute   = $te->{ATattribute}   ? "'$te->{ATattribute}'"   : "NULL";
-                    my $basetype    = $te->{ATbasetype};
+                    $size           = $te->{ATsize};
+                    $withdrawnin    = $te->{ATwithdrawnin} ? "'$te->{ATwithdrawnin}'" : "NULL";
+                    $appearedin     = $te->{ATappearedin}  ? "'$te->{ATappearedin}'"  : "NULL";
+                    $attribute   = $te->{ATattribute}   ? "'$te->{ATattribute}'"   : "NULL";
+                    $basetype    = $te->{ATbasetype};
 
                     my $out = "if $arch->{$aid}\n";
                     if ($size > 0){
@@ -1828,7 +1833,7 @@
                     $out.= "Msg(\"Arch-specific values for $tname ($tid) seem to be equal\\n\");\n";
                     $out.= "Sql(\"REPLACE INTO ArchType VALUES (";
                     $out.= "%d,%d,%d,$appearedin,$withdrawnin,$basetype,$attribute);\\n\",1,$tid,$size);\n";
-                    # TODO: Drop out arch-specific records
+                    $out.= "Sql(\"DELETE FROM ArchType WHERE ATtid=$tid AND ATaid>1 AND ATsize=$size AND ATappearedin=$appearedin;\\n\");\n";
                 }
 
                 $out.= "#";

=== modified file 'ts/devchk/qsize.C'
--- a/ts/devchk/qsize.C	2012-06-03 13:11:36 +0000
+++ b/ts/devchk/qsize.C	2012-06-13 20:30:40 +0000
@@ -31,7 +31,8 @@
 Msg("Checking qsize types\n");
 #define TYPE QSize
 Msg("Arch-specific values for QSize (20322) seem to be equal\n");
-Sql("REPLACE INTO ArchType VALUES (%d,%d,%d,'4.0','5.0',0,NULL);\n",1,20322,0);
+Sql("REPLACE INTO ArchType VALUES (%d,%d,%d,'4.0','5.0',0,NULL);\n",1,20322,8);
+Sql("DELETE FROM ArchType WHERE ATtid=20322 AND ATaid>1 AND ATsize=8 AND ATappearedin='4.0';\n");
 #if defined __i386__
 CheckTypeSize(TYPE, 8, 20322, 2, '4.0', '5.0', 0, NULL)
 #elif defined __ia64__



More information about the lsb-messages mailing list