File-Glob/t/basic.t: avoid race condition
authorDavid Mitchell <davem@iabyn.com>
Sun, 6 Apr 2014 19:07:05 +0000 (20:07 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sun, 6 Apr 2014 19:07:05 +0000 (20:07 +0100)
commitdc9327d7b15505dbee4c9b53023efcfb88db6a8a
tree5276feeada4b21fd9f5073e1a6f2e63e72f31697
parentc67edbcd1a902e5bf297baff434c10fbfb3211db
File-Glob/t/basic.t: avoid race condition

Test 2 does a glob('*') in the t/ directory, and compares that with the
results of readdir('.'). If we're doing parallel testing, temporary files
and stuff may get created in t/, resulting in a race condition and
occasional random failures.

Fix this by chdir()ing to t/base/ first. The timestamp on this directory
on my system seems to indicate that nothing currently creates tmp files in
that dir, and given that these are basic tests, that's relatively unlikely
to change.
ext/File-Glob/t/basic.t