Re: [PATCH] tests: Use system() for test-wrap-argv.pl

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

 



Dear Cole,

Cole Robinson <crobinso@xxxxxxxxxx> writes:

[tests/testutils.c:virTestRewrapFile()]
> +    /* The 'echo' syntax lets us read and write the file in one shot */
> +    if (virAsprintf(&cmd, "echo \"$(%s/test-wrap-argv.pl %s)\" > %s",
> +                    abs_srcdir, filename, filename) < 0)
> +        return -1;
[...]
> +    return system(cmd);

Doesn't the shell truncate the file before test-wrap-argv.pl gets a
chance to read the original content?

Sascha
-- 
Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg
https://se-silbe.de/
USt-IdNr. DE281696641


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]