]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
TestSupport: Produce stack trace for undef tfileex
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 1 Jul 2016 18:02:49 +0000 (19:02 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 5 Sep 2016 14:03:20 +0000 (15:03 +0100)
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@eu.citrix.com>
Osstest/TestSupport.pm

index d0d6ef3a4e6cf47de0fa9af1ea395c99e9165a3d..a6ab18f479c3a3324d6ef929051b3d92fc9a871f 100644 (file)
@@ -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;
     }