[libvirt] [PATCH] tests: Use system() for test-wrap-argv.pl
Sascha Silbe
silbe at linux.vnet.ibm.com
Thu Apr 21 08:04:32 UTC 2016
Dear Cole,
Cole Robinson <crobinso at redhat.com> 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
More information about the libvir-list
mailing list