[sgen-gray-queue] Add graystack stress test
[mono.git] / mono / tests / Makefile.am
index 2d82c664a0dacbead315ee610f70e41d8baf3f71..5a634b7e2658cd699b35675be82bb1f6f9271021 100644 (file)
@@ -1,6 +1,6 @@
 SUBDIRS = cas assemblyresolve gc-descriptors
 
-check-local: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test_platform test-process-exit test-messages rm-empty-logs
+check-local: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test-cattr-type-load test-reflection-load-with-context test_platform test-process-exit test-messages rm-empty-logs
 check-full: test-sgen check-local
 check-parallel: compile-tests check-full
 
@@ -43,6 +43,7 @@ STRESS_TESTS_SRC=     \
        monitor-stress.cs       \
        thread-stress.cs        \
        gc-stress.cs            \
+       gc-graystack-stress.cs          \
        exit-stress.cs          \
        process-stress.cs       \
        assembly-load-stress.cs
@@ -551,7 +552,8 @@ DISABLED_TESTS=                     \
        bug-348522.2.exe        \
        bug-459094.exe \
        delegate-invoke.exe \
-       $(PLATFORM_DISABLED_TESTS)
+       $(PLATFORM_DISABLED_TESTS) \
+       $(EXTRA_DISABLED_TESTS)
 
 DISABLED_TESTS_WRENCH= \
        $(DISABLED_TESTS)       \
@@ -562,7 +564,8 @@ DISABLED_TESTS_WRENCH=      \
        assemblyresolve_event3.exe \
        delegate2.exe   \
        finally_guard.exe \
-       gc-altstack.exe
+       gc-altstack.exe \
+       generic-xdomain.2.exe
 
 AOT_DISABLED_TESTS=constraints-load.exe
 
@@ -754,9 +757,10 @@ TestDriver.dll:
 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
        @failed=0; \
        passed=0; \
-       if [ "x$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+       if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
        for i in $(TESTSI_CS); do       \
-               if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i '$${disabled_tests}' '$${dump_action}' $(RUNTIME_ARGS); \
+               if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$${disabled_tests}" "$${dump_action}" $(RUNTIME_ARGS); \
                then \
                        passed=`expr $${passed} + 1`; \
                else \
@@ -769,10 +773,10 @@ test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
        @failed=0; \
        passed=0; \
-       if [ "x$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
-       if [ "x$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
+       if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
        for i in $(TESTSI_IL); do       \
-               if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$${disabled_tests}" '$${dump_action}' $(RUNTIME_ARGS); \
+               if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$${disabled_tests}" "$${dump_action}" $(RUNTIME_ARGS); \
                then \
                        passed=`expr $${passed} + 1`; \
                else \
@@ -783,24 +787,24 @@ test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
        echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) did not pass."; echo
 
 testb: $(TEST_PROG) $(TESTBS)
-       if [ "x$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
-       if [ "x$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
+       if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
        for i in $(TESTBS); do  \
-               $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i '$${disabled_tests}' '$${dump_action}' $(RUNTIME_ARGS);  \
+               $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$${disabled_tests}" "$${dump_action}" $(RUNTIME_ARGS);  \
        done
 
 runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
        @failed=0; \
        passed=0; \
        failed_tests="";\
-       if [ "x$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
-       if [ "x$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
+       if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+       if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
        rm -f testlist testlist.sorted; \
        for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do echo $${i} >> testlist; sort testlist > testlist.sorted; done; \
        for i in `cat testlist.sorted`; do \
                rm -f $${i}.so; \
                if [ x$(AOT) = x1 ]; then if echo $(AOT_DISABLED_TESTS) | grep -v -q $${i}; then $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $${i} > $${i}.aotlog 2>&1 || exit 1; fi; fi; \
-               if $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$i '$${disabled_tests}' '$${dump_action}' $(RUNTIME_ARGS); \
+               if $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$i "$${disabled_tests}" "$${dump_action}" $(RUNTIME_ARGS); \
                then \
                        passed=`expr $${passed} + 1`; \
                else \
@@ -815,7 +819,7 @@ runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQS
          echo -e "\nFailed tests:\n"; \
          for i in $${failed_tests}; do \
            echo $${i}; \
-           if [ "x$V" = "x1" ]; then \
+           if [ "x$$V" = "x1" ]; then \
              cat $${i}.stdout; \
              cat $${i}.stderr; \
            fi; \
@@ -824,8 +828,8 @@ runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQS
        fi
 
 runtest-managed: test-runner.exe $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
-       if [ "x$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
-       @$(RUNTIME) ./test-runner.exe -j a --disabled '$${disabled_tests}' $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
+       @if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
+       $(RUNTIME) ./test-runner.exe -j a --disabled "$${disabled_tests}" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
 
 testjit:
        @if test x$(M) != x; then $(MAKE) runtest-managed; else $(MAKE) runtest; fi
@@ -883,6 +887,25 @@ test-type-load: TestDriver.dll
        @echo "Testing load-exception.exe..."
        @$(RUNTIME) load-exceptions.exe > load-exceptions.exe.stdout 2> load-exceptions.exe.stderr
 
+EXTRA_DIST += custom-attr-errors.cs custom-attr-errors-lib.cs
+test-cattr-type-load: TestDriver.dll custom-attr-errors.cs custom-attr-errors-lib.cs
+       $(MCS) -D:WITH_MEMBERS /t:library $(srcdir)/custom-attr-errors-lib.cs
+       $(MCS) -r:TestDriver.dll -r:custom-attr-errors-lib.dll  $(srcdir)/custom-attr-errors.cs
+       $(MCS) /t:library $(srcdir)/custom-attr-errors-lib.cs
+       @echo "Testing custom-attribute-load-exceptions.exe..."
+       @$(RUNTIME) custom-attr-errors.exe > custom-attr-errors.exe.stdout 2> custom-attr-errors.exe.stderr
+
+EXTRA_DIST += reflection-load-with-context-lib.cs reflection-load-with-context-second-lib.cs reflection-load-with-context.cs
+test-reflection-load-with-context: TestDriver.dll reflection-load-with-context-lib.cs reflection-load-with-context-second-lib.cs reflection-load-with-context.cs
+       rm -rf reflection-load-dir
+       mkdir reflection-load-dir
+       $(MCS) /t:library $(srcdir)/reflection-load-with-context-second-lib.cs -out:reflection-load-dir/reflection-load-with-context-second-lib.dll
+       $(MCS) /t:library -r:reflection-load-dir/reflection-load-with-context-second-lib.dll $(srcdir)/reflection-load-with-context-lib.cs -out:reflection-load-dir/reflection-load-with-context-lib.dll
+       $(MCS) reflection-load-with-context.cs
+       @echo "Testing reflection-load-with-context.cs.exe..."
+       @$(RUNTIME) reflection-load-with-context.exe > reflection-load-with-context.exe.stdout 2> reflection-load-with-context.exe.stderr
+
+
 EXTRA_DIST += debug-casts.cs
 # This depends on TLS, so its not ran by default
 debug-casts:
@@ -905,6 +928,7 @@ SGEN_TESTS =        \
        sgen-cementing-stress.exe       \
        sgen-case-23400.exe     \
        sgen-new-threads-dont-join-stw.exe      \
+       gc-graystack-stress.exe \
        bug-17590.exe
 
 SGEN_CONFIGURATIONS =  \
@@ -913,26 +937,35 @@ SGEN_CONFIGURATIONS =     \
        "major=marksweep-conc|ms-conc"  \
        "major=marksweep-conc,minor=split|ms-conc-split"        \
        "minor=split|ms-split"  \
-       "minor=split,alloc-ratio=95|ms-split-95"
+       "minor=split,alloc-ratio=95|ms-split-95"        \
+       "|plain-clear-at-gc|clear-at-gc"        \
+       "major=marksweep-par|ms-par-clear-at-gc|clear-at-gc"    \
+       "major=marksweep-conc|ms-conc-clear-at-gc|clear-at-gc"  \
+       "minor=split|ms-split-clear-at-gc|clear-at-gc"
+
 
 #FIXME We should move to use SGEN_CONFIGURATIONS once sgen supports trailling commas or its argument list.
 SGEN_BRIDGE_CONFIGURATIONS =   \
        "|plain"        \
        ",major=marksweep-conc|ms-conc" \
-       ",minor=split|ms-split"
+       ",minor=split|ms-split" \
+       ",bridge-implementation=new|plain-new-bridge"   \
+       ",bridge-implementation=new,major=marksweep-conc|ms-conc-new-bridge"    \
+       ",bridge-implementation=new,minor=split|ms-split-new-bridge"
 
 sgen-regular-tests: $(SGEN_TESTS)
        @failed=0; \
        passed=0; \
        failed_tests="";\
-       if [ "x$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+       if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
        for test in $+; do      \
                echo "...$$test";       \
                for conf in $(SGEN_CONFIGURATIONS); do  \
                        name=`echo $$conf | cut -d\| -f 2`;     \
                        params=`echo $$conf | cut -d\| -f 1`;   \
+                       debug_opt=`echo $$conf | cut -d\| -f 3`;        \
                        test_name="$${test}|$${name}";  \
-                       if MONO_GC_PARAMS="$$params" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" '$${dump_action}' $(RUNTIME_ARGS); \
+                       if MONO_GC_PARAMS="$$params" MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="$$debug_opt" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" "$${dump_action}" $(RUNTIME_ARGS);     \
                        then \
                                passed=`expr $${passed} + 1`; \
                        else \
@@ -950,14 +983,14 @@ sgen-bridge-tests1: sgen-bridge.exe sgen-bridge-major-fragmentation.exe
        @failed=0; \
        passed=0; \
        failed_tests="";\
-       if [ "x$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+       if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
        for test in $+; do      \
                echo "...$$test";       \
                for conf in $(SGEN_BRIDGE_CONFIGURATIONS); do   \
                        name=`echo $$conf | cut -d\| -f 2`;     \
                        params=`echo $$conf | cut -d\| -f 1`;   \
                        test_name="$${test}|$${name}";  \
-                       if MONO_GC_PARAMS="bridge=Bridge$${params}" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" '$${dump_action}' $(RUNTIME_ARGS);  \
+                       if MONO_GC_DEBUG="bridge=Bridge$${params}" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" "$${dump_action}" $(RUNTIME_ARGS);   \
                        then \
                                passed=`expr $${passed} + 1`; \
                        else \
@@ -975,14 +1008,14 @@ sgen-bridge-tests2: sgen-bridge-xref.exe
        @failed=0; \
        passed=0; \
        failed_tests="";\
-       if [ "x$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+       if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
        for test in $+; do      \
                echo "...$$test";       \
                for conf in $(SGEN_BRIDGE_CONFIGURATIONS); do   \
                        name=`echo $$conf | cut -d\| -f 2`;     \
                        params=`echo $$conf | cut -d\| -f 1`;   \
                        test_name="$${test}|$${name}";  \
-                       if MONO_GC_PARAMS="bridge=2Bridge$${params}" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" '$${dump_action}' $(RUNTIME_ARGS); \
+                       if MONO_GC_DEBUG="bridge=2Bridge$${params}" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" "$${dump_action}" $(RUNTIME_ARGS);  \
                        then \
                                passed=`expr $${passed} + 1`; \
                        else \
@@ -1000,14 +1033,14 @@ sgen-toggleref-tests: sgen-toggleref.exe
        @failed=0; \
        passed=0; \
        failed_tests="";\
-       if [ "x$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
+       if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
        for test in $+; do      \
                echo "...$$test";       \
                for conf in $(SGEN_CONFIGURATIONS); do  \
                        name=`echo $$conf | cut -d\| -f 2`;     \
                        params=`echo $$conf | cut -d\| -f 1`;   \
                        test_name="$${test}|$${name}";  \
-                       if MONO_GC_PARAMS="toggleref-test,$$params" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" '$${dump_action}' $(RUNTIME_ARGS);  \
+                       if MONO_GC_PARAMS="toggleref-test,$$params" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" "$${dump_action}" $(RUNTIME_ARGS);  \
                        then \
                                passed=`expr $${passed} + 1`; \
                        else \
@@ -1217,7 +1250,7 @@ GSHARED_TESTS = \
                generic-sealed-virtual.2.exe generic-system-arrays.2.exe        \
                generic-stack-traces.2.exe generic-stack-traces2.2.exe          \
                bug-472600.2.exe bug-473482.2.exe bug-473999.2.exe              \
-               bug-479763.2.exe generic-xdomain.2.exe                          \
+               bug-479763.2.exe                                \
                generic-type-load-exception.2.exe bug-616463.exe        \
                bug-1147.exe