From f2b1e4f05cf7e02b0bdf7e4008c11ac69d24ccf5 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 29 Sep 2015 13:26:33 +0100 Subject: [PATCH] TestSupport::open_unique_stashfile: Provide a RDWR filehandle The caller can then rewind and reread it if they feel like. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- Osstest/TestSupport.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 2b67e32..7b9d815 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -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; -- 2.39.5