Hi Reuben, Reuben Thomas wrote: > I find no tests for specific return codes from qcopy_file_preserving (grep > GL_COPY gives no hits in gnulib/tests/), and I can find no test > involving /dev/null (all instances I can find are redirections, not > parameters to a test).
Yes, I added a test for whether qcopy_file_preserving works on its own (i.e. in a program that does not also call copy_file_preserving). If you want to add tests for some of the specific return codes, please do so, without changing the part that calls copy_file_preserving. Also please don't write on file1. But you can construct different destination file names based on file2. Generally it's desirable to write tests in such a way that the different parts of the tests operate on different destination files: - If the test fails, the state on disk contains more info about what failed. - When adding new code to the test, you don't need to consider the specific state of the destination file, reading through all the code before. Just add a new destination file. Using the same source file (file1) throughout the entire test is OK, though, because it doesn't change. Bruno