]> xenbits.xensource.com Git - osstest.git/commitdiff
TestSupport::open_unique_stashfile: Provide a RDWR filehandle
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 29 Sep 2015 12:26:33 +0000 (13:26 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 29 Sep 2015 15:36:07 +0000 (16:36 +0100)
The caller can then rewind and reread it if they feel like.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Osstest/TestSupport.pm

index 2b67e32de88c3b3fbc5df43e1f31fcdb835ab39b..7b9d8159c113b6ae3031b6c55d235da39c39fe80 100644 (file)
@@ -1005,7 +1005,7 @@ sub open_unique_stashfile ($) {
     my $dh;
     for (;;) {
         my $df= $$leafref;
-        $dh= new IO::File "$stash/$df", O_WRONLY|O_EXCL|O_CREAT;
+        $dh= new IO::File "$stash/$df", O_RDWR|O_EXCL|O_CREAT;
         last if $dh;
         die "$df $!" unless $!==&EEXIST;
         next_unique_name $leafref;