diff options
Diffstat (limited to 'winsup/testsuite')
-rw-r--r-- | winsup/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | winsup/testsuite/winsup.api/ltp/symlink01.c | 11 | ||||
-rw-r--r-- | winsup/testsuite/winsup.api/winsup.exp | 13 |
3 files changed, 28 insertions, 5 deletions
diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog index 5688f503e..b8e2cc6c4 100644 --- a/winsup/testsuite/ChangeLog +++ b/winsup/testsuite/ChangeLog @@ -1,5 +1,14 @@ 2001-09-13 Egor Duda <deo@logos-m.ru> + * winsup.api/winsup.exp: Run only selected test if environment + variable CYGWIN_TESTSUITE_TESTS is set. Use its value as regular + expression to filter test names. + * winsup.api/ltp/symlink01.c (creat_path_max): Provide explicit + buffer to getcwd to conform to standards and avoid memory leak. + (do_chdir): Ditto. + +2001-09-13 Egor Duda <deo@logos-m.ru> + * libltp/lib/tst_sig.c: Pass SIGSEGV to application to consider whether it's expected or not. * winsup.api/known_bugs.tcl: lseek10 is known to fail because mknod diff --git a/winsup/testsuite/winsup.api/ltp/symlink01.c b/winsup/testsuite/winsup.api/ltp/symlink01.c index d0ad0d5ac..cd0b56089 100644 --- a/winsup/testsuite/winsup.api/ltp/symlink01.c +++ b/winsup/testsuite/winsup.api/ltp/symlink01.c @@ -818,9 +818,10 @@ creat_path_max(path1, path2, path3) char *path1, *path2, *path3; { int ctr, to_go, size, whole_chunks; - char *cwd, *getcwd(); + char buf [PATH_MAX]; + char *cwd; - if ((cwd = getcwd((char *)NULL, 64)) == NULL) + if ((cwd = getcwd(buf, sizeof (buf))) == NULL) { TEST_RESULT=TBROK; sprintf(test_msg, @@ -828,7 +829,6 @@ char *path1, *path2, *path3; path1, path2, path3); return(0); } - cwd = getcwd((char *)NULL, 64); size = strlen(cwd); to_go = PATH_MAX - size; @@ -1583,7 +1583,8 @@ struct all_test_cases *tc_ptr; Buffer, "symbolic link which which pointed at object"); else { - char *cwd, *getcwd(); + char buf [PATH_MAX]; + char *cwd; char expected_location[PATH_MAX]; /* * Build expected current directory position @@ -1592,7 +1593,7 @@ struct all_test_cases *tc_ptr; strcat(expected_location, "/"); strcat(expected_location, tc_ptr->fn_arg[2]); - if ((cwd = getcwd((char *)NULL, 64)) == NULL) + if ((cwd = getcwd(buf, sizeof (buf))) == NULL) tst_resm(TFAIL, "getcwd(3) FAILURE"); else if (strcmp(cwd, expected_location) == 0) if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST ) diff --git a/winsup/testsuite/winsup.api/winsup.exp b/winsup/testsuite/winsup.api/winsup.exp index 1f0d9e7d5..6fb566335 100644 --- a/winsup/testsuite/winsup.api/winsup.exp +++ b/winsup/testsuite/winsup.api/winsup.exp @@ -13,6 +13,12 @@ set add_libs "" set ltp_includes "-I$ltp_includes" set ltp_libs "$rootme/libltp.a" +set test_filter "" + +if { [info exists env(CYGWIN_TESTSUITE_TESTS)] } { + set test_filter "$env(CYGWIN_TESTSUITE_TESTS)" +} + proc ws_spawn {cmd args} { global rv verbose "running $cmd\n" @@ -20,7 +26,14 @@ proc ws_spawn {cmd args} { verbose send "catchCode = $rv\n" } +verbose "Filter: $test_filter" + foreach src [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.c] { + if { $test_filter != "" && ! [regexp $test_filter $src] } { + verbose -log "Skipping $src" + continue + } + regsub "^$srcdir/$subdir/" $src "" testcase regsub ".c$" $testcase "" base regsub ".*/" $base "" basename |