bug-gnulib
[Top][All Lists]
Advanced

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

Re: gnulib tests leftovers


From: Jim Meyering
Subject: Re: gnulib tests leftovers
Date: Sun, 23 May 2010 10:14:30 +0200

Ralf Wildenhues wrote:
> taking a tree from
>   gnulib-tool --with-tests --test

Hi Ralf,

Thanks for the report.

> and running distcheck on it ends with
>
> [...]
> | rm -f Makefile
> | ERROR: files left in build directory after distclean:
> | ./gltests/out
> | make[1]: *** [distcleancheck] Error 1
> | make[1]: Leaving directory `/tmp/build/dummy-0/_build'
> | make: *** [distcheck] Error 1
>
> A quick git grep reveals the following tests as candidates:
>
> tests/test-verify.sh
> tests/test-xalloc-die.sh
> tests/test-xstrtoimax.sh
> tests/test-xstrtol.sh
> tests/test-xstrtoll.sh
> tests/test-xstrtoumax.sh

Each of the above uses init.sh, and as such automatically
creates a temporary directory, cd's into it, and does everything
therein, removing that directory upon completion.

The above do use "out", but should do so only in that temporary
directory.

> Now, I'm not intricate with the current gnulib test framework, and I
> wonder why 'err' is not a leftover file.  Which is the preferred way to
> remove files here?  Supply a custom cleanup_ function?  Put temp files
> in $test_dir_?

> Are the tests supposed to be usable with the parallel-tests framework?

Any that use init.sh should be runnable in parallel.

> In that case, 'out' and 'err' are not sufficiently unique as names for
> concurrent tests.

That is one of the key points of init.sh: automatically
isolate tests, so that using generic (not obfuscated out-$$)
names like 'out' and 'err' works safely, as expected.

tests/test-pwrite.c appears to be the culprit:

    char const *file = "out";
    ...
    fd = open (file, O_CREAT | O_WRONLY, 0600);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]