[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [OSSTEST PATCH v13 18/24] TestSupport: Introduce target_cmd_stashed

Anthony PERARD writes ("[OSSTEST PATCH v13 18/24] TestSupport: Introduce 
> This works like target_cmd, but takes a ref to a filename as argument
> and stash the output of the command then return a path to the stashed
> output.
> +# Like target_cmd, but stash cmd stdout and return a path to it.
> +sub target_cmd_stashed ($$$;$$) {
> +    my ($tho,$leafref,$tcmd,$timeout,$extrasshopts) = @_;
> +    my $stdout = open_unique_stashfile($leafref);
> +    my $rc = tcmd(undef, $stdout, 0, 'osstest', $tho, $tcmd, $timeout,
> +        $extrasshopts);
> +    die "$stdout $!" if $stdout->error or !close $stdout;

You can't sensibly interpolate a filehandle into a "" string.
You should use the filename (probably, the whole filename).


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.