From ed6d0ee3237fe6ddc8fe44e76442b58b48c4e904 Mon Sep 17 00:00:00 2001 From: Vladimir Sadov Date: Wed, 10 Jul 2019 20:33:58 -0700 Subject: refresh GC reliability tests (#25622) * refresh GC reliability tests * Update stress instructions (PR feedback) --- tests/scripts/run-gc-reliability-framework.sh | 28 ++++++++++++++++++++-- .../GC/Stress/Framework/ReliabilityFramework.cs | 10 ++++---- .../Stress/Framework/ReliabilityFramework.csproj | 2 +- tests/src/GC/Stress/stress_run_readme.txt | 9 +++++-- 4 files changed, 39 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/scripts/run-gc-reliability-framework.sh b/tests/scripts/run-gc-reliability-framework.sh index d6b8f0385b..f83170c51b 100755 --- a/tests/scripts/run-gc-reliability-framework.sh +++ b/tests/scripts/run-gc-reliability-framework.sh @@ -1,7 +1,31 @@ #!/bin/bash -export CORE_ROOT=`pwd`/bin/tests/Windows_NT.$1.$2/Tests/coreoverlay -FRAMEWORK_DIR=`pwd`/bin/tests/Windows_NT.$1.$2/GC/Stress/Framework/ReliabilityFramework +OSName=$(uname -s) +case $OSName in + Darwin) + OS=OSX + ;; + + FreeBSD) + OS=FreeBSD + ;; + + Linux) + OS=Linux + ;; + + NetBSD) + OS=NetBSD + ;; + + *) + echo "Unsupported OS $OSName detected, configuring as if for Linux" + OS=Linux + ;; +esac + +export CORE_ROOT=`pwd`/bin/tests/$OSName.$1.$2/Tests/Core_Root +FRAMEWORK_DIR=`pwd`/bin/tests/$OSName.$1.$2/GC/Stress/Framework/ReliabilityFramework $CORE_ROOT/corerun $FRAMEWORK_DIR/ReliabilityFramework.exe $FRAMEWORK_DIR/testmix_gc.config EXIT_CODE=$? if [ $EXIT_CODE -eq 100 ] diff --git a/tests/src/GC/Stress/Framework/ReliabilityFramework.cs b/tests/src/GC/Stress/Framework/ReliabilityFramework.cs index b3eb0e74fd..197cbc415e 100644 --- a/tests/src/GC/Stress/Framework/ReliabilityFramework.cs +++ b/tests/src/GC/Stress/Framework/ReliabilityFramework.cs @@ -167,7 +167,7 @@ public class ReliabilityFramework foreach (string arg in args) { rf._logger.WriteToInstrumentationLog(null, LoggingLevels.StartupShutdown, String.Format("Argument: {0}", arg)); - if (arg[0] == '/' || arg[0] == '-') + if (arg[0] == '-') { if (String.Compare(arg.Substring(1), "replay", true) == 0) { @@ -207,14 +207,14 @@ public class ReliabilityFramework } if (!okToContinue) { - Console.WriteLine("\r\nWhidbey Host Interface Reliability Harness\r\n"); + Console.WriteLine("\r\nHost Interface Reliability Harness\r\n"); Console.WriteLine("Usage: ReliabiltityFramework [options] "); Console.WriteLine(""); Console.WriteLine("Available options: "); Console.WriteLine(""); - Console.WriteLine(" /replay - Replay from log file"); - Console.WriteLine(" /{0}: - Comma delimited list of tests to run (no spaces)", sTests); - Console.WriteLine(" /{0}: - Random Number seed for replays", sSeed); + Console.WriteLine(" -replay - Replay from log file"); + Console.WriteLine(" -{0}: - Comma delimited list of tests to run (no spaces)", sTests); + Console.WriteLine(" -{0}: - Random Number seed for replays", sSeed); rf._logger.WriteToInstrumentationLog(null, LoggingLevels.StartupShutdown, "Not ok to continue."); #if PROJECTK_BUILD diff --git a/tests/src/GC/Stress/Framework/ReliabilityFramework.csproj b/tests/src/GC/Stress/Framework/ReliabilityFramework.csproj index 91921abba7..c772c9b3e5 100644 --- a/tests/src/GC/Stress/Framework/ReliabilityFramework.csproj +++ b/tests/src/GC/Stress/Framework/ReliabilityFramework.csproj @@ -12,7 +12,7 @@ ..\..\ BuildOnly false - 1 + 0 $(DefineConstants);STATIC;PROJECTK_BUILD diff --git a/tests/src/GC/Stress/stress_run_readme.txt b/tests/src/GC/Stress/stress_run_readme.txt index 7a2cf2b1ab..f0efa71073 100644 --- a/tests/src/GC/Stress/stress_run_readme.txt +++ b/tests/src/GC/Stress/stress_run_readme.txt @@ -18,7 +18,12 @@ The stress framework is built from \tests\src\GC\Stress\Framework The tests are built from \tests\src\GC\Stress\Tests -The config is at NDP\clr\tests\src\GC\Stress\testmix_gc.config, this will be copied to the output folder of Framework +The config is at \tests\src\GC\Stress\testmix_gc.config, this will be copied to the output folder of Framework + +The easiest way to build the Framework+Tests is by building all tests - "\build_test[.bat|.sh]" + +Sometimes there is a need (after initial build) to rebuild Framework+Tests. For example when modifying the Framework to add a new scenario or when investigating a failure. +In such case it is possible to go directly into the the Framework directory and build manually- Ex: "dotnet build -c:debug". 3. Running stress @@ -30,7 +35,7 @@ To run stress: (or if you copied testmix_gc.config somewhere else you need to tell it so, eg, c:\TestConfigs\testmix_gc.config) -We recommand to run it for 48 hours (see the comments below on maximumExecutionTime in test config for more detail). +We recommend to run it for 48 hours (see the comments below on maximumExecutionTime in test config for more detail). 4. Test config -- cgit v1.2.3