diff options
author | Tom Tromey <tromey@redhat.com> | 2001-05-04 19:33:10 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2001-05-04 19:33:10 +0000 |
commit | 85595239746fad58951aa889065ce3332e4e3086 (patch) | |
tree | 8d980bd2387af88e3c4cdab68c0432e6f88b77f5 /libjava | |
parent | 1fc77d36ad837013365eede5dc038e0de896264b (diff) | |
download | gcc-85595239746fad58951aa889065ce3332e4e3086.zip gcc-85595239746fad58951aa889065ce3332e4e3086.tar.gz gcc-85595239746fad58951aa889065ce3332e4e3086.tar.bz2 |
Thread_Wait_Interrupt.xfail: New file.
* libjava.lang/Thread_Wait_Interrupt.xfail: New file.
* libjava.lang/Thread_Wait_2.xfail: New file.
* libjava.lang/Thread_Wait.xfail: New file.
* libjava.lang/Thread_Sleep.xfail: New file.
* libjava.lang/Thread_Monitor.xfail: New file.
* libjava.lang/Thread_Join.xfail: New file.
* libjava.lang/Thread_Interrupt.xfail: New file.
* libjava.lang/Thread_Alive.xfail: New file.
* lib/libjava.exp (libjava_init): Set global
libjava_uses_threads.
(test_libjava): Document `need-threads' tag.
(test_libjava_from_source): handle need-threads tag.
(test_libjava_from_javac): Likewise.
From-SVN: r41840
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/testsuite/ChangeLog | 16 | ||||
-rw-r--r-- | libjava/testsuite/lib/libjava.exp | 63 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/Thread_Alive.xfail | 1 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/Thread_Interrupt.xfail | 1 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/Thread_Join.xfail | 1 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/Thread_Monitor.xfail | 1 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/Thread_Sleep.xfail | 1 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/Thread_Wait.xfail | 1 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/Thread_Wait_2.xfail | 1 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.xfail | 1 |
10 files changed, 78 insertions, 9 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog index 5d1b051..c172cfb 100644 --- a/libjava/testsuite/ChangeLog +++ b/libjava/testsuite/ChangeLog @@ -1,5 +1,21 @@ 2001-05-03 Tom Tromey <tromey@redhat.com> + * libjava.lang/Thread_Wait_Interrupt.xfail: New file. + * libjava.lang/Thread_Wait_2.xfail: New file. + * libjava.lang/Thread_Wait.xfail: New file. + * libjava.lang/Thread_Sleep.xfail: New file. + * libjava.lang/Thread_Monitor.xfail: New file. + * libjava.lang/Thread_Join.xfail: New file. + * libjava.lang/Thread_Interrupt.xfail: New file. + * libjava.lang/Thread_Alive.xfail: New file. + * lib/libjava.exp (libjava_init): Set global + libjava_uses_threads. + (test_libjava): Document `need-threads' tag. + (test_libjava_from_source): handle need-threads tag. + (test_libjava_from_javac): Likewise. + +2001-05-03 Tom Tromey <tromey@redhat.com> + * libjava.lang/err11.xfail: Removed. 2001-04-25 Tom Tromey <tromey@redhat.com> diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp index 18a07e2..22ec065 100644 --- a/libjava/testsuite/lib/libjava.exp +++ b/libjava/testsuite/lib/libjava.exp @@ -107,11 +107,11 @@ set libjava_initialized 0 proc libjava_init { args } { global wrapper_file; global wrap_compile_flags; - global libjava_initialized + global libjava_initialized libjava_uses_threads global GCJ_UNDER_TEST global TOOL_EXECUTABLE global original_ld_library_path - global env + global env objdir if { $libjava_initialized == 1 } { return; } @@ -127,6 +127,13 @@ proc libjava_init { args } { } } + # The -B is so we find libgcj.spec. + set text [eval exec "$GCJ_UNDER_TEST -B$objdir/../ -v 2>@ stdout"] + regexp -- "Thread model: (\[^\n\]+)\n" $text ignore model + set libjava_uses_threads [expr {! ($model == "no" + || $model == "none" + || $model == "single")}] + # Always set encoding used by gcj. append GCJ_UNDER_TEST " --encoding=UTF-8" @@ -331,6 +338,15 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile set opts($item) x } + # If we need threads and we don't have them then set the `no-exec' + # flag. This is case is also handled specially later. + if {[info exists opts(need-threads)]} { + global libjava_uses_threads + if {! $libjava_uses_threads} { + set opts(no-exec) x + } + } + set errname [file rootname [file tail $srcfile]] if {! [runtest_file_p $runtests $errname]} { return @@ -376,7 +392,9 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile } fail "$errname compilation from source" - if {[info exists opts(xfail-gcj)] || ! [info exists opts(no-exec)]} { + if {[info exists opts(xfail-gcj)] + || ! [info exists opts(no-exec)] + || [info exists opts(need-threads)]} { untested "$errname execution from source compiled test" untested "$errname output from source compiled test" } @@ -388,8 +406,17 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile } pass "$errname compilation from source" - if {[info exists opts(no-exec)] - || [info exists opts(no-link)]} { + if {[info exists opts(no-exec)]} { + if {[info exists opts(need-threads)]} { + # This means we wanted to try to run it but we couldn't + # because threads aren't supported. So we have to + # generate an `untested'. + untested "$errname execution from source compiled test" + untested "$errname output from source compiled test" + } + return + } + if {[info exists opts(no-link)]} { return } @@ -464,6 +491,14 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e set opts($item) x } + # If we need threads and we don't have them then set the `no-exec' + # flag. This is case is also handled specially later. + if {[info exists opts(need-threads)]} { + global libjava_uses_threads + if {! $libjava_uses_threads} { + set opts(no-exec) x + } + } set errname [file rootname [file tail $srcfile]] if {! [runtest_file_p $runtests $errname]} { return @@ -489,7 +524,8 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e } fail "$errname byte compilation" untested "$errname compilation from bytecode" - if {! [info exists opts(no-exec)]} { + if {! [info exists opts(no-exec)] + || [info exists opts(need-threads)]} { untested "$errname execution from bytecode->native test" untested "$errname output from bytecode->native test" } @@ -521,7 +557,8 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e if {[string match "*parse error*" $main_name] || [string match "*parse error*" $class_out]} { untested "$errname compilation from bytecode" - if {! [info exists opts(no-exec)]} { + if {! [info exists opts(no-exec)] + || [info exists opts(need-threads)]} { untested "$errname execution from bytecode->native test" untested "$errname output from bytecode->native test" } @@ -599,7 +636,8 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e if { $x != "" } { verbose "target_compile failed: $x" 2 fail "$errname compilation from bytecode" - if {! [info exists opts(no-exec)]} { + if {! [info exists opts(no-exec)] + || [info exists opts(need-threads)]} { untested "$errname execution from bytecode->native test" untested "$errname output from bytecode->native test" } @@ -608,6 +646,10 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e pass "$errname compilation from bytecode" if {[info exists opts(no-exec)]} { + if {[info exists opts(need-threads)]} { + untested "$errname execution from bytecode->native test" + untested "$errname output from bytecode->native test" + } return } @@ -676,7 +718,10 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e # front end. # `xfail-byte' compilation from bytecode will fail # `xfail-exec' exec will fail -# `xfail-output' output will be wrong +# `xfail-output' +# output will be wrong +# `need-threads' +# test relies on thread support # proc test_libjava { options srcfile compile_args inpfile resultfile exec_args } { test_libjava_from_source $options $srcfile $compile_args $inpfile $resultfile $exec_args diff --git a/libjava/testsuite/libjava.lang/Thread_Alive.xfail b/libjava/testsuite/libjava.lang/Thread_Alive.xfail new file mode 100644 index 0000000..3f95317 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Alive.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Interrupt.xfail b/libjava/testsuite/libjava.lang/Thread_Interrupt.xfail new file mode 100644 index 0000000..3f95317 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Interrupt.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Join.xfail b/libjava/testsuite/libjava.lang/Thread_Join.xfail new file mode 100644 index 0000000..3f95317 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Join.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Monitor.xfail b/libjava/testsuite/libjava.lang/Thread_Monitor.xfail new file mode 100644 index 0000000..3f95317 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Monitor.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Sleep.xfail b/libjava/testsuite/libjava.lang/Thread_Sleep.xfail new file mode 100644 index 0000000..3f95317 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Sleep.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Wait.xfail b/libjava/testsuite/libjava.lang/Thread_Wait.xfail new file mode 100644 index 0000000..3f95317 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Wait_2.xfail b/libjava/testsuite/libjava.lang/Thread_Wait_2.xfail new file mode 100644 index 0000000..3f95317 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait_2.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.xfail b/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.xfail new file mode 100644 index 0000000..3f95317 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.xfail @@ -0,0 +1 @@ +need-threads |