On Wed, Sep 10, 2014 at 11:08:22PM +0200, Jakub Jelinek wrote:
> Perhaps better approach might be if we have some way how to synchronize among
> multiple expect processes and spawn only as many expects (of course, per
> check target) as there are CPUs.  E.g. if mkdir is atomic on all
> hosts/filesystems we care about, we could have some shared directory that
> make would clear before spawning all the expects, and after checking
> runtest_file_p we could attempt to mkdir something (e.g. testcase filename
> with $(srcdir) part removed, or *.exp filename / counter what test are we
> considering or something similar) in the shared directory, if that would
> succeed, it would tell us that we are the process that should run the test,
> if that failed, we'd know some other runtest did that.
> Or perhaps not for every single test, but every 10 or 100 tests or
> something.
> 
> E.g. we could just override runtest_file_p itself, so that it would first
> call the original dejagnu version, and then do this check.

Seems file mkdir in tcl doesn't error on pre-existing directory, so perhaps
[open $path {WRONLY EXCL CREAT}] ?
Now, does this work properly on all hosts we care about?

        Jakub

























Reply via email to