Update.
1998-03-16 13:02 Tim Waugh <tim@cyberelk.demon.co.uk> * posix/wordexp-tst.sh: Store test results in the ${common_objpfx}posix directory. * posix/wordexp-test.c: Remove temporary directory afterwards.
This commit is contained in:
parent
f649c2015a
commit
6760028826
|
@ -1,3 +1,10 @@
|
||||||
|
1998-03-16 13:02 Tim Waugh <tim@cyberelk.demon.co.uk>
|
||||||
|
|
||||||
|
* posix/wordexp-tst.sh: Store test results in the
|
||||||
|
${common_objpfx}posix directory.
|
||||||
|
|
||||||
|
* posix/wordexp-test.c: Remove temporary directory afterwards.
|
||||||
|
|
||||||
1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
|
|
||||||
* libc.map: Export internal versions of cancelable functions.
|
* libc.map: Export internal versions of cancelable functions.
|
||||||
|
|
|
@ -152,11 +152,12 @@ command_line_test (const char *words)
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
const char *globfile[] = { "one", "two", "three", NULL };
|
||||||
char tmpdir[32];
|
char tmpdir[32];
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
int test;
|
int test;
|
||||||
int fail = 0;
|
int fail = 0;
|
||||||
int fd;
|
int i;
|
||||||
|
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
{
|
{
|
||||||
|
@ -164,16 +165,22 @@ main (int argc, char *argv[])
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cwd = getcwd (NULL, 0);
|
||||||
setenv ("IFS", IFS, 1);
|
setenv ("IFS", IFS, 1);
|
||||||
|
|
||||||
/* Set up arena for pathname expansion */
|
/* Set up arena for pathname expansion */
|
||||||
tmpnam (tmpdir);
|
tmpnam (tmpdir);
|
||||||
if (mkdir (tmpdir, S_IRWXU) ||
|
if (mkdir (tmpdir, S_IRWXU) || chdir (tmpdir))
|
||||||
chdir (tmpdir) ||
|
|
||||||
(fd = creat ("one", S_IRWXU)) == -1 || close (fd) ||
|
|
||||||
(fd = creat ("two", S_IRWXU)) == -1 || close (fd) ||
|
|
||||||
(fd = creat ("three", S_IRWXU)) == -1 || close (fd))
|
|
||||||
return -1;
|
return -1;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
for (i = 0; globfile[i]; ++i)
|
||||||
|
if ((fd = creat (globfile[i], S_IRUSR | S_IWUSR)) == -1
|
||||||
|
|| close (fd))
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
for (test = 0; test_case[test].retval != -1; test++)
|
for (test = 0; test_case[test].retval != -1; test++)
|
||||||
if (testit (&test_case[test]))
|
if (testit (&test_case[test]))
|
||||||
|
@ -195,6 +202,16 @@ main (int argc, char *argv[])
|
||||||
++fail;
|
++fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Clean up */
|
||||||
|
for (i = 0; globfile[i]; ++i)
|
||||||
|
remove (globfile[i]);
|
||||||
|
|
||||||
|
if (cwd = NULL)
|
||||||
|
strcpy (cwd, "..");
|
||||||
|
|
||||||
|
chdir (cwd);
|
||||||
|
rmdir (tmpdir);
|
||||||
|
|
||||||
return fail != 0;
|
return fail != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ common_objpfx=$1; shift
|
||||||
elf_objpfx=$1; shift
|
elf_objpfx=$1; shift
|
||||||
rtld_installed_name=$1; shift
|
rtld_installed_name=$1; shift
|
||||||
|
|
||||||
: ${TMPDIR=/tmp}
|
: ${TMPDIR=${common_objpfx}posix}
|
||||||
testout=$TMPDIR/wordexp-test-result
|
testout=$TMPDIR/wordexp-test-result
|
||||||
|
|
||||||
failed=0
|
failed=0
|
||||||
|
|
Loading…
Reference in New Issue