| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 03/26] TestSupport: Produce stack trace for undef tfileex
 Use `confess' to see where an undef $rfile came from.  I think there
will probably be lots more of this pattern.
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 Osstest/TestSupport.pm | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index d0d6ef3..a6ab18f 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -31,6 +31,7 @@ use Osstest::Logtailer;
 use File::Copy;
 use File::Basename;
 use IO::Handle;
+use Carp;
 
 BEGIN {
     use Exporter ();
@@ -523,6 +524,8 @@ sub teditfileex {
     my $code= pop @_;
     my ($ho,$rfile,$lleaf,$rdest) = @_;
 
+    confess unless defined $rfile;
+
     if (!defined $rdest) {
         $rdest= $rfile;
     }
-- 
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |