diff --git a/tests/getpart.pm b/tests/getpart.pm
index 58e1a6006faab450081396bcef3c66c6713caa5b..d288000882fa91cbc675fcfb847b1ea2f0d1f4f2 100644
--- a/tests/getpart.pm
+++ b/tests/getpart.pm
@@ -3,6 +3,9 @@
 
 my @xml;
 
+my $warning=0;
+my $trace=0;
+
 sub getpartattr {
     my ($section, $part)=@_;
 
@@ -63,12 +66,21 @@ sub getpart {
             $inside--;
         }
         elsif((1==$inside) && ($_ =~ /^ *\<\/$section/)) {
+            if($trace) {
+                print STDERR "*** getpart.pm: $section/$part returned data!\n";
+            }
+            if(!@this && $warning) {
+                print STDERR "*** getpart.pm: $section/$part returned empty!\n";
+            }
             return @this;
         }
         elsif(2==$inside) {
             push @this, $_;
         }
     }
+    if($warning) {
+        print STDERR "*** getpart.pm: $section/$part returned empty!\n";
+    }
     return @this; #empty!
 }