Fix a few syntax issues in shell scripts (#62102)
authorAdeel Mujahid <3840695+am11@users.noreply.github.com>
Tue, 30 Nov 2021 23:32:39 +0000 (01:32 +0200)
committerGitHub <noreply@github.com>
Tue, 30 Nov 2021 23:32:39 +0000 (17:32 -0600)
* Fix a few syntax issues in shell scripts

* Cleanup trailing whitespace in changed files
```sh
# git remote add dotnet https://github.com/dotnet/runtime && git pull --rebase dotnet main

if uname 2>/devnull | grep -q Darwin; then
    space=" "
fi

git show --name-only --pretty="" HEAD...dotnet/main |\
    xargs -I{} sh -c "test -f {} && sed -i$space'' 's/[[:space:]]*$//' {}"
```

* Address CR feedback

104 files changed:
eng/build.sh
eng/formatting/format.sh
eng/install-native-dependencies.sh
eng/native/build-commons.sh
eng/native/init-distro-rid.sh
eng/pipelines/evaluate-changed-paths.sh
eng/run-test.sh
eng/testing/AndroidRunnerTemplate.sh
eng/testing/AppleRunnerTemplate.sh
eng/testing/RunnerTemplate.sh
eng/testing/WasmRunnerAOTTemplate.sh
eng/testing/WasmRunnerTemplate.sh
eng/testing/performance/performance-setup.sh
src/coreclr/enablesanitizers.sh
src/coreclr/pal/tests/palsuite/runpaltests.sh
src/coreclr/pal/tools/smarty.sh
src/installer/tests/scripts/linux-test/RuntimeInstallation.sh
src/installer/tests/scripts/linux-test/SdkInstallation.sh
src/installer/tests/scripts/linux-test/VerificationTestOnDocker.sh
src/libraries/Common/tests/System/Net/EnterpriseTests/setup/apacheweb/run.sh
src/libraries/Common/tests/System/Net/EnterpriseTests/setup/apacheweb/setup-digest.sh
src/libraries/Common/tests/System/Net/EnterpriseTests/setup/apacheweb/setup-pdc.sh
src/libraries/System.Net.Http/tests/StressTests/HttpStress/run-docker-compose.sh
src/libraries/System.Net.Security/tests/StressTests/SslStress/run-docker-compose.sh
src/mono/mono/tests/verifier/make_access_test.sh
src/mono/mono/tests/verifier/make_bad_op_test.sh
src/mono/mono/tests/verifier/make_bin_test.sh
src/mono/mono/tests/verifier/make_bool_branch_test.sh
src/mono/mono/tests/verifier/make_boxed_genarg_test.sh
src/mono/mono/tests/verifier/make_branch_test.sh
src/mono/mono/tests/verifier/make_call_test.sh
src/mono/mono/tests/verifier/make_cast_test.sh
src/mono/mono/tests/verifier/make_cmmp_test.sh
src/mono/mono/tests/verifier/make_constrained_test.sh
src/mono/mono/tests/verifier/make_cpobj_test.sh
src/mono/mono/tests/verifier/make_cross_nested_access_test.sh
src/mono/mono/tests/verifier/make_ctor_test.sh
src/mono/mono/tests/verifier/make_delegate_compat_test.sh
src/mono/mono/tests/verifier/make_delegate_test.sh
src/mono/mono/tests/verifier/make_double_nesting_test.sh
src/mono/mono/tests/verifier/make_endfilter_test.sh
src/mono/mono/tests/verifier/make_endfinally_test.sh
src/mono/mono/tests/verifier/make_exception_branch_test.sh
src/mono/mono/tests/verifier/make_exception_overlap_test.sh
src/mono/mono/tests/verifier/make_field_store_test.sh
src/mono/mono/tests/verifier/make_field_valuetype_test.sh
src/mono/mono/tests/verifier/make_generic_argument_constraints_test.sh
src/mono/mono/tests/verifier/make_il_overflow_test.sh
src/mono/mono/tests/verifier/make_initobj_test.sh
src/mono/mono/tests/verifier/make_invalid_ret_type.sh
src/mono/mono/tests/verifier/make_ldelem_test.sh
src/mono/mono/tests/verifier/make_ldelema_test.sh
src/mono/mono/tests/verifier/make_ldftn_test.sh
src/mono/mono/tests/verifier/make_ldlen_test.sh
src/mono/mono/tests/verifier/make_ldobj_test.sh
src/mono/mono/tests/verifier/make_ldtoken_test.sh
src/mono/mono/tests/verifier/make_ldvirtftn_test.sh
src/mono/mono/tests/verifier/make_leave_test.sh
src/mono/mono/tests/verifier/make_load_indirect_test.sh
src/mono/mono/tests/verifier/make_load_test.sh
src/mono/mono/tests/verifier/make_localloc_test.sh
src/mono/mono/tests/verifier/make_method_constraint_test.sh
src/mono/mono/tests/verifier/make_mkrefany.sh
src/mono/mono/tests/verifier/make_nested_access_test.sh
src/mono/mono/tests/verifier/make_newarr_test.sh
src/mono/mono/tests/verifier/make_newobj_test.sh
src/mono/mono/tests/verifier/make_obj_store_test.sh
src/mono/mono/tests/verifier/make_overlapped_test.sh
src/mono/mono/tests/verifier/make_prefix_test.sh
src/mono/mono/tests/verifier/make_ret_test.sh
src/mono/mono/tests/verifier/make_rethrow_test.sh
src/mono/mono/tests/verifier/make_self_nested_test.sh
src/mono/mono/tests/verifier/make_sizeof_test.sh
src/mono/mono/tests/verifier/make_stack_0_pop_test.sh
src/mono/mono/tests/verifier/make_stack_0_test.sh
src/mono/mono/tests/verifier/make_stack_1_pop_test.sh
src/mono/mono/tests/verifier/make_stack_merge_test.sh
src/mono/mono/tests/verifier/make_stelem_test.sh
src/mono/mono/tests/verifier/make_stobj_test.sh
src/mono/mono/tests/verifier/make_store_indirect_test.sh
src/mono/mono/tests/verifier/make_store_test.sh
src/mono/mono/tests/verifier/make_switch_test.sh
src/mono/mono/tests/verifier/make_tail_call_test.sh
src/mono/mono/tests/verifier/make_tests.sh
src/mono/mono/tests/verifier/make_throw_test.sh
src/mono/mono/tests/verifier/make_type_constraint_test.sh
src/mono/mono/tests/verifier/make_type_visibility_test.sh
src/mono/mono/tests/verifier/make_unary_test.sh
src/mono/mono/tests/verifier/make_unbox_any_test.sh
src/mono/mono/tests/verifier/make_unbox_test.sh
src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.sh
src/tests/Common/scripts/arm32_ci_script.sh
src/tests/Common/scripts/arm32_ci_test.sh
src/tests/Common/scripts/bringup_runtest.sh
src/tests/Common/scripts/build_illink.sh
src/tests/Common/scripts/run-corefx-tests.sh
src/tests/Common/scripts/run-gc-reliability-framework.sh
src/tests/Common/scripts/runincontext.sh
src/tests/Common/scripts/tieringtest.sh
src/tests/Common/scripts/x86_ci_script.sh
src/tests/JIT/superpmi/collect_alltests.sh
src/tests/JIT/superpmi/runtests.sh
src/tests/run.sh
src/tests/runparallel.sh

index b7e30eb..f1ef595 100755 (executable)
@@ -166,7 +166,7 @@ while [[ $# > 0 ]]; do
   opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
 
   if [[ $firstArgumentChecked -eq 0 && $opt =~ ^[a-zA-Z.+]+$ ]]; then
-    if [ $opt == "help" ]; then
+    if [[ "$opt" == "help" ]]; then
       showSubsetHelp
       exit 0
     fi
@@ -190,7 +190,7 @@ while [[ $# > 0 ]]; do
         exit 0
       else
         passedSubset="$(echo "$2" | tr "[:upper:]" "[:lower:]")"
-        if [ $passedSubset == "help" ]; then
+        if [[ "$passedSubset" == "help" ]]; then
           showSubsetHelp
           exit 0
         fi
@@ -461,7 +461,7 @@ if [ ${#actInt[@]} -eq 0 ]; then
     arguments="-restore -build $arguments"
 fi
 
-if [ "$os" = "Browser" ] && [ "$arch" != "wasm" ]; then
+if [[ "$os" == "Browser" && "$arch" != "wasm" ]]; then
     # override default arch for Browser, we only support wasm
     arch=wasm
 fi
index 5a9edf4..eb4908c 100644 (file)
@@ -7,14 +7,14 @@ MANAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM "*.cs" "*.vb" |
 
 exec 1>&2
 
-if [[ -n "$NATIVE_FILES" ]]; then
+if [ -n "$NATIVE_FILES" ]; then
     # Format all selected files
     echo "$NATIVE_FILES" | cat | xargs | sed -e 's/ /,/g' | xargs "./artifacts/tools/clang-format" -style=file -i
 
     # Add back the modified files to staging
     echo "$NATIVE_FILES" | xargs git add
 fi
-if [[ -n "$MANAGED_FILES" ]]; then
+if [ -n "$MANAGED_FILES" ]; then
     # Format all selected files
     echo "$MANAGED_FILES" | cat | xargs | sed -e 's/ /,/g' | dotnet format --include
 
@@ -22,5 +22,4 @@ if [[ -n "$MANAGED_FILES" ]]; then
     echo "$MANAGED_FILES" | xargs git add
 fi
 
-
 exit 0
index a29dfdf..0b6a8a0 100755 (executable)
@@ -22,7 +22,7 @@ if [ "$1" = "Linux" ]; then
     if [ "$?" != "0" ]; then
         exit 1;
     fi
-elif [ "$1" = "MacCatalyst" ] || [ "$1" = "OSX" ] || [ "$1" = "tvOS" ] || [ "$1" = "iOS" ]; then
+elif [[ "$1" == "MacCatalyst" || "$1" == "OSX" || "$1" == "tvOS" || "$1" == "iOS" ]]; then
     engdir=$(dirname "${BASH_SOURCE[0]}")
 
     echo "Installed xcode version: `xcode-select -p`"
index 608d06e..4aebd45 100755 (executable)
@@ -454,7 +454,7 @@ if [[ "$__CrossBuild" == 1 ]]; then
     CROSSCOMPILE=1
     export CROSSCOMPILE
     # Darwin that doesn't use rootfs
-    if [[ ! -n "$ROOTFS_DIR" && "$platform" != "Darwin" ]]; then
+    if [[ -z "$ROOTFS_DIR" && "$platform" != "Darwin" ]]; then
         ROOTFS_DIR="$__RepoRootDir/.tools/rootfs/$__BuildArch"
         export ROOTFS_DIR
     fi
index 5f6b194..97fd647 100644 (file)
@@ -41,7 +41,7 @@ initNonPortableDistroRid()
             # We have forced __PortableBuild=0. This is because -portablebuld
             # has been passed as false.
             if (( isPortable == 0 )); then
-                if [ "${ID}" = "rhel" ] || [ "${ID}" = "rocky" ]; then
+                if [[ "${ID}" == "rhel" || "${ID}" == "rocky" ]]; then
                     # remove the last version digit
                     VERSION_ID="${VERSION_ID%.*}"
                 fi
index 76bc06d..ee9ae31 100755 (executable)
@@ -141,7 +141,7 @@ probePaths() {
     echo "******* Probing $_subset exclude paths *******";
     for _path in "${exclude_paths[@]}"; do
       echo "$_path"
-      if [[ "$exclude_path_string" == "" ]]; then
+      if [[ -z "$exclude_path_string" ]]; then
         exclude_path_string=":!$_path"
       else
         exclude_path_string="$exclude_path_string :!$_path"
@@ -159,7 +159,7 @@ probePaths() {
     echo "******* Probing $_subset include paths *******";
     for _path in "${include_paths[@]}"; do
       echo "$_path"
-      if [[ "$include_path_string" == "" ]]; then
+      if [[ -z "$include_path_string" ]]; then
         include_path_string=":$_path"
       else
         include_path_string="$include_path_string :$_path"
index e5cf6a3..64474cc 100644 (file)
@@ -236,26 +236,22 @@ done
 
 # Compute paths to the binaries if they haven't already been computed
 
-if [ -z "$Runtime" ]
-then
+if [[ -z "$Runtime" ]]; then
     Runtime="$ProjectRoot/artifacts/bin/testhost/netcoreapp-$OS-$Configuration-$__Arch"
 fi
 
-if [ -z "$CoreFxTests" ]
-then
+if [[ -z "$CoreFxTests" ]]; then
     CoreFxTests="$ProjectRoot/artifacts/bin"
 fi
 
 # Check parameters up front for valid values:
 
-if [ "$Configuration" != "Debug" ] && [ "$Configuration" != "Release" ]
-then
+if [[ "$Configuration" != "Debug" && "$Configuration" != "Release" ]]; then
     echo "error: Configuration should be Debug or Release"
     exit 1
 fi
 
-if [ "$OS" != "FreeBSD" ] && [ "$OS" != "Linux" ] && [ "$OS" != "NetBSD" ] && [ "$OS" != "illumos" ] && [ "$OS" != "Solaris" ]
-then
+if [[ "$OS" != "FreeBSD" && "$OS" != "Linux" && "$OS" != "NetBSD" && "$OS" != "illumos" && "$OS" != "Solaris" ]]; then
     echo "error: OS should be FreeBSD, Linux, NetBSD or Linux"
     exit 1
 fi
@@ -263,8 +259,7 @@ fi
 export CORECLR_SERVER_GC="$serverGC"
 export PAL_OUTPUTDEBUGSTRING="1"
 
-if [ -z "$LANG" ]
-then
+if [[ -z "$LANG" ]]; then
     export LANG="en_US.UTF-8"
 fi
 
@@ -281,29 +276,26 @@ ensure_binaries_are_present
 TestsFailed=0
 numberOfProcesses=0
 
-if [ $RunTestSequential -eq 1 ]
-then
+if [[ $RunTestSequential -eq 1 ]]; then
     maxProcesses=1;
 else
     platform="$(uname)"
-    if [ "$platform" = "FreeBSD" ]; then
+    if [[ "$platform" == "FreeBSD" ]]; then
       maxProcesses=$(($(sysctl -n hw.ncpu)+1))
-    if [ "$platform" = "NetBSD" ] || [ "$platform" = "SunOS" ] ; then
+    if [[ "$platform" == "NetBSD" || "$platform" == "SunOS" ]]; then
       maxProcesses=$(($(getconf NPROCESSORS_ONLN)+1))
     else
       maxProcesses=$(($(getconf _NPROCESSORS_ONLN)+1))
     fi
 fi
 
-if [ -n "$TestDirFile" ] || [ -n "$TestDir" ]
-then
+if [[ -n "$TestDirFile" || -n "$TestDir" ]]; then
     run_selected_tests
 else
     run_all_tests "$CoreFxTests/tests/"*.Tests
 fi
 
-if [ "$TestsFailed" -gt 0 ]
-then
+if [[ "$TestsFailed" -gt 0 ]]; then
     echo "$TestsFailed test(s) failed"
 else
     echo "All tests passed."
index 3dab96f..d981d24 100644 (file)
@@ -9,7 +9,7 @@ TARGET_OS=$3
 TEST_NAME=$4
 XHARNESS_OUT="$EXECUTION_DIR/xharness-output"
 
-if [ -n "$5" ]; then
+if [[ -n "$5" ]]; then
     ADDITIONAL_ARGS=${@:5}
 fi
 
@@ -27,7 +27,7 @@ while true; do
     fi
 done
 
-if [ ! -z "$XHARNESS_CLI_PATH" ]; then
+if [[ -n "$XHARNESS_CLI_PATH" ]]; then
     # Allow overriding the path to the XHarness CLI DLL,
     # we need to call it directly via dotnet exec
     HARNESS_RUNNER="dotnet exec $XHARNESS_CLI_PATH"
index 0ebff54..8f66672 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/env bash
 
 # NOTE: this script is only used locally, on CI we use the Helix SDK from arcade
 
@@ -54,7 +54,7 @@ while true; do
     fi
 done
 
-if [ ! -z "$XHARNESS_CLI_PATH" ]; then
+if [[ -n "$XHARNESS_CLI_PATH" ]]; then
     # Allow overriding the path to the XHarness CLI DLL,
     # we need to call it directly via dotnet exec
     HARNESS_RUNNER="dotnet exec $XHARNESS_CLI_PATH"
index 4770323..bfaa743 100644 (file)
@@ -39,7 +39,7 @@ while [[ $# > 0 ]]; do
   shift
 done
 
-if [ "$RUNTIME_PATH" == "" ]; then
+if [[ -z "$RUNTIME_PATH" ]]; then
   echo "error: -r|--runtime-path argument is required."
   usage
   exit -1
@@ -127,7 +127,7 @@ function copy_core_file_to_temp_location {
 }
 
 # ========================= BEGIN Core File Setup ============================
-if [ "$(uname -s)" == "Darwin" ]; then
+if [[ "$(uname -s)" == "Darwin" ]]; then
   # On OS X, we will enable core dump generation only if there are no core
   # files already in /cores/ at this point. This is being done to prevent
   # inadvertently flooding the CI machines with dumps.
@@ -135,7 +135,7 @@ if [ "$(uname -s)" == "Darwin" ]; then
     ulimit -c unlimited
   fi
 
-elif [ "$(uname -s)" == "Linux" ]; then
+elif [[ "$(uname -s)" == "Linux" ]]; then
   # On Linux, we'll enable core file generation unconditionally, and if a dump
   # is generated, we will print some useful information from it and delete the
   # dump immediately.
@@ -163,7 +163,7 @@ test_exitcode=$?
 popd
 echo ----- end $(date) ----- exit code $test_exitcode ----------------------------------------------------------
 
-if [ "${exitcode_list[$test_exitcode]}" != "" ]; then
+if [[ -n "${exitcode_list[$test_exitcode]}" ]]; then
   echo exit code $test_exitcode means ${exitcode_list[$test_exitcode]}
 fi
 # ========================= END Test Execution ===============================
@@ -200,11 +200,11 @@ if [[ "$(uname -s)" == "Linux" && $test_exitcode -ne 0 ]]; then
   # or "core.<PID>" by default. We read /proc/sys/kernel/core_uses_pid to
   # determine which it is.
   core_name_uses_pid=0
-  if [ -e /proc/sys/kernel/core_uses_pid ] && [ "1" == $(cat /proc/sys/kernel/core_uses_pid) ]; then
+  if [[ -e /proc/sys/kernel/core_uses_pid && "1" == $(cat /proc/sys/kernel/core_uses_pid) ]]; then
     core_name_uses_pid=1
   fi
 
-  if [ $core_name_uses_pid == "1" ]; then
+  if [[ "$core_name_uses_pid" == "1" ]]; then
     # We don't know what the PID of the process was, so let's look at all core
     # files whose name matches core.NUMBER
     echo Looking for files matching core.* ...
@@ -224,7 +224,7 @@ popd >/dev/null
 # ======================== END Core File Inspection ==========================
 # The helix work item should not exit with non-zero if tests ran and produced results
 # The special console runner for runtime returns 1 when tests fail
-if [ "$test_exitcode" == "1" ]; then
+if [[ "$test_exitcode" == "1" ]]; then
   if [ -n "$HELIX_WORKITEM_PAYLOAD" ]; then
     exit 0
   fi
index af3e499..4aa271b 100644 (file)
@@ -11,7 +11,7 @@ else
        XHARNESS_OUT="$HELIX_WORKITEM_UPLOAD_ROOT/xharness-output"
 fi
 
-if [ ! -z "$XHARNESS_CLI_PATH" ]; then
+if [[ -n "$XHARNESS_CLI_PATH" ]]; then
        # When running in CI, we only have the .NET runtime available
        # We need to call the XHarness CLI DLL directly via dotnet exec
        HARNESS_RUNNER="dotnet exec $XHARNESS_CLI_PATH"
@@ -19,7 +19,7 @@ else
        HARNESS_RUNNER="dotnet xharness"
 fi
 
-if [ "$SCENARIO" == "WasmTestOnBrowser" ]; then
+if [[ "$SCENARIO" == "WasmTestOnBrowser" ]]; then
        XHARNESS_COMMAND="test-browser"
 elif [ -z "$XHARNESS_COMMAND" ]; then
        XHARNESS_COMMAND="test"
index 8997e22..412c337 100644 (file)
@@ -5,13 +5,13 @@ SCENARIO=$3
 
 cd $EXECUTION_DIR
 
-if [ -z "$HELIX_WORKITEM_UPLOAD_ROOT" ]; then
+if [[ -z "$HELIX_WORKITEM_UPLOAD_ROOT" ]]; then
        XHARNESS_OUT="$EXECUTION_DIR/xharness-output"
 else
        XHARNESS_OUT="$HELIX_WORKITEM_UPLOAD_ROOT/xharness-output"
 fi
 
-if [ ! -z "$XHARNESS_CLI_PATH" ]; then
+if [[ -n "$XHARNESS_CLI_PATH" ]]; then
        # When running in CI, we only have the .NET runtime available
        # We need to call the XHarness CLI DLL directly via dotnet exec
        HARNESS_RUNNER="dotnet exec $XHARNESS_CLI_PATH"
@@ -19,9 +19,9 @@ else
        HARNESS_RUNNER="dotnet xharness"
 fi
 
-if [ "$SCENARIO" == "WasmTestOnBrowser" ]; then
+if [[ "$SCENARIO" == "WasmTestOnBrowser" ]]; then
        XHARNESS_COMMAND="test-browser"
-elif [ -z "$XHARNESS_COMMAND" ]; then
+elif [[ -z "$XHARNESS_COMMAND" ]]; then
        XHARNESS_COMMAND="test"
 fi
 
index cffd9ca..b58a031 100755 (executable)
@@ -162,7 +162,7 @@ while (($# > 0)); do
       echo "  --internal                     If the benchmarks are running as an official job."
       echo "  --monodotnet                   Pass the path to the mono dotnet for mono performance testing."
       echo "  --wasm                         Path to the unpacked wasm runtime pack."
-      echo "  --wasmaot                      Indicate wasm aot"  
+      echo "  --wasmaot                      Indicate wasm aot"
       echo "  --latestdotnet                 --dotnet-versions will not be specified. --dotnet-versions defaults to LKG version in global.json "
       echo "  --alpine                       Set for runs on Alpine"
       echo ""
@@ -171,7 +171,7 @@ while (($# > 0)); do
   esac
 done
 
-if [ "$repository" == "dotnet/performance" ] || [ "$repository" == "dotnet-performance" ]; then
+if [[ "$repository" == "dotnet/performance" || "$repository" == "dotnet-performance" ]]; then
     run_from_perf_repo=true
 fi
 
@@ -202,38 +202,38 @@ if [[ "$internal" == true ]]; then
     helix_source_prefix="official"
     creator=
     extra_benchmark_dotnet_arguments=
-    
-    if [[ "$architecture" = "arm64" ]]; then
+
+    if [[ "$architecture" == "arm64" ]]; then
         queue=Ubuntu.1804.Arm64.Perf
     else
-        if [[ "$logical_machine" = "perfowl" ]]; then
+        if [[ "$logical_machine" == "perfowl" ]]; then
             queue=Ubuntu.1804.Amd64.Owl.Perf
         else
             queue=Ubuntu.1804.Amd64.Tiger.Perf
         fi
     fi
 
-    if [[ "$alpine" = "true" ]]; then
+    if [[ "$alpine" == "true" ]]; then
         queue=alpine.amd64.tiger.perf
     fi
 else
-    if [[ "$architecture" = "arm64" ]]; then
+    if [[ "$architecture" == "arm64" ]]; then
         queue=ubuntu.1804.armarch.open
     else
         queue=Ubuntu.1804.Amd64.Open
     fi
 
-    if [[ "$alpine" = "true" ]]; then
+    if [[ "$alpine" == "true" ]]; then
         queue=alpine.amd64.tiger.perf
     fi
 fi
 
-if [[ "$mono_dotnet" != "" ]] && [[ "$monointerpreter" == "false" ]]; then
+if [[ -n "$mono_dotnet" && "$monointerpreter" == "false" ]]; then
     configurations="$configurations LLVM=$llvm MonoInterpreter=$monointerpreter MonoAOT=$monoaot"
     extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --category-exclusion-filter NoMono"
 fi
 
-if [[ "$wasm_runtime_loc" != "" ]]; then
+if [[ -n "$wasm_runtime_loc" ]]; then
     if [[ "$wasmaot" == "true" ]]; then
         configurations="CompilationMode=wasm AOT=true RunKind=$kind"
     else
@@ -245,7 +245,7 @@ if [[ "$wasm_runtime_loc" != "" ]]; then
     extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --category-exclusion-filter NoInterpreter NoWASM NoMono"
 fi
 
-if [[ "$mono_dotnet" != "" ]] && [[ "$monointerpreter" == "true" ]]; then
+if [[ -n "$mono_dotnet" && "$monointerpreter" == "true" ]]; then
     configurations="$configurations LLVM=$llvm MonoInterpreter=$monointerpreter MonoAOT=$monoaot"
     extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --category-exclusion-filter NoInterpreter NoMono"
 fi
@@ -262,7 +262,7 @@ fi
 common_setup_arguments="--channel $cleaned_branch_name --queue $queue --build-number $build_number --build-configs $configurations --architecture $architecture"
 setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments"
 
-if [[ "$run_from_perf_repo" = true ]]; then
+if [[ "$run_from_perf_repo" == true ]]; then
     payload_directory=
     workitem_directory=$source_directory
     performance_directory=$workitem_directory
@@ -276,7 +276,7 @@ else
     mv $docs_directory $workitem_directory
 fi
 
-if [[ "$wasm_runtime_loc" != "" ]]; then
+if [[ -n "$wasm_runtime_loc" ]]; then
     using_wasm=true
     wasm_dotnet_path=$payload_directory/dotnet-wasm
     mv $wasm_runtime_loc $wasm_dotnet_path
@@ -291,13 +291,13 @@ if [[ "$wasm_runtime_loc" != "" ]]; then
     rsync -a --progress $wasm_dotnet_path/artifacts/BrowserWasm/artifacts/* $wasm_dotnet_path/artifacts
     rm -r $wasm_dotnet_path/artifacts/BrowserWasm/artifacts
     if [[ "$wasmaot" == "true" ]]; then
-        extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --wasmEngine /home/helixbot/.jsvu/$javascript_engine --runtimeSrcDir \$HELIX_CORRELATION_PAYLOAD/dotnet-wasm --aotcompilermode wasm --buildTimeout 3600" 
+        extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --wasmEngine /home/helixbot/.jsvu/$javascript_engine --runtimeSrcDir \$HELIX_CORRELATION_PAYLOAD/dotnet-wasm --aotcompilermode wasm --buildTimeout 3600"
     else
         extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --wasmEngine /home/helixbot/.jsvu/$javascript_engine --runtimeSrcDir \$HELIX_CORRELATION_PAYLOAD/dotnet-wasm"
     fi
 fi
 
-if [[ "$mono_dotnet" != "" ]] && [[ "$monoaot" == "false" ]]; then
+if [[ -n "$mono_dotnet" && "$monoaot" == "false" ]]; then
     using_mono=true
     mono_dotnet_path=$payload_directory/dotnet-mono
     mv $mono_dotnet $mono_dotnet_path
@@ -309,12 +309,12 @@ if [[ "$monoaot" == "true" ]]; then
     extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --runtimes monoaotllvm --aotcompilerpath \$HELIX_CORRELATION_PAYLOAD/monoaot/sgen/mini/mono-sgen --customruntimepack \$HELIX_CORRELATION_PAYLOAD/monoaot/pack --aotcompilermode llvm"
 fi
 
-if [[ "$use_core_run" = true ]]; then
+if [[ "$use_core_run" == true ]]; then
     new_core_root=$payload_directory/Core_Root
     mv $core_root_directory $new_core_root
 fi
 
-if [[ "$use_baseline_core_run" = true ]]; then
+if [[ "$use_baseline_core_run" == true ]]; then
   new_baseline_core_root=$payload_directory/Baseline_Core_Root
   mv $baseline_core_root_directory $new_baseline_core_root
 fi
index 63a1e02..c79ef8c 100755 (executable)
@@ -79,7 +79,7 @@ else
         esac
     done
 
-    if [ $__TurnOff == 1 ]; then
+    if [[ "$__TurnOff" == 1 ]]; then
         unset DEBUG_SANITIZERS
         echo "Setting DEBUG_SANITIZERS="
     else
@@ -89,13 +89,13 @@ else
         # when Clang 3.8 available, add: suppressions=$(readlink -f sanitizersuppressions.txt)
         UBSAN_OPTIONS="print_stacktrace=1"
 
-        if [ $__EnableASan == 1 ]; then
+        if [[ "$__EnableASan" == 1 ]]; then
             __Options="$__Options asan"
         fi
-        if [ $__EnableUBSan == 1 ]; then
+        if [[ "$__EnableUBSan" == 1 ]]; then
             __Options="$__Options ubsan"
         fi
-        if [ $__EnableLSan == 1 ]; then
+        if [[ "$__EnableLSan" == 1 ]]; then
             ASAN_OPTIONS="$ASAN_OPTIONS detect_leaks=1"
         else
             ASAN_OPTIONS="$ASAN_OPTIONS detect_leaks=0"
@@ -115,7 +115,7 @@ else
 
         # for compiler-rt > 3.6 Asan check that binary name is 'llvm-symbolizer', 'addr2line' or
         # 'atos' (for Darwin) otherwise it returns error
-        if [ $__ExportSymbolizerPath == 1 ]; then
+        if [[ "$__ExportSymbolizerPath" == 1 ]]; then
             # used by ASan at run-time
             ASAN_SYMBOLIZER_PATH="/usr/bin/llvm-symbolizer-$__ClangMajorVersion.$__ClangMinorVersion"
             export ASAN_SYMBOLIZER_PATH
index bda1110..e38f2aa 100755 (executable)
@@ -99,7 +99,7 @@ PAL_XUNIT_TEST_LIST=$PAL_TEST_OUTPUT_DIR/pal_tests.xml
 PAL_OUT_FILE=$PAL_TEST_OUTPUT_DIR/pal_test_out
 
 # Remove and recreate the temporary test output directory, and the directory where output files were requested to be copied.
-if [ "$COPY_TO_TEST_OUTPUT_DIR" == "$PAL_TEST_OUTPUT_DIR" ]; then
+if [[ "$COPY_TO_TEST_OUTPUT_DIR" == "$PAL_TEST_OUTPUT_DIR" ]]; then
   if [ -e $PAL_TEST_OUTPUT_DIR ]; then
     rm -f -r $PAL_TEST_OUTPUT_DIR
   fi
@@ -158,15 +158,15 @@ do
   # Change back to the output directory, and remove the test's working directory if it's empty
   cd $PAL_TEST_OUTPUT_DIR
   rmdir $TEST_WORKING_DIR 2>/dev/null
-  
+
   TEST_XUNIT_NAME=$(dirname $TEST_NAME)
   TEST_XUNIT_CLASSNAME=$(dirname $TEST_XUNIT_NAME)
   TEST_XUNIT_NAME=${TEST_XUNIT_NAME#*/}
   TEST_XUNIT_NAME=${TEST_XUNIT_NAME#*/}
-  
+
   TEST_XUNIT_NAME=$(echo $TEST_XUNIT_NAME | tr / .)
   TEST_XUNIT_CLASSNAME=$(echo $TEST_XUNIT_CLASSNAME | tr / .)
-  
+
   echo -n "<test name=\"$TEST_XUNIT_CLASSNAME.$TEST_XUNIT_NAME\" type=\"$TEST_XUNIT_CLASSNAME\" method=\"$TEST_XUNIT_NAME\" time=\"$(($ENDTIME - $STARTTIME))\" result=\"" >> $PAL_XUNIT_TEST_LIST_TMP
 
   # If the exit code is 0 then the test passed, otherwise record a failure.
@@ -175,10 +175,10 @@ do
     echo "Pass\" />" >> $PAL_XUNIT_TEST_LIST_TMP
   else
     echo "Fail\" >" >> $PAL_XUNIT_TEST_LIST_TMP
-    echo "<failure exception-type=\"Exit code: $TEST_EXIT_CODE\">" >> $PAL_XUNIT_TEST_LIST_TMP  
-    echo "<message><![CDATA[$(cat $PAL_OUT_FILE)]]></message>" >> $PAL_XUNIT_TEST_LIST_TMP  
-    echo "<output><![CDATA[$(cat $PAL_OUT_FILE)]]></output>" >> $PAL_XUNIT_TEST_LIST_TMP  
-    echo "</failure>" >> $PAL_XUNIT_TEST_LIST_TMP  
+    echo "<failure exception-type=\"Exit code: $TEST_EXIT_CODE\">" >> $PAL_XUNIT_TEST_LIST_TMP
+    echo "<message><![CDATA[$(cat $PAL_OUT_FILE)]]></message>" >> $PAL_XUNIT_TEST_LIST_TMP
+    echo "<output><![CDATA[$(cat $PAL_OUT_FILE)]]></output>" >> $PAL_XUNIT_TEST_LIST_TMP
+    echo "</failure>" >> $PAL_XUNIT_TEST_LIST_TMP
     echo "</test>" >> $PAL_XUNIT_TEST_LIST_TMP
     FAILED_TEST="$TEST_NAME. Exit code: $TEST_EXIT_CODE"
     echo
index d8b407e..6ab63d9 100755 (executable)
@@ -15,8 +15,8 @@ then
        export BVT_ROOT=$PWD
 fi
 
-if [ -n "$PERL5LIB" ] ; then
-    if [ -z "`expr $PERL5LIB : ".*\($BVT_ROOT/Common/Smarty\)"`" ] ;  then
+if [ -n "$PERL5LIB" ]; then
+    if [ -z "`expr $PERL5LIB : ".*\($BVT_ROOT/Common/Smarty\)"`" ];  then
         export PERL5LIB="$PERL5LIB:$BVT_ROOT/Common/Smarty"
     fi
 else
index c4ec682..df6fec7 100644 (file)
@@ -1,7 +1,7 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 current_user=$(whoami)
-if [ $current_user != "root" ]; then
+if [[ "$current_user" != "root" ]]; then
     echo "script requires superuser privileges to run"
     exit 1
 fi
@@ -15,35 +15,34 @@ log_file="/docker/logfile.txt"
 
 exec &>> $log_file
 
-if [ $ID == "ol" ] ; then
+if [[ "$ID" == "ol" ]]; then
         distro="oraclelinux"
 fi
-if [ "$distro" == "oraclelinux" ] || [ "$distro" == "rhel" ] ||  [ "$distro" == "opensuse" ] ; then
+if [[ "$distro" == "oraclelinux" || "$distro" == "rhel" ||  "$distro" == "opensuse" ]]; then
        version=$(echo $version | cut -d . -f 1)
-fi      
+fi
 
 echo $distro:$version
 
 runtime_version=$1
-if [ "$runtime_version" == "latest" ] ; 
-then
+if [[ "$runtime_version" == "latest" ]]; then
        BLOB_RUNTIME_DIR="https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master"
 else
        BLOB_RUNTIME_DIR="https://dotnetcli.blob.core.windows.net/dotnet/Runtime/$runtime_version"
 fi
 
 install_curl(){
-       apt-get -y install curl 
-       if [ $? -ne 0 ] ; then
+       apt-get -y install curl
+       if [ $? -ne 0 ]; then
                apt-get update
                apt-get -y install curl
        fi
 }
 download_from_blob_deb(){
        BLOB_PATH=$1
-       if curl --output /dev/null --head --fail $BLOB_PATH; then  
+       if curl --output /dev/null --head --fail $BLOB_PATH; then
                curl -O -s $BLOB_PATH
-       else 
+       else
                echo "Could not extract file from blob"
                exit 1
        fi
@@ -60,14 +59,14 @@ install_runtime_packages_deb(){
         dpkg -i *.deb
 }
 determine_runtime_version_deb(){
-       if [ "$runtime_version" == "latest" ] ; then
+       if [[ "$runtime_version" == "latest" ]]; then
                runtime_version=$(dpkg-deb -f dotnet-runtime-latest-$arch.deb Package)
                runtime_version=${runtime_version#dotnet-runtime-}
        fi
 }
 check_if_runtime_is_installed_deb(){
        find_runtime=$(apt list --installed | grep dotnet-runtime-$runtime_version)
-       if [ "$find_runtime" == "" ] ; then
+       if [[ -z "$find_runtime" ]]; then
                echo "Not able to remove runtime $runtime_version because it is not installed"
                exit 1
        fi
@@ -84,9 +83,9 @@ install_wget_zypper(){
 }
 download_from_blob_rpm(){
        BLOB_PATH=$1
-       if wget --spider $BLOB_PATH; then  
-               wget -nv $BLOB_PATH 
-       else 
+       if wget --spider $BLOB_PATH; then
+               wget -nv $BLOB_PATH
+       else
                echo "Could not extract file from blob"
                exit 1
        fi
@@ -108,7 +107,7 @@ install_runtime_packages_zypper(){
         rpm -Uvh *.rpm
 }
 determine_runtime_version_rpm(){
-       if [ "$runtime_version" == "latest" ] ; then
+       if [[ "$runtime_version" == "latest" ]]; then
                runtime_version=$(rpm -qip dotnet-runtime-latest-$arch.rpm | grep Version)
                runtime_version=$(echo $runtime_version | cut -d ":" -f 2)
                runtime_version=$(echo $runtime_version | tr _ -)
@@ -116,7 +115,7 @@ determine_runtime_version_rpm(){
 }
 check_if_runtime_is_installed_rpm(){
        find_runtime=$(rpm -qa | grep dotnet-runtime-$runtime_version)
-       if [ "$find_runtime" == "" ] ; then
+       if [[ -z "$find_runtime" ]]; then
                echo "Not able to remove runtime $runtime_version because it is not installed"
                exit 1
        fi
@@ -130,9 +129,9 @@ uninstall_runtime_zypper(){
        runtime_installed_packages=$(rpm -qa | grep -e dotnet)
 }
 determine_success_install(){
-       if [ -e $result_file ] ; then
+       if [ -e $result_file ]; then
                installed_runtime=$(dotnet --list-runtimes | grep $runtime_version)
-               if [ "$installed_runtime" != "" ] ; then
+               if [[ -n "$installed_runtime" ]]; then
                        success_install=1
                else
                        success_install=0
@@ -140,8 +139,8 @@ determine_success_install(){
        fi
 }
 test_result_install(){
-        if [ -e $result_file ] ; then
-                if [ $success_install -eq 1 ] ; then
+        if [ -e $result_file ]; then
+                if [ $success_install -eq 1 ]; then
                         echo "$distro:$version install  ->  passed" >> $result_file
                 else
                         echo "$distro:$version install  ->  failed" >> $result_file
@@ -149,19 +148,19 @@ test_result_install(){
         fi
 }
 uninstall_latest_runtime_warning(){
-       if [ "$runtime_version" == "latest" ] ; then 
+       if [[ "$runtime_version" == "latest" ]]; then
                echo "Specify runtime version to unistall. Type dotnet --list-runtimes to see runtimes versions installed"
                exit 1
-       fi 
+       fi
 }
 test_result_uninstall(){
-        if [ "$runtime_installed_packages" == "" ] ; then
+        if [[ -z "$runtime_installed_packages" ]]; then
                 success_uninstall=1
         else
                 success_uninstall=0
         fi
-        if [ -e $result_file ] ; then
-                if [ $success_uninstall -eq 1 ] ; then
+        if [ -e $result_file ]; then
+                if [ $success_uninstall -eq 1 ]; then
                         echo "$distro:$version uninstall  ->  passed" >> $result_file
                 else
                         echo "$distro:$version uninstall  ->  failed" >> $result_file
@@ -169,10 +168,10 @@ test_result_uninstall(){
         fi
 }
 
-if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] ; then
-       if [ "$2" == "install" ] ; then
-               install_curl 
-               
+if [[ "$distro" == "ubuntu" || "$distro" == "debian" ]]; then
+       if [[ "$2" == "install" ]]; then
+               install_curl
+
                download_runtime_packages_deb
                install_runtime_packages_deb
                dotnet --list-runtimes
@@ -180,19 +179,19 @@ if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] ; then
                determine_runtime_version_deb
                determine_success_install
                test_result_install
-       
-       elif [ "$2" == "uninstall" ] ; then
+
+       elif [[ "$2" == "uninstall" ]]; then
                uninstall_latest_runtime_warning
-       fi              
+       fi
 
-       if [ "$3" == "uninstall" ] || [ "$2" == "uninstall" ] ; then
+       if [[ "$3" == "uninstall" || "$2" == "uninstall" ]]; then
                check_if_runtime_is_installed_deb
                uninstall_runtime_deb
                test_result_uninstall
        fi
 
-elif [ "$distro" == "fedora" ] || [ "$distro" == "centos" ] || [ "$distro" == "oraclelinux" ] || [ "$distro" == "rhel" ] ; then
-       if [ "$2" == "install" ] ; then
+elif [[ "$distro" == "fedora" || "$distro" == "centos" || "$distro" == "oraclelinux" || "$distro" == "rhel" ]]; then
+       if [[ "$2" == "install" ]]; then
                install_wget_yum
 
                download_runtime_packages_rpm
@@ -204,39 +203,39 @@ elif [ "$distro" == "fedora" ] || [ "$distro" == "centos" ] || [ "$distro" == "o
                determine_success_install
                test_result_install
 
-       elif [ "$2" == "uninstall" ] ; then
-               uninstall_latest_runtime_warning                
+       elif [[ "$2" == "uninstall" ]]; then
+               uninstall_latest_runtime_warning
        fi
-       if [ "$3" == "uninstall" ] || [ "$2" == "uninstall" ] ; then
+       if [[ "$3" == "uninstall" || "$2" == "uninstall" ]]; then
                check_if_runtime_is_installed_rpm
                uninstall_runtime_yum
                test_result_uninstall
        fi
 
-elif [ "$distro" == "opensuse" ] || [ "$distro" == "sles" ] ; then
-       if [ "$2" == "install" ] ; then
+elif [[ "$distro" == "opensuse" || "$distro" == "sles" ]]; then
+       if [[ "$2" == "install" ]]; then
                install_wget_zypper
 
                download_runtime_packages_rpm
                install_runtime_packages_zypper
                dotnet --list-runtimes
-               
+
                determine_runtime_version_rpm
                determine_success_install
                test_result_install
-       
-       elif [ "$2" == "uninstall" ] ; then
-               uninstall_latest_runtime_warning                
+
+       elif [[ "$2" == "uninstall" ]]; then
+               uninstall_latest_runtime_warning
        fi
 
-       if [ "$3" == "uninstall" ] || [ "$2" == "uninstall" ] ; then
+       if [[ "$3" == "uninstall" || "$2" == "uninstall" ]]; then
                check_if_runtime_is_installed_rpm
                uninstall_runtime_zypper
                test_result_uninstall
-       fi      
+       fi
 fi
 
-if [ -e $log_file ] ; then
+if [ -e $log_file ]; then
        ch=$(printf "%-160s" "-")
        echo "${ch// /-} "
 fi
index b2e068d..2701c79 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 current_user=$(whoami)
 if [ $current_user != "root" ]; then
@@ -15,12 +15,12 @@ log_file="/docker/logfile.txt"
 
 exec &>> $log_file
 
-if [ $ID == "ol" ] ; then
+if [[ "$ID" == "ol" ]]; then
         distro="oraclelinux"
 fi
-if [ "$distro" == "oraclelinux" ] || [ "$distro" == "rhel" ] ||  [ "$distro" == "opensuse" ] ; then
+if [[ "$distro" == "oraclelinux" || "$distro" == "rhel" || "$distro" == "opensuse" ]]; then
        version=$(echo $version | cut -d . -f 1)
-fi      
+fi
 
 echo $distro:$version
 
@@ -31,23 +31,23 @@ BLOB_SDK_DIR="https://dotnetcli.blob.core.windows.net/dotnet/Sdk"
 BLOB_ASPNET_DIR="https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime"
 
 install_curl(){
-       apt-get -y install curl 
-       if [ $? -ne 0 ] ; then
+       apt-get -y install curl
+       if [ $? -ne 0 ]; then
                apt-get update
                apt-get -y install curl
        fi
 }
 download_from_blob_deb(){
        BLOB_PATH=$1
-       if curl --output /dev/null --head --fail $BLOB_PATH; then  
+       if curl --output /dev/null --head --fail $BLOB_PATH; then
                curl -O -s $BLOB_PATH
-       else 
+       else
                echo "Could not extract file from blob"
                exit 1
        fi
 }
 download_sdk_package_deb(){
-       if [ "$sdk_version" == "latest" ] ; then
+       if [[ "$sdk_version" == "latest" ]]; then
                 download_from_blob_deb "$BLOB_SDK_DIR/master/dotnet-sdk-latest-$arch.deb"
         else
                 download_from_blob_deb "$BLOB_SDK_DIR/$sdk_version/dotnet-sdk-$sdk_version-$arch.deb"
@@ -59,17 +59,17 @@ download_aspnet_package_deb(){
 determine_aspnet_version_install_deb(){
        aspnet_version=$(dpkg -I dotnet-sdk-$sdk_version-$arch.deb | grep -o 'aspnetcore-runtime-[^ ]*')
         aspnet_version=${aspnet_version#aspnetcore-runtime-}
-        [ "${aspnet_version: -1}" == "," ] && aspnet_version=${aspnet_version%,}
+        [[ "${aspnet_version: -1}" == "," ]] && aspnet_version=${aspnet_version%,}
 }
 determine_runtime_sdk_install_deb(){
        runtime_sdk=$(dpkg -I dotnet-sdk-$sdk_version-$arch.deb | grep -o 'dotnet-runtime-[^ ]*')
         runtime_sdk=${runtime_sdk#dotnet-runtime-}
-        [ "${runtime_sdk: -1}" == "," ] && runtime_sdk=${runtime_sdk%,}
+        [[ "${runtime_sdk: -1}" == "," ]] && runtime_sdk=${runtime_sdk%,}
 }
 determine_runtime_aspnet_install_deb(){
        runtime_aspnet=$(dpkg -I aspnetcore-runtime-$aspnet_version-$arch.deb | grep -o 'dotnet-runtime[^ ]*')
         runtime_aspnet=${runtime_aspnet#dotnet-runtime-}
-        [ "${runtime_aspnet: -1}" == "," ] && runtime_sdk=${runtime_aspnet%,}
+        [[ "${runtime_aspnet: -1}" == "," ]] && runtime_sdk=${runtime_aspnet%,}
 }
 download_runtime_packages_deb(){
         download_from_blob_deb "$BLOB_RUNTIME_DIR/$runtime_version/dotnet-runtime-deps-$runtime_version-$distro.$version-$arch.deb"
@@ -88,7 +88,7 @@ install_aspnet_and_sdk_deb(){
 }
 check_if_sdk_is_installed_deb(){
        find_sdk=$(apt list --installed | grep dotnet-sdk-$sdk_version)
-       if [ "$find_sdk" == "" ] ; then
+       if [[ -z "$find_sdk" ]]; then
                echo "Not able to remove sdk $sdk_version because it is not installed"
                exit 1
        fi
@@ -117,15 +117,15 @@ install_wget_zypper(){
 }
 download_from_blob_rpm(){
        BLOB_PATH=$1
-       if wget --spider $BLOB_PATH; then  
+       if wget --spider $BLOB_PATH; then
                wget -nv $BLOB_PATH
-       else 
+       else
                echo "Could not extract file from blob"
                exit 1
        fi
 }
 download_sdk_package_rpm(){
-       if [ "$sdk_version" == "latest" ] ; then
+       if [[ "$sdk_version" == "latest" ]]; then
                 download_from_blob_rpm "$BLOB_SDK_DIR/master/dotnet-sdk-latest-$arch.rpm"
         else
                 download_from_blob_rpm "$BLOB_SDK_DIR/$sdk_version/dotnet-sdk-$sdk_version-$arch.rpm"
@@ -170,8 +170,7 @@ install_aspnet_and_sdk_rpm(){
 }
 check_if_sdk_is_installed_rpm(){
        find_sdk=$(rpm -qa | grep dotnet-sdk-$sdk_version)
-       if [ "$find_sdk" == "" ] ;
-       then
+       if [[ -z "$find_sdk" ]]; then
                echo "Not able to remove sdk $sdk_version because it is not installed"
                exit 1
        fi
@@ -192,7 +191,7 @@ uninstall_dotnet_yum(){
        dotnet_installed_packages=$(rpm -qa | grep -e dotnet -e aspnet)
 }
 uninstall_dotnet_zypper(){
-       zypper -n rm $(rpm -qa | grep -e dotnet -e aspnet) 
+       zypper -n rm $(rpm -qa | grep -e dotnet -e aspnet)
        dotnet_installed_packages=$(rpm -qa | grep -e dotnet -e aspnet)
 }
 checkout_new_folder(){
@@ -203,12 +202,12 @@ checkout_previous_folder(){
        cd ..
 }
 run_app(){
-       if [ -e $result_file ] ; then
+       if [ -e $result_file ]; then
                dotnet new console -o dockerApp
                cd dockerApp
                dotnet restore -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
                project_output=$(dotnet run)
-               if [ "$project_output" == 'Hello World!' ] ; 
+               if [[ "$project_output" == 'Hello World!' ]];
                then
                        sucess_install=1;
                else
@@ -217,8 +216,8 @@ run_app(){
        fi
 }
 test_result_install(){
-       if [ -e $result_file ] ; then
-               if [ $sucess_install -eq 1 ] ; then
+       if [ -e $result_file ]; then
+               if [ $sucess_install -eq 1 ]; then
                        echo "$distro:$version install  ->  passed" >> $result_file
                else
                        echo "$distro:$version install  ->  failed" >> $result_file
@@ -226,15 +225,15 @@ test_result_install(){
        fi
 }
 test_result_uninstall(){
-       
-       if [ "$dotnet_installed_packages" == "" ] ; then
+
+       if [[ -z "$dotnet_installed_packages" ]]; then
                sucess_uninstall=1;
        else
                sucess_uninstall=0;
        fi
 
-       if [ -e $result_file ] ; then
-               if [ $sucess_uninstall -eq 1 ] ; then
+       if [ -e $result_file ]; then
+               if [ $sucess_uninstall -eq 1 ]; then
                                echo "$distro:$version uninstall  ->  passed" >> $result_file
                else
                        echo "$distro:$version uninstall  ->  failed" >> $result_file
@@ -242,77 +241,77 @@ test_result_uninstall(){
        fi
 }
 uninstall_latest_sdk_warning(){
-       if [ "$sdk_version" == "latest" ] ; then 
+       if [[ "$sdk_version" == "latest" ]]; then
                echo "Specify sdk version to unistall. Type dotnet --list-sdks to see sdks versions installed"
                exit 1
-       fi 
+       fi
 }
 
-if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] ; then
-       if [ "$2" == "install" ] ; then
-               install_curl 
-       
+if [[ "$distro" == "ubuntu" || "$distro" == "debian" ]]; then
+       if [[ "$2" == "install" ]]; then
+               install_curl
+
                download_sdk_package_deb
-                               
+
                determine_aspnet_version_install_deb
-               download_aspnet_package_deb 
+               download_aspnet_package_deb
 
                determine_runtime_aspnet_install_deb
                determine_runtime_sdk_install_deb
-               
+
                runtime_version="$runtime_aspnet"
                download_runtime_packages_deb
                install_runtime_packages_deb
-        
-               if [ "$runtime_aspnet" != "$runtime_sdk" ] ; then       
+
+               if [ "$runtime_aspnet" != "$runtime_sdk" ]; then
                        runtime_version="$runtime_sdk"
                        checkout_new_folder
                        download_runtime_packages_deb
                        install_runtime_packages_deb
                        checkout_previous_folder
-               fi 
+               fi
 
                install_aspnet_and_sdk_deb
-        
+
                dotnet --list-runtimes
                dotnet --list-sdks
 
                run_app
                test_result_install
-       
-       elif [ "$2" == "uninstall" ] ;  then
-               uninstall_latest_sdk_warning            
+
+       elif [[ "$2" == "uninstall" ]]; then
+               uninstall_latest_sdk_warning
                check_if_sdk_is_installed_deb
-               
+
                determine_runtime_sdk_uninstall_deb
                determine_aspnet_package_name_uninstall_deb
                determine_runtime_aspnet_uninstall_deb
-               
-       fi              
 
-       if [ "$3" == "uninstall" ] && [ $sucess_install -eq 1 ] || [ "$2" == "uninstall" ] ; then
+       fi
+
+       if [[ "$3" == "uninstall" && "$sucess_install" == 1 || "$2" == "uninstall" ]]; then
                uninstall_dotnet_deb
                test_result_uninstall
        fi
 
-elif [ "$distro" == "fedora" ] || [ "$distro" == "centos" ] || [ "$distro" == "oraclelinux" ] || [ "$distro" == "rhel" ] ; then
-       if [ "$2" == "install" ] ; then
+elif [[ "$distro" == "fedora" || "$distro" == "centos" || "$distro" == "oraclelinux" || "$distro" == "rhel" ]]; then
+       if [[ "$2" == "install" ]]; then
                install_wget_yum
 
                download_sdk_package_rpm
-               
+
                determine_aspnet_version_install_rpm
                download_aspnet_package_rpm
 
                determine_runtime_aspnet_install_rpm
                determine_runtime_sdk_install_rpm
-               
+
                checkout_new_folder
                runtime_version="$runtime_aspnet"
                download_runtime_packages_rpm
                install_runtime_deps_package_yum
-               
-               if [ "$runtime_aspnet" != "$runtime_sdk" ] ; then       
+
+               if [ "$runtime_aspnet" != "$runtime_sdk" ]; then
                        runtime_version="$runtime_sdk"
                        download_runtime_packages_rpm
                        install_runtime_deps_package_yum
@@ -328,42 +327,42 @@ elif [ "$distro" == "fedora" ] || [ "$distro" == "centos" ] || [ "$distro" == "o
                run_app
                test_result_install
 
-       elif [ "$2" == "uninstall" ] ; then
-               uninstall_latest_sdk_warning            
+       elif [[ "$2" == "uninstall" ]]; then
+               uninstall_latest_sdk_warning
                check_if_sdk_is_installed_rpm
-               
+
                determine_runtime_sdk_uninstall_rpm
                determine_aspnet_package_name_uninstall_rpm
                determine_runtime_aspnet_uninstall_rpm
-                        
+
                 echo $runtime_sdk
                 echo $runtime_aspnet
 
        fi
-       if [ "$3" == "uninstall" ] && [ $sucess_install -eq 1 ]|| [ "$2" == "uninstall" ] ; then
+       if [[ "$3" == "uninstall" && "$sucess_install" == 1 || "$2" == "uninstall" ]]; then
                uninstall_dotnet_yum
                test_result_uninstall
        fi
 
 
-elif [ "$distro" == "opensuse" ] || [ "$distro" == "sles" ] ; then
-       if [ "$2" == "install" ] ; then
+elif [[ "$distro" == "opensuse" || "$distro" == "sles" ]]; then
+       if [[ "$2" == "install" ]]; then
                install_wget_zypper
 
                download_sdk_package_rpm
-               
+
                determine_aspnet_version_install_rpm
                download_aspnet_package_rpm
 
                determine_runtime_aspnet_install_rpm
                determine_runtime_sdk_install_rpm
-               
+
                checkout_new_folder
                runtime_version="$runtime_aspnet"
                download_runtime_packages_rpm
                install_runtime_deps_package_zypper
-               
-               if [ "$runtime_aspnet" != "$runtime_sdk" ] ; then 
+
+               if [ "$runtime_aspnet" != "$runtime_sdk" ]; then
                        runtime_version="$runtime_sdk"
                        download_runtime_packages_rpm
                        install_runtime_deps_package_zypper
@@ -376,30 +375,30 @@ elif [ "$distro" == "opensuse" ] || [ "$distro" == "sles" ] ; then
 
                dotnet --list-runtimes
                dotnet --list-sdks
-               
+
                run_app
                test_result_install
 
-       elif [ "$2" == "uninstall" ] ; then
-               uninstall_latest_sdk_warning            
+       elif [[ "$2" == "uninstall" ]]; then
+               uninstall_latest_sdk_warning
                check_if_sdk_is_installed_rpm
-               
+
                determine_runtime_sdk_uninstall_rpm
                determine_aspnet_package_name_uninstall_rpm
                determine_runtime_aspnet_uninstall_rpm
-                        
+
                echo $runtime_sdk
                echo $runtime_aspnet
 
        fi
 
-       if [ "$3" == "uninstall" ] && [ $sucess_install -eq 1 ] || [ "$2" == "uninstall" ] ; then
+       if [[ "$3" == "uninstall" && "$sucess_install" == 1 || "$2" == "uninstall" ]]; then
                uninstall_dotnet_zypper
                test_result_uninstall
-       fi      
+       fi
 fi
 
-if [ -e $log_file ] ; then
+if [ -e $log_file ]; then
        ch=$(printf "%-160s" "-")
        echo "${ch// /-} "
 fi
index a71d4c9..b62d729 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 InstallationTestResult="result.txt"
 InstallationTestLogFile="logfile.txt"
@@ -10,14 +10,14 @@ if [ $current_user != "root" ]; then
     exit 1
 fi
 
-if [ -e $InstallationTestLogFile ] ; then 
+if [ -e $InstallationTestLogFile ]; then
        rm $InstallationTestLogFile -f
 fi
 
-if [ "$1" == "sdk" ] ; then
+if [[ "$1" == "sdk" ]]; then
        InstallationScript="SdkInstallation.sh"
        echo -e ".NET SDK verification test result\n" > $InstallationTestResult
-elif [ "$1" == "runtime" ] ; then
+elif [[ "$1" == "runtime" ]]; then
        InstallationScript="RuntimeInstallation.sh"
        echo -e ".NET Runtime verification test result\n" > $InstallationTestResult
 fi
@@ -25,6 +25,6 @@ fi
 while IFS='' read -r image || [[ -n "$image" ]]; do
        echo $image
        docker run --rm -v $(pwd):/docker -t $image /bin/bash /docker/$InstallationScript $2 $3 $4
-done <$ImagesFile 
+done <$ImagesFile
 
 cat $InstallationTestResult >> $InstallationTestLogFile
index 0b4a615..8fd72c5 100644 (file)
@@ -1,16 +1,16 @@
-#!/bin/bash -x
+#!/usr/bin/env bash -x
 
 echo "$@" > /tmp/args
 
 cp /SHARED/apacheweb.keytab /etc/krb5.keytab
 
-if [ "$1" == "-debug" ]; then
+if [[ "$1" == "-debug" ]]; then
   while [ 1 ];do
     sleep 10000
   done
 fi
 
-if [ "$1" == "-DNTLM" ]; then
+if [[ "$1" == "-DNTLM" ]]; then
   # NTLM/Winbind is aggressive and eats Negotiate so it cannot be combined with Kerberos
   ./setup-pdc.sh
   /usr/sbin/apache2 -DALTPORT "$@"
index ef3a9c6..d423418 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 echo -n 'user1:Digest Login:' > /setup/digest_pw
 echo -n 'user1:Digest Login:PLACEHOLDERcorrect20' | md5sum | cut -d ' '  -f 1 >> /setup/digest_pw
index a99b4c4..a43ae97 100755 (executable)
@@ -62,16 +62,16 @@ done
 
 repo_root=$(git rev-parse --show-toplevel)
 
-if [[ buildcurrentlibraries -eq 1 ]]; then
+if [[ "$buildcurrentlibraries" -eq 1 ]]; then
     libraries_args=" -t $imagename -c $configuration"
 
-    if ! $repo_root/eng/docker/build-docker-sdk.sh $libraries_args; then
+    if ! "$repo_root"/eng/docker/build-docker-sdk.sh $libraries_args; then
         exit 1
     fi
 fi
 
 build_args=""
-if [[ "$imagename" != "" ]]; then
+if [[ -n "$imagename" ]]; then
     build_args=" --build-arg SDK_BASE_IMAGE=$imagename"
 fi
 
@@ -81,7 +81,7 @@ if ! docker-compose --file "$compose_file" build $build_args; then
     exit $?
 fi
 
-if [[ $buildonly -eq 0 ]]; then
+if [[ "$buildonly" -eq 0 ]]; then
     export DUMPS_SHARE_MOUNT_ROOT="/dumps-share"
     export CLIENT_DUMPS_SHARE="${CLIENT_DUMPS_SHARE:-$(mktemp -d)}"
     export SERVER_DUMPS_SHARE="${SERVER_DUMPS_SHARE:-$(mktemp -d)}"
index dd18b89..ee1ec60 100755 (executable)
@@ -62,16 +62,16 @@ done
 
 repo_root=$(git rev-parse --show-toplevel)
 
-if [[ buildcurrentlibraries -eq 1 ]]; then
+if [[ "$buildcurrentlibraries" -eq 1 ]]; then
     libraries_args=" -t $imagename -c $configuration"
 
-    if ! $repo_root/eng/docker/build-docker-sdk.sh $libraries_args; then
+    if ! "$repo_root"/eng/docker/build-docker-sdk.sh $libraries_args; then
         exit 1
     fi
 fi
 
 build_args=""
-if [[ "$imagename" != "" ]]; then
+if [[ -z "$imagename" ]]; then
     build_args=" --build-arg SDK_BASE_IMAGE=$imagename"
 fi
 
index 72be802..d75fa96 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -38,7 +38,7 @@ $SED -e "s/SUPER_TYPE/${TEST_SUPER_TYPE}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -
   .ver  0:0:0:0
 }
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly extern mscorlib
@@ -55,7 +55,7 @@ $SED -e "s/SUPER_TYPE/${TEST_SUPER_TYPE}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
                ret
        }
@@ -71,7 +71,7 @@ $SED -e "s/SUPER_TYPE/${TEST_SUPER_TYPE}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void SUPER_TYPE::.ctor()
                ret
        }
index 4356497..59a4ce6 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -11,7 +11,7 @@ TEST_BYTE_0=$3
 TEST_BYTE_1=$4
 
 
-if [ "x$TEST_BYTE_1" = "x" ] ; then
+if [ "x$TEST_BYTE_1" = "x" ]; then
        TEST_BYTE_1="0";
 fi
 
@@ -19,7 +19,7 @@ TEST_FILE=`echo ${TEST_VALIDITY}_${TEST_NAME} | $SED -e 's/ /_/g' -e 's/\./_/g'
 echo $TEST_FILE
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/BYTE_0/${TEST_BYTE_0}/g" -e "s/BYTE_1/${TEST_BYTE_1}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index 019b453..ce787ec 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 TEST_NAME=$1
@@ -26,7 +26,7 @@ TEST_TYPE1=`echo $TEST_TYPE1 | $SED -s 's/&/\\\&/'`
 TEST_TYPE2=`echo $TEST_TYPE2 | $SED -s 's/&/\\\&/'`
 $SED -e "s/INIT/${TEST_INIT}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/TYPE2/${TEST_TYPE2}/g" -e "s/OPCODE/${TEST_OP}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index d7b4b85..9f357dd 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -17,7 +17,7 @@ echo $TEST_FILE
 TEST_TYPE1=`echo $TEST_TYPE1 | $SED -s 's/&/\\\&/'`
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE1/${TEST_TYPE1}/g"  -e "s/OPCODE/${TEST_OP}/g"  -e "s/EXTRAS/${TEST_EXTRAS}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index 3242832..182f3e0 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -37,7 +37,7 @@ $SED  -e "s/TYPE/${TEST_TYPE}/g" -e "s/OPCODE/${TEST_OP}/g"  -e "s/BEFORE_OP/${T
 
 .class interface public auto ansi abstract IFace
 {
-       .method public virtual hidebysig newslot abstract instance default void Tst ()  cil managed 
+       .method public virtual hidebysig newslot abstract instance default void Tst ()  cil managed
        {
        }
 }
@@ -46,48 +46,48 @@ $SED  -e "s/TYPE/${TEST_TYPE}/g" -e "s/OPCODE/${TEST_OP}/g"  -e "s/BEFORE_OP/${T
 {
        .field public int32 fld
 
-       .method public hidebysig specialname rtspecialname instance default void '.ctor' () cil managed 
+       .method public hidebysig specialname rtspecialname instance default void '.ctor' () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::'.ctor'()
-               ret 
+               ret
        }
 }
 
 .class public auto ansi beforefieldinit IFaceImpl extends BaseClass implements IFace
 {
-       .method public hidebysig specialname rtspecialname instance default void '.ctor' () cil managed 
+       .method public hidebysig specialname rtspecialname instance default void '.ctor' () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void BaseClass::'.ctor'()
-               ret 
+               ret
        }
 
-       .method public final virtual hidebysig newslot instance default void Tst () cil managed 
+       .method public final virtual hidebysig newslot instance default void Tst () cil managed
        {
                .maxstack 8
-               ret 
+               ret
        }
 }
 
 .class public auto ansi sealed TstDelegate extends [mscorlib]System.MulticastDelegate
 {
-       .method public hidebysig  specialname  rtspecialname  instance default void '.ctor' (object 'object', native int 'method')  runtime managed 
+       .method public hidebysig  specialname  rtspecialname  instance default void '.ctor' (object 'object', native int 'method')  runtime managed
        {
        }
 
-       .method public virtual  hidebysig  newslot instance default void Invoke ()  runtime managed 
+       .method public virtual  hidebysig  newslot instance default void Invoke ()  runtime managed
        {
        }
 
-       .method public virtual  hidebysig  newslot instance default class [mscorlib]System.IAsyncResult BeginInvoke (class [mscorlib]System.AsyncCallback callback, object 'object')  runtime managed 
+       .method public virtual  hidebysig  newslot instance default class [mscorlib]System.IAsyncResult BeginInvoke (class [mscorlib]System.AsyncCallback callback, object 'object')  runtime managed
        {
        }
 
-       .method public virtual  hidebysig  newslot 
-       instance default void EndInvoke (class [mscorlib]System.IAsyncResult result)  runtime managed 
+       .method public virtual  hidebysig  newslot
+       instance default void EndInvoke (class [mscorlib]System.IAsyncResult result)  runtime managed
        {
        }
 }
@@ -97,16 +97,16 @@ $SED  -e "s/TYPE/${TEST_TYPE}/g" -e "s/OPCODE/${TEST_OP}/g"  -e "s/BEFORE_OP/${T
        .field !T t
        .field ${TEST_CONSTRAINT_TYPE} ifField
 
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor (!T A_0)  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor (!T A_0)  cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
 
                ldarg.0
                ldarg.1
                stfld !0 class DriverClass<!0>::t
-               ret 
+               ret
        }
 
        .method public void Driver ()
@@ -134,7 +134,7 @@ $SED  -e "s/TYPE/${TEST_TYPE}/g" -e "s/OPCODE/${TEST_OP}/g"  -e "s/BEFORE_OP/${T
 TARGET:
                leave END
 END:
-               ret 
+               ret
        }
 
 }
@@ -152,7 +152,7 @@ END:
        call instance void class DriverClass<IFaceImpl>::Driver()
 
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index 9ea87a4..459a325 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -23,7 +23,7 @@ echo $TEST_FILE
 
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/FINALLY/${TEST_FIN}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -59,7 +59,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/FINALLY
         .entrypoint
         .maxstack 8
        .locals init ( int32 BLA)
+
        ${BRANCH_1}
         ldc.i4 0x7FFFFFFF
        pop
index 08605a0..720f31d 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -29,7 +29,7 @@ TEST_FILE=${TEST_NAME}_generated.il
 echo $TEST_FILE
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/LOAD_ARGS/${TEST_LOAD_ARGS}/g" -e "s/MEMBER_OP/${MEMBER_TEST_OP}/g" -e "s/MEMBER_LD_ARGS/${MEMBER_TEST_LOAD_ARGS}/g" -e "s/EXTRA_STUFF/${TEST_EXTRA_STUFF}/g" -e "s/EXTRA/${MEMBER_TEST_EXTRA_STUFF}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -56,12 +56,12 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/LOAD_AR
 
 .class ClassA extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
        .method public  void Method1() cil managed
@@ -82,24 +82,24 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/LOAD_AR
 
 .class ClassB extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
 }
 
 .class ClassC extends ClassA
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void ClassA::.ctor()
-               ret 
+               ret
        }
 
        .method public virtual final void VirtMethod() cil managed
@@ -110,22 +110,22 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/LOAD_AR
 
 .class interface abstract InterfaceA
 {
-       .method public abstract virtual instance void AbsMethod () cil managed 
+       .method public abstract virtual instance void AbsMethod () cil managed
        {
        }
 }
 
 .class ImplIfaceA extends [mscorlib]System.Object implements InterfaceA
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
-       .method public virtual instance void AbsMethod () cil managed 
+       .method public virtual instance void AbsMethod () cil managed
        {
                ret
        }
@@ -150,12 +150,12 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/LOAD_AR
 
 .class BaseClass extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
 
@@ -174,12 +174,12 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/LOAD_AR
                ret
        }
 
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void BaseClass::.ctor()
-               ret 
+               ret
        }
 
        .method public void MemberMain() cil managed
index 4c29f88..269089f 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -18,7 +18,7 @@ TEST_FILE=${TEST_NAME}_generated.il
 echo $TEST_FILE
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LOCAL/${TEST_LOCAL}/g" -e "s/LOAD/${TEST_LOAD}/g" -e "s/OP/${TEST_OP}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -29,25 +29,25 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LOCAL/${TEST_LOCAL}/g" -e "s/LOAD/
 
 .class ClassA extends [mscorlib]System.Object
 {
-    .method public hidebysig  specialname  rtspecialname 
-           instance default void .ctor ()  cil managed 
+    .method public hidebysig  specialname  rtspecialname
+           instance default void .ctor ()  cil managed
     {
         .maxstack 8
-        ldarg.0 
+        ldarg.0
         call instance void object::.ctor()
-        ret 
+        ret
     }
 }
 
 .class ClassSubA extends ClassA
 {
-    .method public hidebysig  specialname  rtspecialname 
-           instance default void .ctor ()  cil managed 
+    .method public hidebysig  specialname  rtspecialname
+           instance default void .ctor ()  cil managed
     {
         .maxstack 8
-        ldarg.0 
+        ldarg.0
         call instance void ClassA::.ctor()
-        ret 
+        ret
     }
 }
 
@@ -75,10 +75,10 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LOCAL/${TEST_LOCAL}/g" -e "s/LOAD/
                call void foo ()
                leave END
        } catch [mscorlib]System.InvalidCastException {
-               pop 
+               pop
                leave END
        } catch [mscorlib]System.NullReferenceException {
-               pop 
+               pop
                leave END
 
         }
index 2687f0d..57ba0c2 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -49,12 +49,12 @@ $SED  -e "s/TYPE/${TEST_TYPE}/g" -e "s/OPCODE/${TEST_OP}/g"  -e "s/BEFORE_OP/${T
 {
     .field public int32 valid
 
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor (int32&)  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor (int32&)  cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
        .method public virtual void VirtTest (ClassA& arg)
@@ -120,7 +120,7 @@ $SED  -e "s/TYPE/${TEST_TYPE}/g" -e "s/OPCODE/${TEST_OP}/g"  -e "s/BEFORE_OP/${T
        leave END
 END:
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index 12154b1..d45d2e9 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -19,7 +19,7 @@ TEST_FILE=${TEST_NAME}_generated.il
 echo $TEST_FILE
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/CONSTRAINED_TYPE/${TEST_CONSTRAINED_TYPE}/g" -e "s/ARG_TYPE/${TEST_ARG_TYPE}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/LOAD_OP/${TEST_LOAD_OP}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -46,12 +46,12 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/CONSTRAINED_TYPE/${TEST_CONSTRAINE
 
 .class ClassA extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
        .method public  void Method1() cil managed
@@ -72,24 +72,24 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/CONSTRAINED_TYPE/${TEST_CONSTRAINE
 
 .class ClassB extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
 }
 
 .class ClassC extends ClassA
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void ClassA::.ctor()
-               ret 
+               ret
        }
 
        .method public virtual final void VirtMethod() cil managed
@@ -100,22 +100,22 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/CONSTRAINED_TYPE/${TEST_CONSTRAINE
 
 .class interface abstract InterfaceA
 {
-       .method public abstract virtual instance void AbsMethod () cil managed 
+       .method public abstract virtual instance void AbsMethod () cil managed
        {
        }
 }
 
 .class ImplIfaceA extends [mscorlib]System.Object implements InterfaceA
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
-       .method public virtual instance void AbsMethod () cil managed 
+       .method public virtual instance void AbsMethod () cil managed
        {
                ret
        }
@@ -140,12 +140,12 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/CONSTRAINED_TYPE/${TEST_CONSTRAINE
 
 .class BaseClass extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
 
@@ -164,12 +164,12 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/CONSTRAINED_TYPE/${TEST_CONSTRAINE
                ret
        }
 
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
        .method public void MemberMain() cil managed
index 5110b56..5eb6c2a 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -107,7 +107,7 @@ $SED -e "s/EXTRA_OPS/${TEST_EXTRA_OPS}/g" -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/VAL
 
 
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index b94b7e9..f57e0ce 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -39,7 +39,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CONSTRU
   .ver  0:0:0:0
 }
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly extern mscorlib
@@ -60,7 +60,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CONSTRU
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
                ret
        }
@@ -73,7 +73,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CONSTRU
                .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
                {
                        .maxstack 8
-                       ldarg.0 
+                       ldarg.0
                        call instance void object::.ctor()
                        ret
                }
@@ -82,8 +82,8 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CONSTRU
                {
                        .maxstack 8
                        ldc.i4.0
-                       ret 
-               }               
+                       ret
+               }
        }
 
        .class nested public Test EXTENDS
@@ -91,7 +91,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CONSTRU
                .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
                {
                        .maxstack 8
-                       ldarg.0 
+                       ldarg.0
                        CONSTRUCTOR
                        ret
                }
@@ -103,7 +103,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CONSTRU
                        OPCODE // VALIDITY.
                        pop
                        ret
-               }       
+               }
        }
 }
 
index 6325f61..9078b80 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -36,35 +36,35 @@ $SED -e "s/CODE/${TEST_CODE}/g" -e "s/OTHER/${TEST_OTHER_CODE}/g" -e "s/VALIDITY
 .module delegate_test.exe
 .class ansi beforefieldinit TestClass extends [mscorlib]System.Object
 {
-       .method public hidebysig specialname  rtspecialname instance default void .ctor ()  cil managed 
+       .method public hidebysig specialname  rtspecialname instance default void .ctor ()  cil managed
        {
                .maxstack 8
                ldarg.0
                call instance void object::'.ctor'()
-               ret 
+               ret
        }
 
-       .method public hidebysig specialname  rtspecialname instance default void .ctor (object V_1)  cil managed 
+       .method public hidebysig specialname  rtspecialname instance default void .ctor (object V_1)  cil managed
        {
                .maxstack 8
                ldarg.0
                call instance void object::'.ctor'()
-               ret 
+               ret
        }
 }
 
 .module delegate_test.exe
 .class ansi beforefieldinit TestSubClass extends TestClass
 {
-       .method public hidebysig specialname  rtspecialname instance default void .ctor ()  cil managed 
+       .method public hidebysig specialname  rtspecialname instance default void .ctor ()  cil managed
        {
                .maxstack 8
                ldarg.0
                OTHER
-               
+
                leave END
 END:
-               ret 
+               ret
        }
 }
 
@@ -76,29 +76,29 @@ END:
        .field int32 val
        .field object obj
 
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed
        {
                .maxstack 8
                .locals init (Test V_0)
                ldarg.0
                CODE
-               
+
                leave END
 END:
-               ret 
+               ret
        }
 
-       .method public hidebysig static default void StaticMethod (object A_0)  cil managed 
+       .method public hidebysig static default void StaticMethod (object A_0)  cil managed
        {
                .maxstack 8
-               ret 
+               ret
        }
 
 
-       .method public hidebysig instance default void InstanceMethod ()  cil managed 
+       .method public hidebysig instance default void InstanceMethod ()  cil managed
        {
                .maxstack 8
-               ret 
+               ret
        }
 
 }
@@ -107,13 +107,13 @@ END:
 .class public auto ansi beforefieldinit Driver
         extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed
        {
                .maxstack 8
                ldarg.0
                call instance void object::'.ctor'()
 
-               ret 
+               ret
        }
 
        .method public static int32 Main ()
@@ -124,7 +124,7 @@ END:
                newobj instance void ${TARGET_TYPE}::.ctor()
                pop
                ldc.i4.0
-               ret 
+               ret
 
        }
 }
index 31b8581..31a3808 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -18,7 +18,7 @@ TEST_USE_NATIVE=$9
 TCONV_1="default"
 TCONV_2=""
 
-if [ "$TEST_CCONV1" != "" ]; then
+if [ -z "$TEST_CCONV1" ]; then
        TCONV_1=$TEST_CCONV1
        TCONV_2=$TEST_CCONV2
 fi
@@ -63,7 +63,7 @@ echo $TEST_FILE
 
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/RET_1/${TEST_RET_TYPE1}/g" -e "s/RET_2/${TEST_RET_TYPE2}/g" -e "s/PARAM_1/${TEST_PARAM_TYPE1}/g" -e "s/PARAM_2/${TEST_PARAM_TYPE2}/g"> $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -113,23 +113,23 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/RET_1/${TEST_RET_TYPE1}/g" -e "s/R
 
 .class public auto ansi sealed TargetDelegate extends [mscorlib]System.MulticastDelegate
 {
-       .method public hidebysig  specialname  rtspecialname 
-               instance default void .ctor (object 'object', native int 'method')  runtime managed 
+       .method public hidebysig  specialname  rtspecialname
+               instance default void .ctor (object 'object', native int 'method')  runtime managed
        {
        }
 
        .method public virtual  hidebysig  newslot
-               instance $TCONV_1 RET_1 Invoke (PARAM_1 V_0)  runtime managed 
+               instance $TCONV_1 RET_1 Invoke (PARAM_1 V_0)  runtime managed
        {
        }
 
-       .method public virtual hidebysig  newslot 
-               instance default class [mscorlib]System.IAsyncResult BeginInvoke (class [mscorlib]System.AsyncCallback callback, object 'object')  runtime managed 
+       .method public virtual hidebysig  newslot
+               instance default class [mscorlib]System.IAsyncResult BeginInvoke (class [mscorlib]System.AsyncCallback callback, object 'object')  runtime managed
        {
        }
 
-       .method public virtual  hidebysig  newslot 
-               instance default RET_1 EndInvoke (class [mscorlib]System.IAsyncResult result)  runtime managed 
+       .method public virtual  hidebysig  newslot
+               instance default RET_1 EndInvoke (class [mscorlib]System.IAsyncResult result)  runtime managed
        {
        }
 }
@@ -139,9 +139,9 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/RET_1/${TEST_RET_TYPE1}/g" -e "s/R
 {
        $MANAGED_METHOD
 
-       .method public static pinvokeimpl ("libtest" as "Bla" winapi) $TCONV_2 RET_2 NativeMethod (PARAM_2 V_0)  cil managed 
+       .method public static pinvokeimpl ("libtest" as "Bla" winapi) $TCONV_2 RET_2 NativeMethod (PARAM_2 V_0)  cil managed
     {
-    } 
+    }
 
        .method public static int32 Foo() cil managed
        {
@@ -150,7 +150,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/RET_1/${TEST_RET_TYPE1}/g" -e "s/R
                .locals init ($LOCAL_PARAM_1 ARG)
 
                ldnull
-               
+
                $LDFTN
                newobj instance void class TargetDelegate::.ctor(object, native int) // VALIDITY
                ldloc.0
index afa445a..d5a93b5 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -38,99 +38,99 @@ $SED -e "s/OPCODE/${TEST_OP}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/DELEGAT
 {
        .field  private  int32 dd
 
-       .method public virtual hidebysig instance default string ToString ()  cil managed 
+       .method public virtual hidebysig instance default string ToString ()  cil managed
        {
                .maxstack 8
                ldstr "test"
-               ret 
+               ret
        }
 
-       .method public hidebysig instance default void NonVirtMethod ()  cil managed 
+       .method public hidebysig instance default void NonVirtMethod ()  cil managed
        {
                .maxstack 8
-               ret 
+               ret
        }
 
 }
 
 .class public auto ansi sealed ToStringDelegate extends [mscorlib]System.MulticastDelegate
 {
-       .method public hidebysig  specialname  rtspecialname 
-               instance default void .ctor (object 'object', native int 'method')  runtime managed 
+       .method public hidebysig  specialname  rtspecialname
+               instance default void .ctor (object 'object', native int 'method')  runtime managed
        {
        }
 
        .method public virtual  hidebysig  newslot
-               instance default string Invoke ()  runtime managed 
+               instance default string Invoke ()  runtime managed
        {
        }
 
-       .method public virtual  hidebysig  newslot 
-               instance default class [mscorlib]System.IAsyncResult BeginInvoke (class [mscorlib]System.AsyncCallback callback, object 'object')  runtime managed 
+       .method public virtual  hidebysig  newslot
+               instance default class [mscorlib]System.IAsyncResult BeginInvoke (class [mscorlib]System.AsyncCallback callback, object 'object')  runtime managed
        {
        }
 
-       .method public virtual  hidebysig  newslot 
-               instance default string EndInvoke (class [mscorlib]System.IAsyncResult result)  runtime managed 
+       .method public virtual  hidebysig  newslot
+               instance default string EndInvoke (class [mscorlib]System.IAsyncResult result)  runtime managed
        {
        }
 }
 
 .class public auto ansi sealed DelegateNoArg extends [mscorlib]System.MulticastDelegate
 {
-       .method public hidebysig  specialname  rtspecialname 
-               instance default void .ctor (object 'object', native int 'method')  runtime managed 
+       .method public hidebysig  specialname  rtspecialname
+               instance default void .ctor (object 'object', native int 'method')  runtime managed
        {
        }
 
        .method public virtual  hidebysig  newslot
-               instance default void Invoke ()  runtime managed 
+               instance default void Invoke ()  runtime managed
        {
        }
 
-       .method public virtual  hidebysig  newslot 
-               instance default class [mscorlib]System.IAsyncResult BeginInvoke (class [mscorlib]System.AsyncCallback callback, object 'object')  runtime managed 
+       .method public virtual  hidebysig  newslot
+               instance default class [mscorlib]System.IAsyncResult BeginInvoke (class [mscorlib]System.AsyncCallback callback, object 'object')  runtime managed
        {
        }
 
-       .method public virtual  hidebysig  newslot 
-               instance default void EndInvoke (class [mscorlib]System.IAsyncResult result)  runtime managed 
+       .method public virtual  hidebysig  newslot
+               instance default void EndInvoke (class [mscorlib]System.IAsyncResult result)  runtime managed
        {
        }
-} 
+}
 
 .class public auto ansi sealed DelegateIntArg extends [mscorlib]System.MulticastDelegate
 {
-       .method public hidebysig  specialname  rtspecialname 
-               instance default void .ctor (object 'object', native int 'method')  runtime managed 
+       .method public hidebysig  specialname  rtspecialname
+               instance default void .ctor (object 'object', native int 'method')  runtime managed
        {
        }
 
        .method public virtual  hidebysig  newslot
-               instance default void Invoke (int32 d)  runtime managed 
+               instance default void Invoke (int32 d)  runtime managed
        {
        }
 
-       .method public virtual  hidebysig  newslot 
-               instance default class [mscorlib]System.IAsyncResult BeginInvoke (int32 d, class [mscorlib]System.AsyncCallback callback, object 'object')  runtime managed 
+       .method public virtual  hidebysig  newslot
+               instance default class [mscorlib]System.IAsyncResult BeginInvoke (int32 d, class [mscorlib]System.AsyncCallback callback, object 'object')  runtime managed
        {
        }
 
-       .method public virtual  hidebysig  newslot 
-               instance default void EndInvoke (class [mscorlib]System.IAsyncResult result)  runtime managed 
+       .method public virtual  hidebysig  newslot
+               instance default void EndInvoke (class [mscorlib]System.IAsyncResult result)  runtime managed
        {
        }
-} 
+}
 
 .class public Parent
        extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed
        {
                .maxstack 8
                ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
        .method public virtual void VirtMethod ()
@@ -163,12 +163,12 @@ $SED -e "s/OPCODE/${TEST_OP}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/DELEGAT
 .class public auto ansi beforefieldinit Driver
         extends Parent
 {
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed
        {
                .maxstack 8
                ldarg.0
                call instance void Parent::.ctor()
-               ret 
+               ret
        }
 
        .method public static void Method ()
@@ -210,7 +210,7 @@ $SED -e "s/OPCODE/${TEST_OP}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/DELEGAT
        {
                .maxstack 8
                .locals init (MyValueType V_0)
-       
+
                OPCODE
                LDFTN_OP
 DELEGATE_OP:
@@ -234,11 +234,11 @@ DELEGATE_OP:
                {
                        pop
                        leave END
-       
+
                }
 END:
                ldc.i4.0
-               ret 
+               ret
 
        }
 }
index f6271e2..2fc11c7 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -50,7 +50,7 @@ $SED -e "s/CLASS_ACCESS/${TEST_CLASS_ACCESS}/g" -e "s/NESTED_ACCESS/${TEST_NESTE
   .ver  0:0:0:0
 }
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly extern mscorlib
@@ -71,7 +71,7 @@ $SED -e "s/CLASS_ACCESS/${TEST_CLASS_ACCESS}/g" -e "s/NESTED_ACCESS/${TEST_NESTE
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
                ret
        }
@@ -84,7 +84,7 @@ $SED -e "s/CLASS_ACCESS/${TEST_CLASS_ACCESS}/g" -e "s/NESTED_ACCESS/${TEST_NESTE
                .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
                {
                        .maxstack 8
-                       ldarg.0 
+                       ldarg.0
                        call instance void object::.ctor()
                        ret
                }
@@ -93,8 +93,8 @@ $SED -e "s/CLASS_ACCESS/${TEST_CLASS_ACCESS}/g" -e "s/NESTED_ACCESS/${TEST_NESTE
                {
                        .maxstack 8
                        ldc.i4.0
-                       ret 
-               }               
+                       ret
+               }
        }
 }
 
@@ -112,7 +112,7 @@ $SED -e "s/CLASS_ACCESS/${TEST_CLASS_ACCESS}/g" -e "s/NESTED_ACCESS/${TEST_NESTE
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                ROOT_CONSTRUCTOR
                ret
        }
@@ -123,13 +123,13 @@ $SED -e "s/CLASS_ACCESS/${TEST_CLASS_ACCESS}/g" -e "s/NESTED_ACCESS/${TEST_NESTE
                {
                        .maxstack 8
                        ldc.i4.0
-                       ret 
+                       ret
                }
 
                .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
                {
                        .maxstack 8
-                       ldarg.0 
+                       ldarg.0
                        NESTED_CONSTRUCTOR
                        ret
                }
index 5f6c538..24c38e9 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -42,11 +42,11 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/FILTER_EXTRAS/${TEST_FILTER_EXTRAS
        .try
        {
                nop
-               nop 
+               nop
 
                ${LEAVE_2}
         }
-        catch [mscorlib]System.Exception 
+        catch [mscorlib]System.Exception
        {
                pop
                ${LEAVE_3}
@@ -73,14 +73,14 @@ TRY_2:
 
                leave END
 
-       } catch [mscorlib]System.Exception 
+       } catch [mscorlib]System.Exception
        {
                pop
                leave END
        }
 
 NEXT_4:
-       .try 
+       .try
        {
                nop
                nop
index 1038536..2234131 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -39,7 +39,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LOCAL/${TEST_LOCAL}/g"  -e "s/BLOC
                ${OPCODE_2}
                leave TRY_2
         }
-        catch [mscorlib]System.NullReferenceException 
+        catch [mscorlib]System.NullReferenceException
        {
                pop
                ${OPCODE_3}
@@ -70,7 +70,7 @@ TRY_3:
                        nop
                        leave TRY_4
                }
-               catch [mscorlib]System.NullReferenceException 
+               catch [mscorlib]System.NullReferenceException
                {
                        pop
                        ${OPCODE_5}
@@ -86,7 +86,7 @@ TRY_3:
 
 TRY_4:
 
-       .try 
+       .try
        {
                nop
                leave END
index c46d882..88111a2 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -18,7 +18,7 @@ TEST_OP5=$7
 TEST_FILE=${TEST_VALIDITY}_exception_branch_${TEST_NAME}_generated.il
 echo $TEST_FILE
 $SED -e "s/OPCODE1/${TEST_OP1}/g" -e "s/OPCODE2/${TEST_OP2}/g" -e "s/OPCODE3/${TEST_OP3}/g" -e "s/OPCODE4/${TEST_OP4}/g" -e "s/OPCODE5/${TEST_OP5}/g" > $TEST_FILE <<//EOF
-// ${TEST_VALIDITY} CIL which breaks the ECMA-335 rules. 
+// ${TEST_VALIDITY} CIL which breaks the ECMA-335 rules.
 // This CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -42,7 +42,7 @@ branch_target1:
                OPCODE2
                leave branch_target5
         }
-        catch [mscorlib]System.Exception 
+        catch [mscorlib]System.Exception
        {
                pop
 branch_target2:
@@ -61,7 +61,7 @@ branch_target3:
                OPCODE4
                endfinally
        }
-       .try 
+       .try
        {
                nop
                leave branch_target5
index 0647eed..52289bf 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -25,7 +25,7 @@ AFTER_PREFIX_3:
        pop
 
 FILTER_BLOCK_3_A:
-       stloc.0 
+       stloc.0
        nop
        nop
        ldc.i4.0
@@ -48,7 +48,7 @@ AFTER_PREFIX_6:
        pop
 
 FINALLY_BLOCK_1_A:
-       stloc.0 
+       stloc.0
        nop
        nop
        ldc.i4.0
@@ -76,7 +76,7 @@ $SED -e "s/EXCEPTION_BLOCK_1/${TEST_BLOCK_1}/g" -e "s/EXCEPTION_BLOCK_2/${TEST_B
         .entrypoint
         .maxstack 8
        .locals init (object _X0, int32 V0)
+
        ldloca 1
        volatile.
 AFTER_PREFIX_1:
@@ -84,7 +84,7 @@ AFTER_PREFIX_1:
        ldind.i4
        pop
 
-       
+
 TRY_BLOCK_1:
        nop
 TRY_BLOCK_1_A:
@@ -111,7 +111,7 @@ ${FINALLY_BLOCK}
 CATCH_BLOCK_1:
        nop
 CATCH_BLOCK_1_A:
-       stloc.0 
+       stloc.0
        nop
 
        ldloca 1
@@ -147,7 +147,7 @@ TRY_BLOCK_2_END:
 CATCH_BLOCK_2:
        nop
 CATCH_BLOCK_2_A:
-       stloc.0 
+       stloc.0
        nop
        nop
        leave END
index 8d72117..b605bbd 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -30,7 +30,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g"  -e "s/CSTOR/${TEST_CSTOR}/g"  -e "s/OPC
   .ver  0:0:0:0
 }
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly extern mscorlib
@@ -60,7 +60,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g"  -e "s/CSTOR/${TEST_CSTOR}/g"  -e "s/OPC
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
                ret
        }
@@ -76,7 +76,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g"  -e "s/CSTOR/${TEST_CSTOR}/g"  -e "s/OPC
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
                ret
        }
@@ -90,7 +90,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g"  -e "s/CSTOR/${TEST_CSTOR}/g"  -e "s/OPC
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void ClassA::.ctor()
                ret
        }
@@ -109,7 +109,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g"  -e "s/CSTOR/${TEST_CSTOR}/g"  -e "s/OPC
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
                ret
        }
@@ -122,7 +122,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g"  -e "s/CSTOR/${TEST_CSTOR}/g"  -e "s/OPC
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void Overlapped::.ctor()
                ret
        }
index ccc55e1..c62ba7b 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -21,7 +21,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g"  -e "s/LOAD/${TEST_LOAD}/g"  -e "s/OPCOD
   .ver  0:0:0:0
 }
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly extern mscorlib
index 0f0769e..c75795f 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -12,18 +12,16 @@ TEST_DEST=$4
 TEST_INST_TYPE=$5
 
 INST_TYPE="DefaultArgument";
-if [ "$TEST_INST_TYPE" != "" ]; then
+if [ -n "$TEST_INST_TYPE" ]; then
        INST_TYPE="$TEST_INST_TYPE";
 fi
 
-
-
 TEST_NAME=${TEST_VALIDITY}_${TEST_NAME}
 TEST_FILE=${TEST_NAME}_generated.il
 echo $TEST_FILE
 $SED -e "s/INIT/${TEST_INIT}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TARGET_CONSTRAINT/${TEST_DEST}/g" -e "s/SOURCE_CONSTRAINT/${TEST_SRC}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -42,33 +40,33 @@ $SED -e "s/INIT/${TEST_INIT}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TARGET_
 
 .class interface public auto ansi abstract IfaceA
 {
-} 
+}
 
 .class interface public auto ansi abstract IfaceB
 {
-} 
+}
 
 .class public auto ansi Class extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname  rtspecialname instance default void '.ctor' ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void '.ctor' ()  cil managed
        {
            .maxstack 8
-               ldarg.0 
+               ldarg.0
            call instance void object::'.ctor'()
-           ret 
+           ret
        }
-} 
+}
 
 .class public auto ansi DefaultArgument        extends Class implements IfaceA, IfaceB
 {
-       .method public hidebysig  specialname  rtspecialname instance default void '.ctor' ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void '.ctor' ()  cil managed
        {
            .maxstack 8
-               ldarg.0 
+               ldarg.0
            call instance void Class::'.ctor'()
-           ret 
+           ret
        }
-} 
+}
 
 
 
@@ -76,12 +74,12 @@ $SED -e "s/INIT/${TEST_INIT}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TARGET_
         extends [mscorlib]System.Object
 {
 
-       .method public hidebysig  specialname  rtspecialname instance default void '.ctor' ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void '.ctor' ()  cil managed
        {
            .maxstack 8
-               ldarg.0 
+               ldarg.0
            call instance void object::'.ctor'()
-           ret 
+           ret
        }
 
        .method public static void Method< SOURCE_CONSTRAINT T> ()
@@ -110,7 +108,7 @@ $SED -e "s/INIT/${TEST_INIT}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TARGET_
        call void class Test2< $INST_TYPE >::Method()
 
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index 8bc47a9..55f52e4 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -14,23 +14,23 @@ TEST_BYTE_3=$6
 TEST_BYTE_4=$7
 
 
-if [ "$TEST_BYTE_1" != "" ] ; then
+if [ -n "$TEST_BYTE_1" ]; then
        EMIT_BYTE_1=".emitbyte $TEST_BYTE_1";
 fi
 
-if [ "$TEST_BYTE_2" != "" ] ; then
+if [ -n "$TEST_BYTE_2" ]; then
        EMIT_BYTE_2=".emitbyte $TEST_BYTE_2";
 fi
 
-if [ "$TEST_BYTE_3" != "" ] ; then
+if [ -n "$TEST_BYTE_3" ]; then
        EMIT_BYTE_3=".emitbyte $TEST_BYTE_3";
 fi
 
-if [ "$TEST_BYTE_4" != "" ] ; then
+if [ -n "$TEST_BYTE_4" ]; then
        EMIT_BYTE_4=".emitbyte $TEST_BYTE_4";
 fi
 
-if [ "$TEST_BYTE_5" != "" ] ; then
+if [ -n "$TEST_BYTE_5" ]; then
        EMIT_BYTE_5=".emitbyte $TEST_BYTE_5";
 fi
 
@@ -38,7 +38,7 @@ TEST_FILE=`echo ${TEST_VALIDITY}_${TEST_NAME} | $SED -e 's/ /_/g' -e 's/\./_/g'
 echo $TEST_FILE
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/BYTE_0/${TEST_BYTE_0}/g" -e "s/BYTE_1/${TEST_BYTE_1}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index 5b1e064..84c67c5 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -86,7 +86,7 @@ $SED -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE2
        initobj TYPE2 // VALIDITY
 
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index 3b68b51..0dbcd9f 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -16,7 +16,7 @@ echo $TEST_FILE
 
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE/${TEST_TYPE}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -27,15 +27,15 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE/${TEST_TYPE}/g" > $TEST_FILE
 
 .class public auto ansi beforefieldinit Driver extends [mscorlib]System.Object
 {
-       .method public static  hidebysig default TYPE Foo ()  cil managed 
+       .method public static  hidebysig default TYPE Foo ()  cil managed
     {
                .maxstack 8
                .locals init (TYPE V_0)
-               ldloc.0 
-               ret 
+               ldloc.0
+               ret
        }
 
-       .method public static  hidebysig default int32 Main ()  cil managed 
+       .method public static  hidebysig default int32 Main ()  cil managed
        {
                .entrypoint
                .maxstack 2
@@ -43,7 +43,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE/${TEST_TYPE}/g" > $TEST_FILE
                call TYPE class Driver::Foo()
                pop
                ldc.i4.0
-               ret 
+               ret
        }
 }
 
index 8f1f48f..a86e92e 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -17,7 +17,7 @@ TEST_FILE=${TEST_NAME}_generated.il
 echo $TEST_FILE
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/ARR/${TEST_ARR}/g" -e "s/IDX/${TEST_IDX}/g" -e "s/LD/${TEST_LD}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -105,7 +105,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/ARR/${TEST_ARR}/g" -e "s/IDX/${TES
                call void foo ()
                leave END
        } catch [mscorlib]System.NullReferenceException {
-               pop 
+               pop
                leave END
 
         }
index 3a283e5..9524b93 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -17,7 +17,7 @@ TEST_FILE=${TEST_NAME}_generated.il
 echo $TEST_FILE
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/ARR/${TEST_ARR}/g" -e "s/IDX/${TEST_IDX}/g" -e "s/TOKEN/${TEST_TOKEN}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -54,7 +54,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/ARR/${TEST_ARR}/g" -e "s/IDX/${TES
                call void foo ()
                leave END
        } catch [mscorlib]System.NullReferenceException {
-               pop 
+               pop
                leave END
 
         }
index a06545d..132c5a5 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -30,12 +30,12 @@ $SED -e "s/OPCODE/${TEST_OP}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LDFTN_O
 .class public Test
        extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed
        {
                .maxstack 8
                ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
        .method public virtual void VirtMethod ()
@@ -77,7 +77,7 @@ $SED -e "s/OPCODE/${TEST_OP}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LDFTN_O
                LDFTN_OP
                pop
                ldc.i4.0
-               ret 
+               ret
        }
 }
 //EOF
index d0a967d..8357303 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -14,7 +14,7 @@ TEST_FILE=${TEST_NAME}_generated.il
 echo $TEST_FILE
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE/${TEST_TYPE}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index 4a2f84a..320ae71 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -84,7 +84,7 @@ $SED -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE2
        ldobj TYPE2 // VALIDITY
        pop
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index 3c570f4..1b9267a 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -45,13 +45,13 @@ $SED -e "s/OPCODE/${TEST_OP}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/CALL_OP
                CALL_OP
                pop
                ldc.i4.0
-               ret 
+               ret
        }
 
 }
 
 
+
 
 
 //EOF
index 5eefd91..735d126 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -30,12 +30,12 @@ $SED -e "s/OPCODE/${TEST_OP}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LDFTN_O
 .class public Test
        extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed
        {
                .maxstack 8
                ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
        .method public virtual void VirtMethod ()
@@ -89,7 +89,7 @@ $SED -e "s/OPCODE/${TEST_OP}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LDFTN_O
                pop
 
                ldc.i4.0
-               ret 
+               ret
        }
 }
 //EOF
index 33a4efa..9fb62b3 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -42,7 +42,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE_EXTRA_1/${OPCODE_EXTRA_1}/g
                throw
                leave END
         }
-        catch [mscorlib]System.Exception 
+        catch [mscorlib]System.Exception
        {
                pop
                leave END
@@ -51,7 +51,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE_EXTRA_1/${OPCODE_EXTRA_1}/g
        .try
        {
                newobj instance void class [mscorlib]System.Exception::.ctor()
-               throw 
+               throw
                leave END
        }
        finally
@@ -63,10 +63,10 @@ END_2:
                endfinally
        }
 
-       .try 
+       .try
        {
                newobj instance void class [mscorlib]System.Exception::.ctor()
-               throw 
+               throw
                leave END
        }
        filter
index b6637ca..3c4c44a 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -55,7 +55,7 @@ $SED -e "s/TYPE/${TEST_TYPE}/g"  -e "s/OP/${TEST_OP}/g" > $TEST_FILE <<//EOF
        OP
        stloc.0
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index dd08dc5..46abd4b 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -20,7 +20,7 @@ TEST_PARAMS=`echo $TEST_PARAMS | $SED -s 's/&/\\\&/'`
 TEST_LOCALS=`echo $TEST_LOCALS | $SED -s 's/&/\\\&/'`
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/PARAMS/${TEST_PARAMS}/g" -e "s/LOCALS/${TEST_LOCALS}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/ARGS/${TEST_ARGS}/g" -e "s/SIG/${TEST_SIG}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index e53849c..67ab141 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -68,7 +68,7 @@ TEST_TYPE1=`echo $TEST_TYPE1 | $SED -s 's/&/\\\&/'`
 
 $SED -e "s/OPCODE/${TEST_OP}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/INIT/${TEST_INIT}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index 97f4f5d..2dcf419 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -17,7 +17,7 @@ echo $TEST_FILE
 
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/INSTANTIATION/${TEST_INSTANTIATION}/g" -e "s/CONSTRAINTS/${TEST_CONSTRAINTS}/g" -e "s/EXTRA_CODE/${TEST_EXTRA_CODE}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -34,25 +34,25 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/INSTANTIATION/${TEST_INSTANTIATION
 
 .class interface public auto ansi abstract IFace
 {
-       .method public virtual hidebysig newslot abstract instance default void Tst ()  cil managed 
+       .method public virtual hidebysig newslot abstract instance default void Tst ()  cil managed
        {
        }
 }
 
 .class public auto ansi beforefieldinit IFaceImpl extends [mscorlib]System.Object implements IFace
 {
-       .method public hidebysig specialname rtspecialname instance default void '.ctor' () cil managed 
+       .method public hidebysig specialname rtspecialname instance default void '.ctor' () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::'.ctor'()
-               ret 
+               ret
        }
 
-       .method public final virtual hidebysig newslot instance default void Tst () cil managed 
+       .method public final virtual hidebysig newslot instance default void Tst () cil managed
        {
                .maxstack 8
-               ret 
+               ret
        }
 }
 
@@ -60,45 +60,45 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/INSTANTIATION/${TEST_INSTANTIATION
 
 .class ClassNoDefaultCtor extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor (int32 d) cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor (int32 d) cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 }
 
 .class abstract AbstractClass extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 }
 
 .class ClassWithDefaultCtorNotVisible extends [mscorlib]System.Object
 {
-       .method private hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method private hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 }
 
 .class ClassWithDefaultCtor extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 }
 
@@ -119,12 +119,12 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/INSTANTIATION/${TEST_INSTANTIATION
 
 .class TemplateTarget extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
        .method public void DoStuff<CONSTRAINTS T> () cil managed
index 3e3f6a8..1e3e7c6 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -80,7 +80,7 @@ $SED -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/TYPE2/${TEST_TYPE2}/g" -e "s/VALIDITY/${
        pop
 
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index 5fd4166..b721cfb 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -31,7 +31,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CONSTRU
   .ver  0:0:0:0
 }
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly extern mscorlib
@@ -52,7 +52,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CONSTRU
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
                ret
        }
@@ -65,7 +65,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CONSTRU
                .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
                {
                        .maxstack 8
-                       ldarg.0 
+                       ldarg.0
                        call instance void object::.ctor()
                        ret
                }
@@ -74,8 +74,8 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CONSTRU
                {
                        .maxstack 8
                        ldc.i4.0
-                       ret 
-               }               
+                       ret
+               }
        }
 }
 
@@ -93,7 +93,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CONSTRU
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                CONSTRUCTOR
                ret
        }
index 464695b..b97d3bd 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -49,7 +49,7 @@ $SED -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE2
        POST_OP
        pop
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index d8e4a62..e7925ce 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -16,7 +16,7 @@ TEST_FILE=${TEST_NAME}_generated.il
 echo $TEST_FILE
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE1/${TEST1_TYPE}/g" -e "s/TYPE2/${TEST2_TYPE}/g" -e "s/OPCODE/${TEST_OP}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -33,28 +33,28 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE1/${TEST1_TYPE}/g" -e "s/TYPE2
 
 .class ClassA extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor (TYPE2 tp)  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor (TYPE2 tp)  cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor (TYPE2 a1, TYPE2 a2)  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor (TYPE2 a1, TYPE2 a2)  cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
        .method public instance void ctor(TYPE2 tp)
@@ -69,10 +69,10 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE1/${TEST1_TYPE}/g" -e "s/TYPE2
                ret
        }
 
-       .method public hidebysig  specialname  rtspecialname static default void .cctor ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname static default void .cctor ()  cil managed
        {
                .maxstack 8
-               ret 
+               ret
        }
 
        .method public instance void Method1()
@@ -94,12 +94,12 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE1/${TEST1_TYPE}/g" -e "s/TYPE2
 
 .class abstract AbsClass extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 }
 
@@ -107,10 +107,10 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE1/${TEST1_TYPE}/g" -e "s/TYPE2
 {
        .field private int32 v
 
-       .method public hidebysig specialname rtspecialname instance default void .ctor ()  cil managed 
+       .method public hidebysig specialname rtspecialname instance default void .ctor ()  cil managed
        {
                .maxstack 8
-               ret 
+               ret
        }
 }
 
index 6390c65..9b9ee6d 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -32,7 +32,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/CLASS_FIELDS/${CLASS_FIELDS}/g" -e
   .ver  0:0:0:0
 }
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly extern mscorlib
@@ -69,7 +69,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/CLASS_FIELDS/${CLASS_FIELDS}/g" -e
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
                ret
        }
index 239e27d..0bc9aa3 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -12,7 +12,7 @@ TEST_POS_1=$4
 TEST_POS_2=$5
 TEST_TYPE_0=$6
 
-if [ "x$TEST_TYPE_0" = "x" ] ; then
+if [ "x$TEST_TYPE_0" = "x" ]; then
        TEST_TYPE_0="int32";
 fi
 
@@ -21,7 +21,7 @@ echo $TEST_FILE
 TEST_TYPE1=`echo $TEST_TYPE1 | $SED -s 's/&/\\\&/'`
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE_0/${TEST_TYPE_0}/g"> $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -36,10 +36,10 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE_0/${TEST_TYPE_0}/g"> $TEST_FI
     .field [${TEST_POS_1}] public object objVal
        .field [${TEST_POS_2}] public int32 intVal2
 
-       .method public hidebysig  specialname  rtspecialname instance default void '.ctor' ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void '.ctor' ()  cil managed
        {
                .maxstack 8
-               ret 
+               ret
     }
 }
 
index f6e311c..05f24b9 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -34,12 +34,12 @@ $SED  -e "s/TYPE/${TEST_TYPE}/g" -e "s/OPCODE/${TEST_OP}/g"  -e "s/BEFORE_OP/${T
 {
     .field public int32 valid
 
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor (int32&)  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor (int32&)  cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
        .method public virtual void VirtTest (ClassA& arg)
@@ -103,7 +103,7 @@ $SED  -e "s/TYPE/${TEST_TYPE}/g" -e "s/OPCODE/${TEST_OP}/g"  -e "s/BEFORE_OP/${T
        leave END
 END:
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index 1f512fd..3ff8788 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -17,7 +17,7 @@ TEST_TYPE1=`echo $TEST_TYPE1 | $SED -s 's/&/\\\&/'`
 TEST_TYPE2=`echo $TEST_TYPE2 | $SED -s 's/&/\\\&/'`
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/TYPE2/${TEST_TYPE2}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index cedc47f..8530382 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -37,7 +37,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LOCAL/${TEST_LOCAL}/g" > $TEST_FIL
                ${OPCODE_2}
                leave END
         }
-        catch [mscorlib]System.NullReferenceException 
+        catch [mscorlib]System.NullReferenceException
        {
                pop
                ${OPCODE_3}
@@ -47,7 +47,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LOCAL/${TEST_LOCAL}/g" > $TEST_FIL
                        ${OPCODE_4}
                        leave END
                }
-               catch [mscorlib]System.NullReferenceException 
+               catch [mscorlib]System.NullReferenceException
                {
                        pop
                        ${OPCODE_5}
@@ -55,7 +55,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LOCAL/${TEST_LOCAL}/g" > $TEST_FIL
                }
 
 
-               .try 
+               .try
                {
                        nop
                        leave END
@@ -87,7 +87,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LOCAL/${TEST_LOCAL}/g" > $TEST_FIL
                endfinally
        }
 
-       .try 
+       .try
        {
                nop
                leave END
index c652117..763ed67 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -22,7 +22,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CLASS_A
   .ver  0:0:0:0
 }
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly extern mscorlib
@@ -36,7 +36,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CLASS_A
        .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
                ret
        }
@@ -49,7 +49,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CLASS_A
                .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
                {
                        .maxstack 8
-                       ldarg.0 
+                       ldarg.0
                        call instance void object::.ctor()
                        ret
                }
@@ -58,8 +58,8 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CLASS_A
                {
                        .maxstack 8
                        ldc.i4.0
-                       ret 
-               }               
+                       ret
+               }
        }
 
        .method public void Method ()
index 135b21e..a8d2edb 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -15,7 +15,7 @@ TEST_TYPE1=`echo $TEST_TYPE1 | $SED -s 's/&/\\\&/'`
 
 $SED -e "s/OPCODE/${TEST_OP}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE1/${TEST_TYPE1}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index ee66cd3..c4ef5bd 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -11,7 +11,7 @@ TEST_OP_SHORT=`echo $TEST_OP | cut -d " " -f 1`
 TEST_FILE=`echo invalid_stack_0_${TEST_OP_SHORT} | $SED -e "s/ /_/g" -e "s/\./_/g" -e "s/&/mp/g"`_generated.il
 echo $TEST_FILE
 $SED -e "s/OPCODE/${TEST_OP}/g" > $TEST_FILE <<//EOF
-// invalid CIL which breaks the ECMA-335 rules. 
+// invalid CIL which breaks the ECMA-335 rules.
 // This CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index 948b2e5..3027e12 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -12,7 +12,7 @@ TEST_OP_SHORT=`echo $TEST_OP | cut -d " " -f 1`
 TEST_FILE=`echo ${TEST_VALIDITY}_stack_0_${TEST_OP_SHORT} | $SED -e "s/ /_/g" -e "s/\./_/g" -e "s/&/mp/g"`_generated.il
 echo $TEST_FILE
 $SED -e "s/OPCODE/${TEST_OP}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" > $TEST_FILE <<//EOF
-// invalid CIL which breaks the ECMA-335 rules. 
+// invalid CIL which breaks the ECMA-335 rules.
 // This CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index ea4cf43..d014963 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
index 5ffeb83..81a6178 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -17,7 +17,7 @@ TEST_TYPE1=`echo $TEST_TYPE1 | $SED -s 's/&/\\\&/'`
 TEST_TYPE2=`echo $TEST_TYPE2 | $SED -s 's/&/\\\&/'`
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/TYPE2/${TEST_TYPE2}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335,III,1.8.1.3 rule. 
+// VALIDITY CIL which breaks the ECMA-335,III,1.8.1.3 rule.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index b3b9979..5dd8160 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -18,7 +18,7 @@ TEST_FILE=${TEST_NAME}_generated.il
 echo $TEST_FILE
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/ARR/${TEST_ARR}/g" -e "s/IDX/${TEST_IDX}/g" -e "s/VAL/${TEST_VAL}/g" -e "s/LD/${TEST_LD}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -29,25 +29,25 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/ARR/${TEST_ARR}/g" -e "s/IDX/${TES
 
 .class ClassA extends [mscorlib]System.Object
 {
-    .method public hidebysig  specialname  rtspecialname 
-           instance default void .ctor ()  cil managed 
+    .method public hidebysig  specialname  rtspecialname
+           instance default void .ctor ()  cil managed
     {
         .maxstack 8
-        ldarg.0 
+        ldarg.0
         call instance void object::.ctor()
-        ret 
+        ret
     }
 }
 
 .class ClassSubA extends ClassA
 {
-    .method public hidebysig  specialname  rtspecialname 
-           instance default void .ctor ()  cil managed 
+    .method public hidebysig  specialname  rtspecialname
+           instance default void .ctor ()  cil managed
     {
         .maxstack 8
-        ldarg.0 
+        ldarg.0
         call instance void ClassA::.ctor()
-        ret 
+        ret
     }
 }
 
@@ -78,10 +78,10 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/ARR/${TEST_ARR}/g" -e "s/IDX/${TES
                call void foo ()
                leave END
        } catch [mscorlib]System.ArrayTypeMismatchException {
-               pop 
+               pop
                leave END
        } catch [mscorlib]System.NullReferenceException {
-               pop 
+               pop
                leave END
 
         }
index d185962..b26952b 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -94,7 +94,7 @@ $SED -e "s/EXTRA_OPS/${TEST_EXTRA_OPS}/g" -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/VAL
 
 
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index 6ff4f90..f0c21d2 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -60,7 +60,7 @@ $SED -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/T1_VAL/${T1_VAL}/g" -e "s/TYPE2/${TEST_T
        ldloc.1
        OP
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index 78e6081..40ebd0b 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -18,7 +18,7 @@ TEST_TYPE1=`echo $TEST_TYPE1 | $SED -s 's/&/\\\&/'`
 TEST_TYPE2=`echo $TEST_TYPE2 | $SED -s 's/&/\\\&/'`
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/TYPE2/${TEST_TYPE2}/g" -e "s/OPCODE/${TEST_OP}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index face162..057c454 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -25,7 +25,7 @@ echo $TEST_FILE
 
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/FINALLY/${TEST_FIN}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -61,7 +61,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/FINALLY
         .entrypoint
         .maxstack 8
        .locals init ( int32 V0, native int V1)
+
        ${BRANCH_EXTRA_1}
        ${BRANCH_1}
         ldc.i4 0x7FFFFFFF
index 82bdccd..c1c339c 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -41,12 +41,12 @@ $SED  -e "s/RET_TYPE/${TEST_RET_TYPE}/g" -e "s/TYPE/${TEST_TYPE}/g" -e "s/OPCODE
 {
     .field public int32 valid
 
-       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed 
+       .method public hidebysig  specialname  rtspecialname instance default void .ctor ()  cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
        .method public virtual void VirtTest ()
@@ -121,7 +121,7 @@ AFTER:
        leave END
 END:
        $LD_RET_CODE
-       ret 
+       ret
 }
 
 
@@ -136,7 +136,7 @@ END:
        leave END
 END:
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index 5674f82..b614b5d 100755 (executable)
@@ -30,7 +30,7 @@ do
   else
        INIT="no";
   fi
-       
+
   ./make_bin_test.sh bin_num_op_32_${I} valid $OP int32 int32 "ldc.i4.1" "${INIT}"
   ./make_bin_test.sh bin_num_op_33_${I} valid $OP int32 'native int' "ldc.i4.1" "${INIT}"
   ./make_bin_test.sh bin_num_op_34_${I} valid $OP int64 int64 "ldc.i8 1" "${INIT}"
@@ -40,7 +40,7 @@ do
   ./make_bin_test.sh bin_num_op_38_${I} valid $OP float32 float64 "ldc.r8 0" "${INIT}"
   ./make_bin_test.sh bin_num_op_39_${I} valid $OP float64 float32 "ldc.r4 0" "${INIT}"
   ./make_bin_test.sh bin_num_op_40_${I} valid $OP float32 float32 "ldc.r4 0" "${INIT}"
-  
+
   ./make_bin_test.sh bin_num_op_1_${I} unverifiable $OP int32 int64 "ldc.i8 1" "${INIT}"
   ./make_bin_test.sh bin_num_op_2_${I} unverifiable $OP int32 float64 "ldc.r8 0" "${INIT}"
   ./make_bin_test.sh bin_num_op_3_${I} unverifiable $OP int32 object "ldnull" "${INIT}"
@@ -184,7 +184,7 @@ do
 done
 
 
-for TYPE in int32 float32 int64 "int32&" "native int" 
+for TYPE in int32 float32 int64 "int32&" "native int"
 do
        ./make_bin_test.sh bin_cgt_un_a_${I} unverifiable 'cgt.un' "${TYPE}" 'object'
        ./make_bin_test.sh bin_cgt_un_b_${I} unverifiable 'cgt.un' 'object' "${TYPE}"
@@ -313,7 +313,7 @@ done
 # Table 8: Conversion Operations
 I=1
 J=1
-for OP in "conv.i1\n\tpop" "conv.i2\n\tpop" "conv.i4\n\tpop" "conv.i8\n\tpop" "conv.r4\n\tpop" "conv.r8\n\tpop" "conv.u1\n\tpop" "conv.u2\n\tpop" "conv.u4\n\tpop" "conv.u8\n\tpop" "conv.i\n\tpop" "conv.u\n\tpop" "conv.r.un\n\tpop" "conv.ovf.i1\n\tpop" "conv.ovf.i2\n\tpop" "conv.ovf.i4\n\tpop" "conv.ovf.i8\n\tpop" "conv.ovf.u1\n\tpop" "conv.ovf.u2\n\tpop" "conv.ovf.u4\n\tpop" "conv.ovf.u8\n\tpop" "conv.ovf.i\n\tpop"  "conv.ovf.u\n\tpop" "conv.ovf.i1.un\n\tpop" "conv.ovf.i2.un\n\tpop" "conv.ovf.i4.un\n\tpop" "conv.ovf.i8.un\n\tpop" "conv.ovf.u1.un\n\tpop" "conv.ovf.u2.un\n\tpop" "conv.ovf.u4.un\n\tpop" "conv.ovf.u8.un\n\tpop" "conv.ovf.i.un\n\tpop"  "conv.ovf.u.un\n\tpop" 
+for OP in "conv.i1\n\tpop" "conv.i2\n\tpop" "conv.i4\n\tpop" "conv.i8\n\tpop" "conv.r4\n\tpop" "conv.r8\n\tpop" "conv.u1\n\tpop" "conv.u2\n\tpop" "conv.u4\n\tpop" "conv.u8\n\tpop" "conv.i\n\tpop" "conv.u\n\tpop" "conv.r.un\n\tpop" "conv.ovf.i1\n\tpop" "conv.ovf.i2\n\tpop" "conv.ovf.i4\n\tpop" "conv.ovf.i8\n\tpop" "conv.ovf.u1\n\tpop" "conv.ovf.u2\n\tpop" "conv.ovf.u4\n\tpop" "conv.ovf.u8\n\tpop" "conv.ovf.i\n\tpop"  "conv.ovf.u\n\tpop" "conv.ovf.i1.un\n\tpop" "conv.ovf.i2.un\n\tpop" "conv.ovf.i4.un\n\tpop" "conv.ovf.i8.un\n\tpop" "conv.ovf.u1.un\n\tpop" "conv.ovf.u2.un\n\tpop" "conv.ovf.u4.un\n\tpop" "conv.ovf.u8.un\n\tpop" "conv.ovf.i.un\n\tpop"  "conv.ovf.u.un\n\tpop"
 do
   for TYPE in 'int8' 'bool' 'unsigned int8' 'int16' 'char' 'unsigned int16' 'int32' 'unsigned int32' 'int64' 'unsigned int64' 'float32' 'float64' 'native int' 'native unsigned int'
   do
@@ -357,55 +357,55 @@ do
   ./make_store_test.sh coercion_14_${I} unverifiable "$OP" int16 float64
   ./make_store_test.sh coercion_15_${I} unverifiable "$OP" int16 'int16&'
   ./make_store_test.sh coercion_16_${I} unverifiable "$OP" int16 object
-  
+
   ./make_store_test.sh coercion_17_${I} unverifiable "$OP" 'unsigned int16' int64
   ./make_store_test.sh coercion_18_${I} unverifiable "$OP" 'unsigned int16' float64
   ./make_store_test.sh coercion_19_${I} unverifiable "$OP" 'unsigned int16' 'unsigned int16&'
   ./make_store_test.sh coercion_20_${I} unverifiable "$OP" 'unsigned int16' object
-  
+
   ./make_store_test.sh coercion_21_${I} unverifiable "$OP" char int64
   ./make_store_test.sh coercion_22_${I} unverifiable "$OP" char float64
   ./make_store_test.sh coercion_23_${I} unverifiable "$OP" char 'char&'
   ./make_store_test.sh coercion_24_${I} unverifiable "$OP" char object
-  
+
   ./make_store_test.sh coercion_25_${I} unverifiable "$OP" int32 int64
   ./make_store_test.sh coercion_26_${I} unverifiable "$OP" int32 float64
   ./make_store_test.sh coercion_27_${I} unverifiable "$OP" int32 'int32&'
   ./make_store_test.sh coercion_28_${I} unverifiable "$OP" int32 object
-  
+
   ./make_store_test.sh coercion_29_${I} unverifiable "$OP" 'unsigned int32' int64
   ./make_store_test.sh coercion_30_${I} unverifiable "$OP" 'unsigned int32' float64
   ./make_store_test.sh coercion_31_${I} unverifiable "$OP" 'unsigned int32' 'unsigned int32&'
   ./make_store_test.sh coercion_32_${I} unverifiable "$OP" 'unsigned int32' object
+
   ./make_store_test.sh coercion_33_${I} unverifiable "$OP" int64 int32
   ./make_store_test.sh coercion_34_${I} unverifiable "$OP" int64 'native int'
   ./make_store_test.sh coercion_35_${I} unverifiable "$OP" int64 float64
   ./make_store_test.sh coercion_36_${I} unverifiable "$OP" int64 'int64&'
   ./make_store_test.sh coercion_37_${I} unverifiable "$OP" int64 object
-  
+
   ./make_store_test.sh coercion_38_${I} unverifiable "$OP" 'unsigned int64' int32
   ./make_store_test.sh coercion_39_${I} unverifiable "$OP" 'unsigned int64' 'native int'
   ./make_store_test.sh coercion_40_${I} unverifiable "$OP" 'unsigned int64' float64
   ./make_store_test.sh coercion_41_${I} unverifiable "$OP" 'unsigned int64' 'unsigned int64&'
   ./make_store_test.sh coercion_42_${I} unverifiable "$OP" 'unsigned int64' object
-  
+
   ./make_store_test.sh coercion_43_${I} unverifiable "$OP" 'native int' int64
   ./make_store_test.sh coercion_44_${I} unverifiable "$OP" 'native int' float64
   ./make_store_test.sh coercion_45_${I} unverifiable "$OP" 'native int' 'native int&'
   ./make_store_test.sh coercion_46_${I} unverifiable "$OP" 'native int' object
-  
+
   ./make_store_test.sh coercion_47_${I} unverifiable "$OP" 'native unsigned int' int64
   ./make_store_test.sh coercion_48_${I} unverifiable "$OP" 'native unsigned int' float64
   ./make_store_test.sh coercion_49_${I} unverifiable "$OP" 'native unsigned int' 'native unsigned int&'
   ./make_store_test.sh coercion_50_${I} unverifiable "$OP" 'native unsigned int' object
-  
+
   ./make_store_test.sh coercion_51_${I} unverifiable "$OP" float32 int32
   ./make_store_test.sh coercion_52_${I} unverifiable "$OP" float32 'native int'
   ./make_store_test.sh coercion_53_${I} unverifiable "$OP" float32 int64
   ./make_store_test.sh coercion_54_${I} unverifiable "$OP" float32 'float32&'
   ./make_store_test.sh coercion_55_${I} unverifiable "$OP" float32 object
-  
+
   ./make_store_test.sh coercion_56_${I} unverifiable "$OP" float64 int32
   ./make_store_test.sh coercion_57_${I} unverifiable "$OP" float64 'native int'
   ./make_store_test.sh coercion_58_${I} unverifiable "$OP" float64 int64
@@ -417,20 +417,20 @@ do
   ./make_store_test.sh coercion_63_${I} unverifiable "$OP" object int64
   ./make_store_test.sh coercion_64_${I} unverifiable "$OP" object float64
   ./make_store_test.sh coercion_65_${I} unverifiable "$OP" object 'object&'
-  
+
   ./make_store_test.sh coercion_66_${I} unverifiable "$OP" 'class ValueType' int32
   ./make_store_test.sh coercion_67_${I} unverifiable "$OP" 'class ValueType' 'native int'
   ./make_store_test.sh coercion_68_${I} unverifiable "$OP" 'class ValueType' int64
   ./make_store_test.sh coercion_69_${I} unverifiable "$OP" 'class ValueType' float64
   ./make_store_test.sh coercion_70_${I} unverifiable "$OP" 'class ValueType' 'class ValueType&'
   ./make_store_test.sh coercion_71_${I} unverifiable "$OP" 'class ValueType' object
-  
+
   ./make_store_test.sh coercion_72_${I} unverifiable "$OP" 'int32&' int32
   ./make_store_test.sh coercion_73_${I} unverifiable "$OP" 'int32&' 'native int'
   ./make_store_test.sh coercion_74_${I} unverifiable "$OP" 'int32&' int64
   ./make_store_test.sh coercion_75_${I} unverifiable "$OP" 'int32&' float64
   ./make_store_test.sh coercion_76_${I} unverifiable "$OP" 'int32&' object
-  
+
   ./make_store_test.sh coercion_77_${I} unverifiable "$OP" typedref int32
   ./make_store_test.sh coercion_78_${I} unverifiable "$OP" typedref 'native int'
   ./make_store_test.sh coercion_89_${I} unverifiable "$OP" typedref int64
@@ -442,7 +442,7 @@ done
 
 #valid coercion between native int and int32
 I=1
-for OP in stloc.0 "starg 0" 
+for OP in stloc.0 "starg 0"
 do
        ./make_store_test.sh coercion_83_${I} valid "$OP" int32 "native int"
        ./make_store_test.sh coercion_84_${I} valid "$OP" "native int" int32
@@ -495,9 +495,9 @@ done
 
 
 function fix () {
-       if [ "$3" != "" ]; then
+       if [ -n "$3" ]; then
                A=$3;
-       elif [ "$2" != "" ]; then
+       elif [ -n "$2" ]; then
                A=$2;
        else
                A=$1;
@@ -595,55 +595,55 @@ do
   ./make_obj_store_test.sh obj_coercion_14_${I} unverifiable "$OP" int16 float64
   ./make_obj_store_test.sh obj_coercion_15_${I} unverifiable "$OP" int16 'int16&'
   ./make_obj_store_test.sh obj_coercion_16_${I} unverifiable "$OP" int16 object
-  
+
   ./make_obj_store_test.sh obj_coercion_17_${I} unverifiable "$OP" 'unsigned int16' int64
   ./make_obj_store_test.sh obj_coercion_18_${I} unverifiable "$OP" 'unsigned int16' float64
   ./make_obj_store_test.sh obj_coercion_19_${I} unverifiable "$OP" 'unsigned int16' 'unsigned int16&'
   ./make_obj_store_test.sh obj_coercion_20_${I} unverifiable "$OP" 'unsigned int16' object
-  
+
   ./make_obj_store_test.sh obj_coercion_21_${I} unverifiable "$OP" char int64
   ./make_obj_store_test.sh obj_coercion_22_${I} unverifiable "$OP" char float64
   ./make_obj_store_test.sh obj_coercion_23_${I} unverifiable "$OP" char 'char&'
   ./make_obj_store_test.sh obj_coercion_24_${I} unverifiable "$OP" char object
-  
+
   ./make_obj_store_test.sh obj_coercion_25_${I} unverifiable "$OP" int32 int64
   ./make_obj_store_test.sh obj_coercion_26_${I} unverifiable "$OP" int32 float64
   ./make_obj_store_test.sh obj_coercion_27_${I} unverifiable "$OP" int32 'int32&'
   ./make_obj_store_test.sh obj_coercion_28_${I} unverifiable "$OP" int32 object
-  
+
   ./make_obj_store_test.sh obj_coercion_29_${I} unverifiable "$OP" 'unsigned int32' int64
   ./make_obj_store_test.sh obj_coercion_30_${I} unverifiable "$OP" 'unsigned int32' float64
   ./make_obj_store_test.sh obj_coercion_31_${I} unverifiable "$OP" 'unsigned int32' 'unsigned int32&'
   ./make_obj_store_test.sh obj_coercion_32_${I} unverifiable "$OP" 'unsigned int32' object
+
   ./make_obj_store_test.sh obj_coercion_33_${I} unverifiable "$OP" int64 int32
   ./make_obj_store_test.sh obj_coercion_34_${I} unverifiable "$OP" int64 'native int'
   ./make_obj_store_test.sh obj_coercion_35_${I} unverifiable "$OP" int64 float64
   ./make_obj_store_test.sh obj_coercion_36_${I} unverifiable "$OP" int64 'int64&'
   ./make_obj_store_test.sh obj_coercion_37_${I} unverifiable "$OP" int64 object
-  
+
   ./make_obj_store_test.sh obj_coercion_38_${I} unverifiable "$OP" 'unsigned int64' int32
   ./make_obj_store_test.sh obj_coercion_39_${I} unverifiable "$OP" 'unsigned int64' 'native int'
   ./make_obj_store_test.sh obj_coercion_40_${I} unverifiable "$OP" 'unsigned int64' float64
   ./make_obj_store_test.sh obj_coercion_41_${I} unverifiable "$OP" 'unsigned int64' 'unsigned int64&'
   ./make_obj_store_test.sh obj_coercion_42_${I} unverifiable "$OP" 'unsigned int64' object
-  
+
   ./make_obj_store_test.sh obj_coercion_43_${I} unverifiable "$OP" 'native int' int64
   ./make_obj_store_test.sh obj_coercion_44_${I} unverifiable "$OP" 'native int' float64
   ./make_obj_store_test.sh obj_coercion_45_${I} unverifiable "$OP" 'native int' 'native int&'
   ./make_obj_store_test.sh obj_coercion_46_${I} unverifiable "$OP" 'native int' object
-  
+
   ./make_obj_store_test.sh obj_coercion_47_${I} unverifiable "$OP" 'native unsigned int' int64
   ./make_obj_store_test.sh obj_coercion_48_${I} unverifiable "$OP" 'native unsigned int' float64
   ./make_obj_store_test.sh obj_coercion_49_${I} unverifiable "$OP" 'native unsigned int' 'native unsigned int&'
   ./make_obj_store_test.sh obj_coercion_50_${I} unverifiable "$OP" 'native unsigned int' object
-  
+
   ./make_obj_store_test.sh obj_coercion_51_${I} unverifiable "$OP" float32 int32
   ./make_obj_store_test.sh obj_coercion_52_${I} unverifiable "$OP" float32 'native int'
   ./make_obj_store_test.sh obj_coercion_53_${I} unverifiable "$OP" float32 int64
   ./make_obj_store_test.sh obj_coercion_54_${I} unverifiable "$OP" float32 'float32&'
   ./make_obj_store_test.sh obj_coercion_55_${I} unverifiable "$OP" float32 object
-  
+
   ./make_obj_store_test.sh obj_coercion_56_${I} unverifiable "$OP" float64 int32
   ./make_obj_store_test.sh obj_coercion_57_${I} unverifiable "$OP" float64 'native int'
   ./make_obj_store_test.sh obj_coercion_58_${I} unverifiable "$OP" float64 int64
@@ -655,15 +655,15 @@ do
   ./make_obj_store_test.sh obj_coercion_63_${I} unverifiable "$OP" object int64
   ./make_obj_store_test.sh obj_coercion_64_${I} unverifiable "$OP" object float64
   ./make_obj_store_test.sh obj_coercion_65_${I} unverifiable "$OP" object 'object&'
-  
+
   ./make_obj_store_test.sh obj_coercion_66_${I} unverifiable "$OP" 'class ValueType' int32
   ./make_obj_store_test.sh obj_coercion_67_${I} unverifiable "$OP" 'class ValueType' 'native int'
   ./make_obj_store_test.sh obj_coercion_68_${I} unverifiable "$OP" 'class ValueType' int64
   ./make_obj_store_test.sh obj_coercion_69_${I} unverifiable "$OP" 'class ValueType' float64
   ./make_obj_store_test.sh obj_coercion_70_${I} unverifiable "$OP" 'class ValueType' 'class ValueType&'
   ./make_obj_store_test.sh obj_coercion_71_${I} unverifiable "$OP" 'class ValueType' object
-  
-  
+
+
   #These tests don't test store error since one cannot have an 'int32&' field
   #They should exist in the structural tests session
   #./make_obj_store_test.sh obj_coercion_72_${I} invalid "$OP" 'int32&' int32
@@ -671,17 +671,17 @@ do
   #./make_obj_store_test.sh obj_coercion_74_${I} invalid "$OP" 'int32&' int64
   #./make_obj_store_test.sh obj_coercion_75_${I} invalid "$OP" 'int32&' float64
   #./make_obj_store_test.sh obj_coercion_76_${I} invalid "$OP" 'int32&' object
-  
+
 
   ./make_obj_store_test.sh obj_coercion_83_${I} valid "$OP" int32 "native int"
   ./make_obj_store_test.sh obj_coercion_84_${I} valid "$OP" "native int" int32
+
   ./make_obj_store_test.sh obj_coercion_85_${I} valid "$OP" "unsigned int32" "native int"
   ./make_obj_store_test.sh obj_coercion_86_${I} valid "$OP" "native int" "unsigned int32"
+
   ./make_obj_store_test.sh obj_coercion_87_${I} valid "$OP" int32 "native unsigned int"
   ./make_obj_store_test.sh obj_coercion_88_${I} valid "$OP" "native unsigned int" int32
+
   ./make_obj_store_test.sh obj_coercion_89_${I} valid "$OP" "unsigned int32" "native int"
   ./make_obj_store_test.sh obj_coercion_90_${I} valid "$OP" "native unsigned int" "unsigned int32"
   I=`expr $I + 1`
@@ -708,7 +708,7 @@ do
   # ClassA not interface type.
   # FIXME: what was the purpoise of this test? on it's current for it is valid and not unverifiable
   ./make_store_test.sh assign_compat_3_${I} valid "$OP" object 'class ClassA'
-  
+
   # Implementation of InterfaceB does not require the implementation of InterfaceA
   ./make_store_test.sh assign_compat_4_${I} unverifiable "$OP" 'class InterfaceA' 'class InterfaceB'
 
@@ -749,7 +749,7 @@ do
   # ClassA not interface type.
   #FIXME: this test is valid, you can store type ClassA in a object field
   ./make_obj_store_test.sh assign_compat_3_${I} valid "$OP" object 'class ClassA'
-  
+
   # Implementation of InterfaceB does not require the implementation of InterfaceA
   ./make_obj_store_test.sh assign_compat_4_${I} unverifiable "$OP" 'class InterfaceA' 'class InterfaceB'
 
@@ -770,13 +770,13 @@ do
 
   # Method pointers with different calling conventions.
   ./make_obj_store_test.sh assign_compat_10_${I} unverifiable "$OP" 'method vararg int32 *(int32)' 'method int32 *(int32)'
-  
+
     # Method pointers with different calling conventions. (2)
   ./make_obj_store_test.sh assign_compat_11_${I} unverifiable "$OP" 'method unmanaged fastcall int32 *(int32)' 'method int32 *(int32)'
-  
+
     # Method pointers with different calling conventions. (3)
   ./make_obj_store_test.sh assign_compat_12_${I} unverifiable "$OP" 'method unmanaged fastcall int32 *(int32)' 'method unmanaged stdcall int32 *(int32)'
-  
+
   I=`expr $I + 1`
 done
 
@@ -790,7 +790,7 @@ do
        T1_PTR=$?
        ZZ=`echo $TYPE2 | grep "*";`
        T2_PTR=$?
-       
+
     if [ $T1_PTR -eq 0 ] || [ $T2_PTR -eq 0 ]; then
                ./make_stack_merge_test.sh stack_merge_${I} unverifiable "$TYPE1" "$TYPE2"
     elif [ "$TYPE1" = "$TYPE2" ]; then
@@ -813,9 +813,9 @@ done
 # Unverifiable array stack merges
 
 # These are verifiable, the merged type is 'object' or 'Array'
-#for TYPE1 in 'string []' 'string [,]' 'string [,,]' 
+#for TYPE1 in 'string []' 'string [,]' 'string [,,]'
 #do
-#  for TYPE2 in 'string []' 'string [,]' 'string [,,]' 
+#  for TYPE2 in 'string []' 'string [,]' 'string [,,]'
 #  do
 #    if [ "$TYPE1" != "$TYPE2" ]; then
 #      ./make_stack_merge_test.sh stack_merge_${I} unverifiable "$TYPE1" "$TYPE2"
@@ -974,55 +974,55 @@ done
 ./make_ret_test.sh ret_coercion_14 unverifiable int16 float64
 ./make_ret_test.sh ret_coercion_15 unverifiable int16 'int16&'
 ./make_ret_test.sh ret_coercion_16 unverifiable int16 object
-  
+
 ./make_ret_test.sh ret_coercion_17 unverifiable 'unsigned int16' int64
 ./make_ret_test.sh ret_coercion_18 unverifiable 'unsigned int16' float64
 ./make_ret_test.sh ret_coercion_19 unverifiable 'unsigned int16' 'unsigned int16&'
 ./make_ret_test.sh ret_coercion_20 unverifiable 'unsigned int16' object
-  
+
 ./make_ret_test.sh ret_coercion_21 unverifiable char int64
 ./make_ret_test.sh ret_coercion_22 unverifiable char float64
 ./make_ret_test.sh ret_coercion_23 unverifiable char 'char&'
 ./make_ret_test.sh ret_coercion_24 unverifiable char object
-  
+
 ./make_ret_test.sh ret_coercion_25 unverifiable int32 int64
 ./make_ret_test.sh ret_coercion_26 unverifiable int32 float64
 ./make_ret_test.sh ret_coercion_27 unverifiable int32 'int32&'
 ./make_ret_test.sh ret_coercion_28 unverifiable int32 object
-  
+
 ./make_ret_test.sh ret_coercion_29 unverifiable 'unsigned int32' int64
 ./make_ret_test.sh ret_coercion_30 unverifiable 'unsigned int32' float64
 ./make_ret_test.sh ret_coercion_31 unverifiable 'unsigned int32' 'unsigned int32&'
 ./make_ret_test.sh ret_coercion_32 unverifiable 'unsigned int32' object
+
 ./make_ret_test.sh ret_coercion_33 unverifiable int64 int32
 ./make_ret_test.sh ret_coercion_34 unverifiable int64 'native int'
 ./make_ret_test.sh ret_coercion_35 unverifiable int64 float64
 ./make_ret_test.sh ret_coercion_36 unverifiable int64 'int64&'
 ./make_ret_test.sh ret_coercion_37 unverifiable int64 object
-  
+
 ./make_ret_test.sh ret_coercion_38 unverifiable 'unsigned int64' int32
 ./make_ret_test.sh ret_coercion_39 unverifiable 'unsigned int64' 'native int'
 ./make_ret_test.sh ret_coercion_40 unverifiable 'unsigned int64' float64
 ./make_ret_test.sh ret_coercion_41 unverifiable 'unsigned int64' 'unsigned int64&'
 ./make_ret_test.sh ret_coercion_42 unverifiable 'unsigned int64' object
-  
+
 ./make_ret_test.sh ret_coercion_43 unverifiable 'native int' int64
 ./make_ret_test.sh ret_coercion_44 unverifiable 'native int' float64
 ./make_ret_test.sh ret_coercion_45 unverifiable 'native int' 'native int&'
 ./make_ret_test.sh ret_coercion_46 unverifiable 'native int' object
-  
+
 ./make_ret_test.sh ret_coercion_47 unverifiable 'native unsigned int' int64
 ./make_ret_test.sh ret_coercion_48 unverifiable 'native unsigned int' float64
 ./make_ret_test.sh ret_coercion_49 unverifiable 'native unsigned int' 'native unsigned int&'
 ./make_ret_test.sh ret_coercion_50 unverifiable 'native unsigned int' object
-  
+
 ./make_ret_test.sh ret_coercion_51 unverifiable float32 int32
 ./make_ret_test.sh ret_coercion_52 unverifiable float32 'native int'
 ./make_ret_test.sh ret_coercion_53 unverifiable float32 int64
 ./make_ret_test.sh ret_coercion_54 unverifiable float32 'float32&'
 ./make_ret_test.sh ret_coercion_55 unverifiable float32 object
-  
+
 ./make_ret_test.sh ret_coercion_56 unverifiable float64 int32
 ./make_ret_test.sh ret_coercion_57 unverifiable float64 'native int'
 ./make_ret_test.sh ret_coercion_58 unverifiable float64 int64
@@ -1034,20 +1034,20 @@ done
 ./make_ret_test.sh ret_coercion_63 unverifiable object int64
 ./make_ret_test.sh ret_coercion_64 unverifiable object float64
 ./make_ret_test.sh ret_coercion_65 unverifiable object 'object&'
-  
+
 ./make_ret_test.sh ret_coercion_66 unverifiable 'class MyValueType' int32
 ./make_ret_test.sh ret_coercion_67 unverifiable 'class MyValueType' 'native int'
 ./make_ret_test.sh ret_coercion_68 unverifiable 'class MyValueType' int64
 ./make_ret_test.sh ret_coercion_69 unverifiable 'class MyValueType' float64
 ./make_ret_test.sh ret_coercion_70 unverifiable 'class MyValueType' 'class MyValueType&'
 ./make_ret_test.sh ret_coercion_71 unverifiable 'class MyValueType' object
-  
+
 ./make_ret_test.sh ret_coercion_72 unverifiable 'int32&' int32
 ./make_ret_test.sh ret_coercion_73 unverifiable 'int32&' 'native int'
 ./make_ret_test.sh ret_coercion_74 unverifiable 'int32&' int64
 ./make_ret_test.sh ret_coercion_75 unverifiable 'int32&' float64
 ./make_ret_test.sh ret_coercion_76 unverifiable 'int32&' object
-  
+
 ./make_ret_test.sh ret_coercion_77 unverifiable typedref int32
 ./make_ret_test.sh ret_coercion_78 unverifiable typedref 'native int'
 ./make_ret_test.sh ret_coercion_79 unverifiable typedref int64
@@ -1317,24 +1317,24 @@ do
        LOCALS_1=''
        CALL_1='ldc.i4.0'
        SIG_1='int32'
-       
+
        ARGS_2='int32 V, int32 V1'
        LOCALS_2=''
        CALL_2='ldc.i4.0\n\tldc.i4.0'
        SIG_2='int32, int32'
-       
+
        ARGS_3='int32 V, int32 V1, int32 V1'
        LOCALS_3=''
        CALL_3='ldc.i4.0\n\tldc.i4.0\n\tldc.i4.0'
        SIG_3='int32, int32, int32'
-       
+
        ARGS_4='int32 V, int32 V1, int32 V1, int32 V1'
        LOCALS_4=''
        CALL_4='ldc.i4.0\n\tldc.i4.0\n\tldc.i4.0\n\tldc.i4.0'
        SIG_4='int32, int32, int32, int32'
        MAX_PARAM_RESULT="unverifiable"
        POPS="pop\npop\npop\npop\npop\npop\npop\npop\n"
-       
+
        if [ "$OP" = "ldloc" ]; then
                MAX_PARAM_RESULT="invalid"
 
@@ -1358,26 +1358,26 @@ do
                CALL_4=''
                SIG_4=''
        fi;
-       
+
        ./make_load_test.sh ${OP}0_max_params "${MAX_PARAM_RESULT}" "${OP}.0" '' '' '' ''
        ./make_load_test.sh ${OP}1_max_params "${MAX_PARAM_RESULT}" "${OP}.1" '' '' '' ''
        ./make_load_test.sh ${OP}2_max_params "${MAX_PARAM_RESULT}" "${OP}.2" '' '' '' ''
        ./make_load_test.sh ${OP}3_max_params "${MAX_PARAM_RESULT}" "${OP}.3" '' '' '' ''
-       
+
        ./make_load_test.sh ${OP}1_1_max_params "${MAX_PARAM_RESULT}" "${OP}.1" "${ARGS_1}" "${LOCALS_1}" "${CALL_1}" "${SIG_1}"
        ./make_load_test.sh ${OP}2_1_max_params "${MAX_PARAM_RESULT}" "${OP}.2" "${ARGS_1}" "${LOCALS_1}" "${CALL_1}" "${SIG_1}"
        ./make_load_test.sh ${OP}3_1_max_params "${MAX_PARAM_RESULT}" "${OP}.3" "${ARGS_1}" "${LOCALS_1}" "${CALL_1}" "${SIG_1}"
-       
+
        ./make_load_test.sh ${OP}2_2_max_params "${MAX_PARAM_RESULT}" "${OP}.2" "${ARGS_2}" "${LOCALS_2}" "${CALL_2}" "${SIG_2}"
        ./make_load_test.sh ${OP}3_2_max_params "${MAX_PARAM_RESULT}" "${OP}.3" "${ARGS_2}" "${LOCALS_2}" "${CALL_2}" "${SIG_2}"
-       
+
        ./make_load_test.sh ${OP}3_3_max_params "${MAX_PARAM_RESULT}" "${OP}.3" "${ARGS_3}" "${LOCALS_3}" "${CALL_3}" "${SIG_3}"
-       
+
        ./make_load_test.sh ${OP}0_max_params valid "${OP}.0" "${ARGS_1}" "${LOCALS_1}" "${CALL_1}" "${SIG_1}"
        ./make_load_test.sh ${OP}1_max_params valid "${OP}.1" "${ARGS_2}" "${LOCALS_2}" "${CALL_2}" "${SIG_2}"
        ./make_load_test.sh ${OP}2_max_params valid "${OP}.2" "${ARGS_3}" "${LOCALS_3}" "${CALL_3}" "${SIG_3}"
        ./make_load_test.sh ${OP}3_max_params valid "${OP}.3" "${ARGS_4}" "${LOCALS_4}" "${CALL_4}" "${SIG_4}"
-       
+
        ./make_load_test.sh ${OP}0_stack_overflow invalid "${OP}.0\n${OP}.0\n${OP}.0\n${OP}.0\n${OP}.0\n${OP}.0\n${OP}.0\n${OP}.0\n${OP}.0\n${POPS}" "${ARGS_4}" "${LOCALS_4}" "${CALL_4}" "${SIG_4}"
        ./make_load_test.sh ${OP}1_stack_overflow invalid "${OP}.1\n${OP}.1\n${OP}.1\n${OP}.1\n${OP}.1\n${OP}.1\n${OP}.1\n${OP}.1\n${OP}.1\n${POPS}" "${ARGS_4}" "${LOCALS_4}" "${CALL_4}" "${SIG_4}"
        ./make_load_test.sh ${OP}2_stack_overflow invalid "${OP}.2\n${OP}.2\n${OP}.2\n${OP}.2\n${OP}.2\n${OP}.2\n${OP}.2\n${OP}.2\n${OP}.2\n${POPS}" "${ARGS_4}" "${LOCALS_4}" "${CALL_4}" "${SIG_4}"
@@ -1393,7 +1393,7 @@ do
        ./make_bool_branch_test.sh boolean_branch_${I}_3 valid ${OP} int32
        ./make_bool_branch_test.sh boolean_branch_${I}_4 valid ${OP} int64
        ./make_bool_branch_test.sh boolean_branch_${I}_5 valid ${OP} 'native int'
-       
+
        #unmanaged pointers are not veriable types, all ops on unmanaged pointers are unverifiable
        ./make_bool_branch_test.sh boolean_branch_${I}_6 unverifiable ${OP} 'int32*'
        ./make_bool_branch_test.sh boolean_branch_${I}_8 unverifiable ${OP} 'method int32 *(int32)'
@@ -1407,7 +1407,7 @@ do
        ./make_bool_branch_test.sh boolean_branch_${I}_14 valid ${OP} 'class Template`1<object>'
        ./make_bool_branch_test.sh boolean_branch_${I}_15 valid ${OP} 'class Template`1<object>[]'
        ./make_bool_branch_test.sh boolean_branch_${I}_16 valid ${OP} 'class Template`1<object>[,,]'
-       
+
        ./make_bool_branch_test.sh boolean_branch_${I}_17 unverifiable ${OP} float32
        ./make_bool_branch_test.sh boolean_branch_${I}_18 unverifiable ${OP} float64
        ./make_bool_branch_test.sh boolean_branch_${I}_19 unverifiable ${OP} 'class MyValueType'
@@ -1846,7 +1846,7 @@ done
 
 #static members are different from instance members
 I=1
-for OP in "ldc.i4.0\n\t\tstsfld int32 Class::sfld" "ldsfld int32 Class::sfld\n\n\tpop" "ldsflda int32 Class::sfld\n\n\tpop" 
+for OP in "ldc.i4.0\n\t\tstsfld int32 Class::sfld" "ldsfld int32 Class::sfld\n\n\tpop" "ldsflda int32 Class::sfld\n\n\tpop"
 do
        ./make_access_test.sh access_check_41_${I} valid "$OP" public family yes
        ./make_access_test.sh access_check_42_${I} valid "$OP" public famandassem yes
@@ -2180,12 +2180,12 @@ done
 
 #ldobj tests
 function fix_ldobj () {
-       if [ "$3" != "" ]; then
-               A=$3;
-       elif [ "$2" != "" ]; then
-               A=$2;
+       if [ -n "$3" ]; then
+               A="$3";
+       elif [ -n "$2" ]; then
+               A="$2";
        else
-               A=$1;
+               A="$1";
        fi
 
        if [ "$A" = "bool" ]; then
@@ -2207,7 +2207,7 @@ do
        do
                TYPE1="$(fix_ldobj $T1)"
                TYPE2="$(fix_ldobj $T2)"
-               if [ "$TYPE1" = "$TYPE2" ] ; then
+               if [ "$TYPE1" = "$TYPE2" ]; then
                        ./make_ldobj_test.sh ldobj_${I} valid "${T1}\&" "${T2}"
                else
                        ./make_ldobj_test.sh ldobj_${I} unverifiable "${T1}\&" "${T2}"
@@ -2220,16 +2220,16 @@ done
 
 #unverifiable
 #for T1 in "int8" "int64" "float64" "object" "string" "class Class" "int32[]" "int32[,]" "valuetype MyStruct" "valuetype MyStruct2" "int32 *" "valuetype MyStruct *" "method int32 *(int32)"
-for T1 in "native int" "int8*" "typedref" 
+for T1 in "native int" "int8*" "typedref"
 do
        for T2 in "int8" "int64" "float64" "object" "string" "class Class" "int32[]" "int32[,]" "valuetype MyStruct" "valuetype MyStruct2"   "int32 *" "valuetype MyStruct *" "method int32 *(int32)" "native int"  "typedref" "class Template\`1<object>" "valuetype StructTemplate\`1<object>" "valuetype StructTemplate2\`1<object>"
-       do 
+       do
                ./make_ldobj_test.sh ldobj_${I} unverifiable "${T1}" "${T2}"
                I=`expr $I + 1`
        done
 done
 
-for T1 in "native int" "int8*" "typedref" 
+for T1 in "native int" "int8*" "typedref"
 do
        ./make_ldobj_test.sh ldobj_${I} invalid "${T1}" "typedref\&"
        I=`expr $I + 1`
@@ -2240,9 +2240,9 @@ done
 #invalid
 #for T1 in "int8" "int64" "float64" "object" "string" "class Class" "int32[]" "int32[,]" "valuetype MyStruct" "valuetype MyStruct2" "int32 *" "valuetype MyStruct *" "method int32 *(int32)"
 for T1 in 'int8' 'native int'
-do     
+do
        for T2 in "int8\&" "int64\&" "float64\&" "object\&" "string\&" "class Class\&" "valuetype MyStruct\&" "native int\&" "class Template\`1<object>\&" "valuetype StructTemplate\`1<object>\&"  "valuetype StructTemplate2\`1<object>\&" "class [mscorlib]ExampleMM" "class [mscorlib]ExampleMM\&"
-       do 
+       do
                ./make_ldobj_test.sh ldobj_${I} invalid "${T1}" "${T2}"
                I=`expr $I + 1`
        done
@@ -2427,7 +2427,7 @@ done
 
 
 I=1
-for TYPE in "int32" "unsigned int32" "native int" "native unsigned int" 
+for TYPE in "int32" "unsigned int32" "native int" "native unsigned int"
 do
        ./make_load_indirect_test.sh indirect_load_i_${I} valid "ldind.i" "${TYPE}"
        I=`expr $I + 1`
@@ -2523,14 +2523,14 @@ I=1
 for TYPE1 in "int8" "bool" "int32" "native int"
 do
        ./make_store_indirect_test.sh indirect_store_bad_addr_i2_${I} unverifiable "stind.i2" "${TYPE1}\&" "int16"
-       ./make_store_indirect_test.sh indirect_store_good_val_i2_${I} valid "stind.i2" "int16\&" "${TYPE1}" 
+       ./make_store_indirect_test.sh indirect_store_good_val_i2_${I} valid "stind.i2" "int16\&" "${TYPE1}"
        I=`expr $I + 1`
 done
 
 for TYPE1 in "int64" "float32" "float64" "object" "string" "class Class" "valuetype MyStruct"  "int32[]" "int32[,]" "int32*" "method int32 *(int32)"  "class Template\`1<object>"
 do
        ./make_store_indirect_test.sh indirect_store_bad_addr_i2_${I} unverifiable "stind.i2" "${TYPE1}\&" "int16"
-       ./make_store_indirect_test.sh indirect_store_bad_val_i2_${I} unverifiable "stind.i2" "int16\&" "${TYPE1}" 
+       ./make_store_indirect_test.sh indirect_store_bad_val_i2_${I} unverifiable "stind.i2" "int16\&" "${TYPE1}"
        I=`expr $I + 1`
 done
 
@@ -2589,14 +2589,14 @@ done
 I=1
 for TYPE1 in "int8" "bool" "int16" "char"
 do
-       ./make_store_indirect_test.sh indirect_store_bad_addr_i_${I} unverifiable "stind.i" "${TYPE1}\&" "native int" 
+       ./make_store_indirect_test.sh indirect_store_bad_addr_i_${I} unverifiable "stind.i" "${TYPE1}\&" "native int"
        ./make_store_indirect_test.sh indirect_store_good_val_i_${I} valid "stind.i" "native int\&" "${TYPE1}"
        I=`expr $I + 1`
 done
 
 for TYPE1 in "int64" "float32" "float64" "object" "string" "class Class" "valuetype MyStruct"  "int32[]" "int32[,]" "int32*" "method int32 *(int32)"  "class Template\`1<object>"
 do
-       ./make_store_indirect_test.sh indirect_store_bad_addr_i_${I} unverifiable "stind.i" "${TYPE1}\&" "native int" 
+       ./make_store_indirect_test.sh indirect_store_bad_addr_i_${I} unverifiable "stind.i" "${TYPE1}\&" "native int"
        ./make_store_indirect_test.sh indirect_store_bad_val_i_${I} unverifiable "stind.i" "native int\&" "${TYPE1}"
        I=`expr $I + 1`
 done
@@ -2701,7 +2701,7 @@ done
 ./make_ldelema_test.sh ldelema_empty_stack_3 invalid "pop" "ldc.i4.0" "int32"
 
 I=1
-for ARR in "int8" "int16" "int32" 
+for ARR in "int8" "int16" "int32"
 do
  ./make_ldelema_test.sh ldelema_size_compat_${I} valid "newarr ${ARR}" "ldc.i4.0" "unsigned ${ARR}"
   I=`expr $I + 1`
@@ -2722,12 +2722,12 @@ done
 ./make_ldelema_test.sh ldelema_misc_size_compat_3 valid "newarr native int" "ldc.i4.0" "int32"
 ./make_ldelema_test.sh ldelema_misc_size_compat_4 valid "newarr native unsigned int" "ldc.i4.0" "int32"
 
-./make_ldelema_test.sh ldelema_misc_size_compat_5 valid "newarr int8" "ldc.i4.0" "bool" 
+./make_ldelema_test.sh ldelema_misc_size_compat_5 valid "newarr int8" "ldc.i4.0" "bool"
 ./make_ldelema_test.sh ldelema_misc_size_compat_6 valid "newarr int16" "ldc.i4.0" "char"
 ./make_ldelema_test.sh ldelema_misc_size_compat_7 valid "newarr int32" "ldc.i4.0" "native int"
 ./make_ldelema_test.sh ldelema_misc_size_compat_8 valid "newarr int32" "ldc.i4.0" "native unsigned int"
 
-./make_ldelema_test.sh ldelema_misc_size_compat_9 valid "newarr unsigned int8" "ldc.i4.0" "bool" 
+./make_ldelema_test.sh ldelema_misc_size_compat_9 valid "newarr unsigned int8" "ldc.i4.0" "bool"
 ./make_ldelema_test.sh ldelema_misc_size_compat_10 valid "newarr unsigned int16" "ldc.i4.0" "char"
 ./make_ldelema_test.sh ldelema_misc_size_compat_11 valid "newarr unsigned int32" "ldc.i4.0" "native int"
 ./make_ldelema_test.sh ldelema_misc_size_compat_12 valid "newarr unsigned int32" "ldc.i4.0" "native unsigned int"
@@ -2804,7 +2804,7 @@ do
        I=`expr $I + 1`
 done
 
-for ARR in "int32" "unsigned int32" "IntEnum" 
+for ARR in "int32" "unsigned int32" "IntEnum"
 do
        ./make_ldelem_test.sh ldelem_base_types_i_${I} valid "newarr ${ARR}" "ldc.i4.0" "ldelem.i4"
        ./make_ldelem_test.sh ldelem_base_types_u_${I} valid "newarr ${ARR}" "ldc.i4.0" "ldelem.u4"
@@ -2876,7 +2876,7 @@ do
        I=`expr $I + 1`
 done
 
-for ARR in "valuetype MyStruct" "int8" "bool" "unsigned int8" "int16" "char" "unsigned int16" "int32" "unsigned int32" "native int" "native unsigned int" "int64" "unsigned int64" "float32" "float64" 
+for ARR in "valuetype MyStruct" "int8" "bool" "unsigned int8" "int16" "char" "unsigned int16" "int32" "unsigned int32" "native int" "native unsigned int" "int64" "unsigned int64" "float32" "float64"
 do
        ./make_ldelem_test.sh ldelem_base_types_o_${I} unverifiable "newarr ${ARR}" "ldc.i4.0" "ldelem.ref"
        I=`expr $I + 1`
@@ -3187,7 +3187,7 @@ done
 #object
 
 I=1
-for LOAD in "ldloc.0" "ldnull" 
+for LOAD in "ldloc.0" "ldnull"
 do
        ./make_cast_test.sh cast_good_obj_${I} valid "object" "$LOAD" "castclass object"
        ./make_cast_test.sh isinst_good_obj_${I} valid "object" "$LOAD" "isinst object"
@@ -3349,7 +3349,7 @@ done
 #branching in the middle of an instruction
 ./make_branch_test.sh branch_middle_of_instruction invalid 1 "br 2";
 
-#branching in between prefix and instruction 
+#branching in between prefix and instruction
 ./make_branch_test.sh branch_middle_of_instruction_prefix_1 invalid 1 "br AFTER_FIRST_PREFIX";
 ./make_branch_test.sh branch_middle_of_instruction_prefix_2 invalid 1 "br AFTER_SECOND_PREFIX";
 
@@ -3408,7 +3408,7 @@ done
 #regions must not overlap with each other
 ./make_exception_overlap_test.sh exception_entry_overlap_separate_1 valid ".try TRY_BLOCK_1 to TRY_BLOCK_1_END catch [mscorlib]System.Exception handler CATCH_BLOCK_1 to CATCH_BLOCK_1_END" ".try TRY_BLOCK_2 to TRY_BLOCK_2_END catch [mscorlib]System.Exception handler CATCH_BLOCK_2 to CATCH_BLOCK_2_END"
 
-./make_exception_overlap_test.sh exception_entry_overlap_separate_2 valid ".try TRY_BLOCK_2 to TRY_BLOCK_2_END catch [mscorlib]System.Exception handler CATCH_BLOCK_2 to CATCH_BLOCK_2_END" ".try TRY_BLOCK_1 to TRY_BLOCK_1_END catch [mscorlib]System.Exception handler CATCH_BLOCK_1 to CATCH_BLOCK_1_END" 
+./make_exception_overlap_test.sh exception_entry_overlap_separate_2 valid ".try TRY_BLOCK_2 to TRY_BLOCK_2_END catch [mscorlib]System.Exception handler CATCH_BLOCK_2 to CATCH_BLOCK_2_END" ".try TRY_BLOCK_1 to TRY_BLOCK_1_END catch [mscorlib]System.Exception handler CATCH_BLOCK_1 to CATCH_BLOCK_1_END"
 
 ./make_exception_overlap_test.sh exception_entry_overlap_try_over_catch invalid ".try TRY_BLOCK_1 to CATCH_BLOCK_1_A catch [mscorlib]System.Exception handler CATCH_BLOCK_1 to CATCH_BLOCK_1_END" ".try TRY_BLOCK_2 to TRY_BLOCK_2_END catch [mscorlib]System.Exception handler CATCH_BLOCK_2 to CATCH_BLOCK_2_END"
 
@@ -3590,7 +3590,7 @@ done
 
 #tests for ovf opcodes
 I=1
-for OP in "add.ovf" "add.ovf.un" "mul.ovf" "mul.ovf.un" "sub.ovf" "sub.ovf.un" 
+for OP in "add.ovf" "add.ovf.un" "mul.ovf" "mul.ovf.un" "sub.ovf" "sub.ovf.un"
 do
        for TYPE in "object" "string" "float32" "float64" "int32*" "typedref" "int32[]" "int32[,]" "method int32 *(int32)"
        do
@@ -3613,8 +3613,8 @@ do
                I=`expr $I + 1`
        done
 done
-       
-for OP in "add.ovf.un" "sub.ovf.un" 
+
+for OP in "add.ovf.un" "sub.ovf.un"
 do
        for TYPE in "int32" "native int" "int32&"
        do
@@ -3682,20 +3682,20 @@ done
 I=1
 for TYPE in "int32" "int64" "float32" "float64" Class MyStruct string object "int32[]" "int32[,]" "native int"
 do
-       ./make_stobj_test.sh stobj_simple_${I} valid "$TYPE" "$TYPE\&" "$TYPE" 
+       ./make_stobj_test.sh stobj_simple_${I} valid "$TYPE" "$TYPE\&" "$TYPE"
        I=`expr $I + 1`
 done
 
 
 for TYPE in "int32*" "method int32 *(int32)"
 do
-       ./make_stobj_test.sh stobj_simple_${I} unverifiable "$TYPE" "$TYPE\&" "$TYPE" 
+       ./make_stobj_test.sh stobj_simple_${I} unverifiable "$TYPE" "$TYPE\&" "$TYPE"
        I=`expr $I + 1`
 done
 
 for TYPE in "int32\&" "void" "typedref"
 do
-       ./make_stobj_test.sh stobj_simple_${I} invalid "$TYPE" "$TYPE\&" "$TYPE" 
+       ./make_stobj_test.sh stobj_simple_${I} invalid "$TYPE" "$TYPE\&" "$TYPE"
        I=`expr $I + 1`
 done
 
@@ -3703,7 +3703,7 @@ done
 I=1
 for TYPE in "int32\&" "int32*" "typedref"
 do
-       ./make_stobj_test.sh stobj_bad_src_${I} unverifiable "$TYPE" "int32\&" "int32" 
+       ./make_stobj_test.sh stobj_bad_src_${I} unverifiable "$TYPE" "int32\&" "int32"
        I=`expr $I + 1`
 done
 
@@ -3711,27 +3711,27 @@ done
 I=1
 for TYPE in "int32" "int64" "float32" "float64" Class MyStruct string object "int32[]" "int32[,]" "native int"
 do
-       ./make_stobj_test.sh stobj_dest_not_managed_pointer_${I} unverifiable "$TYPE" "$TYPE" "$TYPE" 
+       ./make_stobj_test.sh stobj_dest_not_managed_pointer_${I} unverifiable "$TYPE" "$TYPE" "$TYPE"
        I=`expr $I + 1`
 done
 
 #src is compat to dest
 I=1
 for TYPE in "int8" "unsigned int8" "bool" "int16" "unsigned int16" "char" "int32" "unsigned int32" "native int" "native unsigned int"
-do 
-       ./make_stobj_test.sh stobj_src_compat_to_token_${I} valid "$TYPE" "int32\&" "int32" 
+do
+       ./make_stobj_test.sh stobj_src_compat_to_token_${I} valid "$TYPE" "int32\&" "int32"
        I=`expr $I + 1`
 done
 
 for TYPE in "int64" "unsigned int64" "float32" "float64" string object
-do 
-       ./make_stobj_test.sh stobj_src_compat_to_token_${I} unverifiable "$TYPE" "int32\&" "int32" 
+do
+       ./make_stobj_test.sh stobj_src_compat_to_token_${I} unverifiable "$TYPE" "int32\&" "int32"
        I=`expr $I + 1`
 done
 
 for TYPE in string object Class
-do 
-       ./make_stobj_test.sh stobj_src_compat_to_token_${I} valid "$TYPE" "object\&" "object" 
+do
+       ./make_stobj_test.sh stobj_src_compat_to_token_${I} valid "$TYPE" "object\&" "object"
        I=`expr $I + 1`
 done
 
@@ -3741,8 +3741,8 @@ done
 
 #token type subtype of dest_type
 for TYPE in string object Class "int32[]" "int32[,]"
-do 
-       ./make_stobj_test.sh stobj_token_subtype_of_dest_${I} valid "$TYPE" "object\&" "$TYPE" 
+do
+       ./make_stobj_test.sh stobj_token_subtype_of_dest_${I} valid "$TYPE" "object\&" "$TYPE"
        I=`expr $I + 1`
 done
 
@@ -3930,7 +3930,7 @@ done
 
 #valid types
 I=1
-for INIT in "ldc.i4.1" "ldc.i4.1\n\tconv.i" 
+for INIT in "ldc.i4.1" "ldc.i4.1\n\tconv.i"
 do
        ./make_localloc_test.sh localloc_stack_type_$I unverifiable "$INIT"
        I=`expr $I + 1`
@@ -3944,7 +3944,7 @@ do
 done
 
 #stack underflow
-./make_localloc_test.sh localloc_empty_stack invalid 
+./make_localloc_test.sh localloc_empty_stack invalid
 ./make_localloc_test.sh localloc_stack_with_more_than_2_items invalid "ldc.i4.1\n\tldc.i4.1"
 
 #inside exception blocks
@@ -3964,7 +3964,7 @@ done
 #call test
 #invalid method token
 #valid
-#validate the this pointer for signatures with HASTHIS. 
+#validate the this pointer for signatures with HASTHIS.
 #this ptr: reference types must be a value, value type can be a MP or a BT.
 #number of args
 #args are compatible
@@ -4006,7 +4006,7 @@ done
 ./make_call_test.sh call_final_virtual_method_2 unverifiable "call instance void ClassC::VirtMethod()" "newobj instance void ClassA::.ctor()"
 ./make_call_test.sh call_final_virtual_method_3 unverifiable "call instance void ClassA::VirtMethod()" "newobj instance void ClassA::.ctor()"
 
-./make_call_test.sh call_virtual_method_3 unverifiable "call instance void BaseClass::VirtMethod()" "ldarg.0" "instance" "ldarg.0\n\t\tstarg 0" 
+./make_call_test.sh call_virtual_method_3 unverifiable "call instance void BaseClass::VirtMethod()" "ldarg.0" "instance" "ldarg.0\n\t\tstarg 0"
 ./make_call_test.sh call_virtual_method_4 unverifiable "call instance void BaseClass::VirtMethod()" "ldarg.0" "instance" "ldarga 0\n\t\tpop"
 
 #value type (we can call non final virtual on boxed VT)
@@ -4030,7 +4030,7 @@ done
 ./make_call_test.sh callvirt_final_virtual_method_2 unverifiable "callvirt instance void ClassC::VirtMethod()" "newobj instance void ClassA::.ctor()"
 ./make_call_test.sh callvirt_final_virtual_method_3 valid "callvirt instance void ClassA::VirtMethod()" "newobj instance void ClassA::.ctor()"
 
-./make_call_test.sh callvirt_virtual_method_3 valid "callvirt instance void BaseClass::VirtMethod()" "ldarg.0" "instance" "ldarg.0\n\t\tstarg 0" 
+./make_call_test.sh callvirt_virtual_method_3 valid "callvirt instance void BaseClass::VirtMethod()" "ldarg.0" "instance" "ldarg.0\n\t\tstarg 0"
 ./make_call_test.sh callvirt_virtual_method_4 valid "callvirt instance void BaseClass::VirtMethod()" "ldarg.0" "instance" "ldarga 0\n\t\tpop"
 
 #value type (we can call non final virtual on boxed VT)
@@ -4227,7 +4227,7 @@ done
 
 ./make_delegate_compat_test.sh delegate_pointers_ret_1 unverifiable "object*" "string*" int32 int32
 ./make_delegate_compat_test.sh delegate_pointers_ret_2 unverifiable "InterfaceA*" "ImplA*" int32 int32
-./make_delegate_compat_test.sh delegate_pointers_ret_3 unverifiable "string*" "object*" int32 int32 
+./make_delegate_compat_test.sh delegate_pointers_ret_3 unverifiable "string*" "object*" int32 int32
 ./make_delegate_compat_test.sh delegate_pointers_ret_4 unverifiable  "int32*" "int32*" int32 int32
 
 
@@ -4278,8 +4278,8 @@ done
 I=1
 for TYPE in "ldind.i1 int8" "ldind.u1 int8" "ldind.i2 int16" "ldind.u2 int16" "ldind.i4 int32" "ldind.u4 int32" "ldind.i8 int64" "ldind.u8 int64" "ldind.i native int" "ldind.r4 float32" "ldind.r8 float64"
 do
-       LOAD=`echo $TYPE | cut -d' ' -f 1` 
-       TYPE=`echo $TYPE | cut -d' ' -f 2-` 
+       LOAD=`echo $TYPE | cut -d' ' -f 1`
+       TYPE=`echo $TYPE | cut -d' ' -f 2-`
        ./make_cmmp_test.sh cmmp_basic_test_ro_$I valid "readonly. ldelema $TYPE" "$LOAD" "$TYPE"
        ./make_cmmp_test.sh cmmp_basic_test_ub_$I valid "unbox $TYPE" "$LOAD" "$TYPE"
        I=`expr $I + 1`
@@ -4333,8 +4333,8 @@ done
 I=1
 for TYPE in "stind.i1 int8" "stind.i2 int16" "stind.i4 int32" "stind.i8 int64" "stind.r4 float32" "stind.r8 float64" "stind.i native int"
 do
-       STORE=`echo $TYPE | cut -d' ' -f 1` 
-       TYPE=`echo $TYPE | cut -d' ' -f 2-` 
+       STORE=`echo $TYPE | cut -d' ' -f 1`
+       TYPE=`echo $TYPE | cut -d' ' -f 2-`
        ./make_cmmp_test.sh cmmp_bad_ops_test_ro_$I unverifiable "readonly. ldelema $TYPE" "ldloc.0\n\t$STORE" "$TYPE"
        ./make_cmmp_test.sh cmmp_bad_ops_test_ub_$I unverifiable "unbox $TYPE" "ldloc.0\n\t$STORE" "$TYPE"
        I=`expr $I + 1`
@@ -4667,7 +4667,7 @@ do
        I=`expr $I + 1`
 done
 
-for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl 
+for TYPE in object ClassNoDefaultCtor AbstractClass ClassWithDefaultCtorNotVisible ClassWithDefaultCtor "valuetype MyValueType" "valuetype [mscorlib]System.Nullable\`1<valuetype MyValueType>" "[mscorlib]System.ValueType" "[mscorlib]System.Enum" IFace IFaceImpl
 do
        ./make_type_constraint_test.sh type_constraint_system_enum_ctor_ct_$I invalid "$TYPE" ".ctor (class [mscorlib]System.Enum)"
        ./make_type_constraint_test.sh type_constraint_system_enum_vt_ct_$I invalid "$TYPE" "valuetype (class [mscorlib]System.Enum)"
@@ -4761,8 +4761,8 @@ done
 I=1
 for TYPE in "stind.i1 int8" "stind.i2 int16" "stind.i4 int32" "stind.i8 int64" "stind.r4 float32" "stind.r8 float64" "stind.i native int"
 do
-       STORE=`echo $TYPE | cut -d' ' -f 1` 
-       TYPE=`echo $TYPE | cut -d' ' -f 2-` 
+       STORE=`echo $TYPE | cut -d' ' -f 1`
+       TYPE=`echo $TYPE | cut -d' ' -f 2-`
        ./make_prefix_test.sh "prefix_test_stind_volatile_$I" valid "volatile. $STORE" "ldloca 0\n\tldloc.0" "$TYPE"
        ./make_prefix_test.sh "prefix_test_stind_unaligned_$I" valid  "unaligned. 1 $STORE" "ldloca 0\n\tldloc.0" "$TYPE"
        I=`expr $I + 1`
@@ -4776,8 +4776,8 @@ done
 I=1
 for TYPE in "ldind.i1 int8" "ldind.u1 unsigned int8" "ldind.i2 int16" "ldind.u2 unsigned int16" "ldind.i4 int32" "ldind.u4 unsigned int32" "ldind.i8 int64" "ldind.u8 unsigned int64" "ldind.r4 float32" "ldind.r8 float64" "ldind.i native int"
 do
-       STORE=`echo $TYPE | cut -d' ' -f 1` 
-       TYPE=`echo $TYPE | cut -d' ' -f 2-` 
+       STORE=`echo $TYPE | cut -d' ' -f 1`
+       TYPE=`echo $TYPE | cut -d' ' -f 2-`
        ./make_prefix_test.sh "prefix_test_ldind_volatile_$I" valid "volatile. $STORE" "ldloca 0" "$TYPE"
        ./make_prefix_test.sh "prefix_test_ldind_unaligned_$I" valid  "unaligned. 1 $STORE" "ldloca 0" "$TYPE"
        I=`expr $I + 1`
@@ -5133,7 +5133,7 @@ done
 ./make_generic_argument_constraints_test.sh no_constraints valid "" ""
 
 I=1
-for SRC in "(IfaceA)" "(IfaceB)" "(IfaceA, IfaceB)" ".ctor" "class" 
+for SRC in "(IfaceA)" "(IfaceB)" "(IfaceA, IfaceB)" ".ctor" "class"
 do
        ./make_generic_argument_constraints_test.sh src_ctrs_only_${I} unverifiable "$SRC" ""
        I=`expr $I + 1`
index fb39d08..d4d6eb4 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -16,7 +16,7 @@ TEST_FILE=${TEST_NAME}_generated.il
 echo $TEST_FILE
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LOCAL/${TEST_LOCAL}/g"  -e "s/OP/${TEST_OP}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -27,25 +27,25 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LOCAL/${TEST_LOCAL}/g"  -e "s/OP/$
 
 .class ClassA extends [mscorlib]System.Object
 {
-    .method public hidebysig  specialname  rtspecialname 
-           instance default void .ctor ()  cil managed 
+    .method public hidebysig  specialname  rtspecialname
+           instance default void .ctor ()  cil managed
     {
         .maxstack 8
-        ldarg.0 
+        ldarg.0
         call instance void object::.ctor()
-        ret 
+        ret
     }
 }
 
 .class ClassSubA extends ClassA
 {
-    .method public hidebysig  specialname  rtspecialname 
-           instance default void .ctor ()  cil managed 
+    .method public hidebysig  specialname  rtspecialname
+           instance default void .ctor ()  cil managed
     {
         .maxstack 8
-        ldarg.0 
+        ldarg.0
         call instance void ClassA::.ctor()
-        ret 
+        ret
     }
 }
 
@@ -73,7 +73,7 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/LOCAL/${TEST_LOCAL}/g"  -e "s/OP/$
                call void foo ()
                leave END
        } catch [mscorlib]System.NullReferenceException {
-               pop 
+               pop
                leave END
 
         }
index 0cd60eb..6a76c70 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -17,7 +17,7 @@ echo $TEST_FILE
 
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/INSTANTIATION/${TEST_INSTANTIATION}/g" -e "s/CONSTRAINTS/${TEST_CONSTRAINTS}/g" -e "s/EXTRA_CODE/${TEST_EXTRA_CODE}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
@@ -34,25 +34,25 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/INSTANTIATION/${TEST_INSTANTIATION
 
 .class interface public auto ansi abstract IFace
 {
-       .method public virtual hidebysig newslot abstract instance default void Tst ()  cil managed 
+       .method public virtual hidebysig newslot abstract instance default void Tst ()  cil managed
        {
        }
 }
 
 .class public auto ansi beforefieldinit IFaceImpl extends [mscorlib]System.Object implements IFace
 {
-       .method public hidebysig specialname rtspecialname instance default void '.ctor' () cil managed 
+       .method public hidebysig specialname rtspecialname instance default void '.ctor' () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::'.ctor'()
-               ret 
+               ret
        }
 
-       .method public final virtual hidebysig newslot instance default void Tst () cil managed 
+       .method public final virtual hidebysig newslot instance default void Tst () cil managed
        {
                .maxstack 8
-               ret 
+               ret
        }
 }
 
@@ -60,45 +60,45 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/INSTANTIATION/${TEST_INSTANTIATION
 
 .class ClassNoDefaultCtor extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor (int32 d) cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor (int32 d) cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 }
 
 .class abstract AbstractClass extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 }
 
 .class ClassWithDefaultCtorNotVisible extends [mscorlib]System.Object
 {
-       .method private hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method private hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 }
 
 .class ClassWithDefaultCtor extends [mscorlib]System.Object
 {
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 }
 
@@ -121,12 +121,12 @@ $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/INSTANTIATION/${TEST_INSTANTIATION
 {
        .field !T t
 
-       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed 
+       .method public hidebysig  specialname rtspecialname instance default void .ctor () cil managed
        {
                .maxstack 8
-               ldarg.0 
+               ldarg.0
                call instance void object::.ctor()
-               ret 
+               ret
        }
 
        .method public void DoStuff() cil managed
index fc8aa6b..cfeaf12 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -12,7 +12,7 @@ TEST_INIT=$4
 TEST_EXTRA_LOC=$5
 
 
-if [ "$TEST_EXTRA_LOC" != "" ]; then
+if [ -n "$TEST_EXTRA_LOC" ]; then
        EXTRA_LOC=", $TEST_EXTRA_LOC V_1"
 fi
 
@@ -22,7 +22,7 @@ echo $TEST_FILE
 TEST_TYPE=`echo $TEST_TYPE | $SED -s 's/&/\\\&/'`
 $SED -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE/${TEST_TYPE}/g" -e "s/OPCODE/${TEST_OP}/g"  -e "s/INIT/${TEST_INIT}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index 95caf85..152ebde 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -15,7 +15,7 @@ echo $TEST_FILE
 TEST_TYPE1=`echo $TEST_TYPE1 | $SED -s 's/&/\\\&/'`
 $SED -e "s/OPCODE/${TEST_OP}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/LOAD_OPCODE/${TEST_LOAD_OP}/g" > $TEST_FILE <<//EOF
 
-// VALIDITY CIL which breaks the ECMA-335 rules. 
+// VALIDITY CIL which breaks the ECMA-335 rules.
 // this CIL should fail verification by a conforming CLI verifier.
 
 .assembly '${TEST_NAME}_generated'
index bb8ddc2..bf98d6a 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -91,7 +91,7 @@ $SED -e "s/INIT_OP/${TEST_INIT}/g"  -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/VALIDITY/
 
 END:
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index 744e931..9d48d49 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then 
+if [ `which gsed 2> /dev/null` ]; then
        SED="gsed"
 fi
 
@@ -84,7 +84,7 @@ $SED -e "s/BOX_OP/${TEST_BOX}/g"  -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/VALIDITY/${
        POST_OP
        pop
        ldc.i4.0
-       ret 
+       ret
 }
 
 //EOF
index 66f8893..7965b10 100644 (file)
@@ -4,13 +4,13 @@ EXECUTION_DIR=$(dirname $0)
 
 cd $EXECUTION_DIR
 
-if [ -z "$HELIX_WORKITEM_UPLOAD_ROOT" ]; then
+if [[ -z "$HELIX_WORKITEM_UPLOAD_ROOT" ]]; then
        XHARNESS_OUT="$EXECUTION_DIR/xharness-output"
 else
        XHARNESS_OUT="$HELIX_WORKITEM_UPLOAD_ROOT/xharness-output"
 fi
 
-if [ ! -z "$XHARNESS_CLI_PATH" ]; then
+if [[ -n "$XHARNESS_CLI_PATH" ]]; then
        # When running in CI, we only have the .NET runtime available
        # We need to call the XHarness CLI DLL directly via dotnet exec
        HARNESS_RUNNER="dotnet exec $XHARNESS_CLI_PATH"
@@ -25,7 +25,7 @@ function set_env_vars()
         export SDK_HAS_WORKLOAD_INSTALLED=true
         export SDK_FOR_WORKLOAD_TESTING_PATH=$BASE_DIR/dotnet-workload
         export AppRefDir=$BASE_DIR/microsoft.netcore.app.ref
-    elif [ ! -z "$HELIX_WORKITEM_UPLOAD_ROOT" ]; then
+    elif [[ -n "$HELIX_WORKITEM_UPLOAD_ROOT" ]]; then
         export WasmBuildSupportDir=$BASE_DIR/build
     else
         export PATH=$BASE_DIR/sdk-no-workload:$PATH
index 33d884f..986152f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 #Usage message
 function usage {
@@ -66,7 +66,7 @@ function exit_with_error {
     local printUsage=$2
 
     echo "ERROR: $errorMessage"
-    if [ "$printUsage" == "true" ]; then
+    if [[ "$printUsage" == "true" ]]; then
         echo ''
         usage
     fi
@@ -153,7 +153,7 @@ function handle_exit {
 
     echo 'The script is exited. Cleaning environment..'
 
-    if [ "$__ciMode" == "emulator" ]; then
+    if [[ "$__ciMode" == "emulator" ]]; then
         clean_env
     fi
 }
@@ -242,7 +242,7 @@ function cross_build_coreclr_with_docker {
 
     # Check build configuration and choose Docker image
     __dockerEnvironmentVariables=""
-    if [ "$__buildArch" == "arm" ]; then
+    if [[ "$__buildArch" == "arm" ]]; then
         # TODO: For arm, we are going to embed RootFS inside Docker image.
         case $__linuxCodeName in
         trusty)
@@ -261,7 +261,7 @@ function cross_build_coreclr_with_docker {
             exit_with_error "ERROR: $__linuxCodeName is not a supported linux name for $__buildArch" false
         ;;
         esac
-    elif [ "$__buildArch" == "armel" ]; then
+    elif [[ "$__buildArch" == "armel" ]]; then
         # For armel Tizen, we are going to construct RootFS on the fly.
         case $__linuxCodeName in
         tizen)
@@ -280,7 +280,7 @@ function cross_build_coreclr_with_docker {
     fi
     __dockerCmd="sudo docker run ${__dockerEnvironmentVariables} --privileged -i --rm -v $__currentWorkingDirectory:/opt/code -w /opt/code $__dockerImage"
 
-    if [ $__skipRootFS == 0 ]; then
+    if [[ "$__skipRootFS" == 0 ]]; then
         # Build rootfs
         __buildRootfsCmd="$__RepoRootDir/eng/common/cross/build-rootfs.sh $__buildArch $__linuxCodeName --skipunmount"
 
@@ -369,7 +369,7 @@ function run_tests_using_docker {
 
     # Configure docker
     __dockerEnvironmentVariables=""
-    if [ "$__buildArch" == "arm" ]; then
+    if [[ "$__buildArch" == "arm" ]]; then
         case $__linuxCodeName in
         trusty)
             __dockerImage=" mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu1404_cross_prereqs_v3"
@@ -385,7 +385,7 @@ function run_tests_using_docker {
             exit_with_error "ERROR: $__linuxCodeName is not a supported linux name for $__buildArch" false
         ;;
         esac
-    elif [ "$__buildArch" == "armel" ]; then
+    elif [[ "$__buildArch" == "armel" ]]; then
         case $__linuxCodeName in
         tizen)
             __dockerImage=" tizendotnet/dotnet-buildtools-prereqs:ubuntu-16.04-cross-e435274-20180426002255-tizen-rootfs-5.0m1"
@@ -494,7 +494,7 @@ do
 done
 
 #Check if there are any uncommited changes in the source directory as git adds and removes patches
-if [[ $(git status -s) != "" ]]; then
+if [[ -n $(git status -s)  ]]; then
    echo 'ERROR: There are some uncommited changes. To avoid losing these changes commit them and try again.'
    echo ''
    git status
@@ -502,7 +502,7 @@ if [[ $(git status -s) != "" ]]; then
 fi
 
 exit_if_empty "$__buildConfig" "--buildConfig is a mandatory argument, not provided" true
-if [ "$__ciMode" == "emulator" ]; then
+if [[ "$__ciMode" == "emulator" ]]; then
     #Check if the compulsory arguments have been presented to the script and if the input paths exist
     exit_if_empty "$__ARMEmulPath" "--emulatorPath is a mandatory argument, not provided" true
     exit_if_empty "$__ARMRootfsMountPath" "--mountPath is a mandatory argument, not provided" true
@@ -513,7 +513,7 @@ fi
 
 __coreFxBinDir="./bin/CoreFxBinDir" # TODO-cleanup: Just for testing....
 #Check if the optional arguments are present in the case that testing is to be done
-if [ $__skipTests == 0 ]; then
+if [[ "$__skipTests" == 0 ]]; then
     exit_if_empty "$__testRootDir" "Testing requested, but --testRootDir not provided" true
     exit_if_path_absent "$__testRootDir" "Path specified in --testRootDir does not exist" false
 
@@ -523,10 +523,10 @@ if [ $__skipTests == 0 ]; then
     exit_if_empty "$__testDirFile" "Testing requested, but --testDirFile not provided" true
     exit_if_path_absent "$__testDirFile" "Path specified in --testDirFile does not exist" false
 
-    if [ ! -z "$__skipMscorlib" ]; then
+    if [[ -n "$__skipMscorlib" ]]; then
         exit_if_empty "$__mscorlibDir" "Testing and skipmscorlib requested, but --mscorlibDir not provided" true
     fi
-    if [ ! -z "$__mscorlibDir" ]; then
+    if [[ -n "$__mscorlibDir" ]]; then
         echo '--mscorlibDir provided; will be using this path for running tests and ignoring the generated mscorlib.dll'
         exit_if_path_absent "$__mscorlibDir/mscorlib.dll" "Path specified in --mscorlibDir does not contain mscorlib.dll"
     fi
@@ -562,7 +562,7 @@ set -e
 ## Begin cross build
 (set +x; echo "Git HEAD @ $__initialGitHead")
 
-if [ "$__ciMode" == "docker" ]; then
+if [[ "$__ciMode" == "docker" ]]; then
     # Complete the cross build using Docker
     (set +x; echo 'Building coreclr...')
     cross_build_coreclr_with_docker
@@ -581,13 +581,13 @@ else
 fi
 
 #If tests are to be skipped end the script here, else continue
-if [ $__skipTests == 1 ]; then
+if [[ "$__skipTests" == 1 ]]; then
     exit 0
 fi
 
 __unittestResult=0
 ## Begin CoreCLR test
-if [ "$__ciMode" == "docker" ]; then
+if [[ "$__ciMode" == "docker" ]]; then
     run_tests_using_docker
     __unittestResult=$?
 else
index aee7953..07ccf89 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 set -x
 
@@ -20,7 +20,7 @@ function exit_with_error {
     local printUsage=$2
 
     echo "ERROR: $errorMessage"
-    if [ "$printUsage" == "true" ]; then
+    if [[ "$printUsage" == "true" ]]; then
         echo ''
         usage
     fi
@@ -80,7 +80,7 @@ else
     __ROOTFS_DIR=${ROOTFS_DIR}
 fi
 
-if [ "$__abi" == "armel" ]; then
+if [[ "$__abi" == "armel" ]]; then
     # Prepare armel emulation environment
     pushd ${CORECLR_DIR}/eng/common/cross/armel/tizen
     apt-get update
index f551150..e87f04b 100755 (executable)
@@ -45,7 +45,7 @@ function print_usage {
     echo '  --test-env                       : Script to set environment variables for tests'
     echo '  --copyNativeTestBin              : Explicitly copy native test components into the test dir'
     echo '  --crossgen                       : Precompiles the framework managed assemblies'
-    echo '  --runcrossgentests               : Runs the ready to run tests' 
+    echo '  --runcrossgentests               : Runs the ready to run tests'
     echo '  --jitstress=<n>                  : Runs the tests with COMPlus_JitStress=n'
     echo '  --jitstressregs=<n>              : Runs the tests with COMPlus_JitStressRegs=n'
     echo '  --jitminopts                     : Runs the tests with COMPlus_JITMinOpts=1'
@@ -173,11 +173,11 @@ function xunit_output_add_test {
     line="${line} type=\"${testDir}\""
     line="${line} method=\"${testName}\""
     line="${line} result=\"${testResult}\""
-    if [ -n "$testRunningTime" ] && [ "$testResult" != "Skip" ]; then
+    if [[ -n "$testRunningTime" && "$testResult" != "Skip" ]]; then
         line="${line} time=\"${testRunningTime}\""
     fi
 
-    if [ "$testResult" == "Pass" ]; then
+    if [[ "$testResult" == "Pass" ]]; then
         line="${line}/>"
         echo "$line" >>"$xunitTestOutputPath"
         return
@@ -187,7 +187,7 @@ function xunit_output_add_test {
     echo "$line" >>"$xunitTestOutputPath"
 
     line="        "
-    if [ "$testResult" == "Skip" ]; then
+    if [[ "$testResult" == "Skip" ]]; then
         line="${line}<reason><![CDATA[$(cat "$outputFilePath")]]></reason>"
         echo "$line" >>"$xunitTestOutputPath"
     else
@@ -341,9 +341,9 @@ function text_file_output_add_test {
     local scriptFilePath=$1
     local testResult=$2 # Pass, Fail, or Skip
 
-    if [ "$testResult" == "Pass" ]; then
+    if [[ "$testResult" == "Pass" ]]; then
         echo "$scriptFilePath" >>"$testsPassOutputPath"
-    elif [ "$testResult" == "Skip" ]; then
+    elif [[ "$testResult" == "Skip" ]]; then
         echo "$scriptFilePath" >>"$testsSkipOutputPath"
     else
         echo "$scriptFilePath" >>"$testsFailOutputPath"
@@ -438,7 +438,7 @@ declare -a skipCrossGenFiles
 
 function is_skip_crossgen_test {
     for skip in "${skipCrossGenFiles[@]}"; do
-        if [ "$1" == "$skip" ]; then
+        if [[ "$1" == "$skip" ]]; then
             return 0
         fi
     done
@@ -448,17 +448,17 @@ function is_skip_crossgen_test {
 function precompile_overlay_assemblies {
     skipCrossGenFiles=($(read_array "$(dirname "$0")/skipCrossGenFiles.$ARCH.txt"))
 
-    if [ $doCrossgen == 1 ]; then
+    if [[ "$doCrossgen" == 1 ]]; then
         local overlayDir=$CORE_ROOT
 
         filesToPrecompile=$(find -L $overlayDir -iname \*.dll -not -iname \*.ni.dll -not -iname \*-ms-win-\* -type f )
         for fileToPrecompile in ${filesToPrecompile}
         do
             local filename=${fileToPrecompile}
-            if [ $jitdisasm == 1 ]; then
+            if [[ "$jitdisasm" == 1 ]]; then
                 $overlayDir/corerun $overlayDir/jit-dasm.dll --crossgen $overlayDir/crossgen --platform $overlayDir --output $testRootDir/dasm $filename
                 local exitCode=$?
-                if [ $exitCode != 0 ]; then
+                if [[ "$exitCode" != 0 ]]; then
                     echo Unable to generate dasm for $filename
                 fi
             else
@@ -551,7 +551,7 @@ function load_playlist_tests {
 
 function is_unsupported_test {
     for unsupportedTest in "${unsupportedTests[@]}"; do
-        if [ "$1" == "$unsupportedTest" ]; then
+        if [[ "$1" == "$unsupportedTest" ]]; then
             return 0
         fi
     done
@@ -560,7 +560,7 @@ function is_unsupported_test {
 
 function is_failing_test {
     for failingTest in "${failingTests[@]}"; do
-        if [ "$1" == "$failingTest" ]; then
+        if [[ "$1" == "$failingTest" ]]; then
             return 0
         fi
     done
@@ -569,7 +569,7 @@ function is_failing_test {
 
 function is_playlist_test {
     for playlistTest in "${playlistTests[@]}"; do
-        if [ "$1" == "$playlistTest" ]; then
+        if [[ "$1" == "$playlistTest" ]]; then
             return 0
         fi
     done
@@ -625,7 +625,7 @@ function set_up_core_dump_generation {
     # Allow dump generation
     ulimit -c unlimited
 
-    if [ "$(uname -s)" == "Linux" ]; then
+    if [[ "$(uname -s)" == "Linux" ]]; then
         if [ -e /proc/self/coredump_filter ]; then
             # Include memory in private and shared file-backed mappings in the dump.
             # This ensures that we can see disassembly from our shared libraries when
@@ -638,7 +638,7 @@ function set_up_core_dump_generation {
 function print_info_from_core_file {
 
     #### temporary
-    if [ "$ARCH" == "arm64" ]; then
+    if [[ "$ARCH" == "arm64" ]]; then
         echo "Not inspecting core dumps on arm64 at the moment."
         return
     fi
@@ -675,19 +675,19 @@ function print_info_from_core_file {
 function inspect_and_delete_core_files {
     # This function prints some basic information from core files in the current
     # directory and deletes them immediately.
-    
+
     # Depending on distro/configuration, the core files may either be named "core"
-    # or "core.<PID>" by default. We will read /proc/sys/kernel/core_uses_pid to 
+    # or "core.<PID>" by default. We will read /proc/sys/kernel/core_uses_pid to
     # determine which one it is.
     # On OS X/macOS, we checked the kern.corefile value before enabling core dump
     # generation, so we know it always includes the PID.
     local core_name_uses_pid=0
-    if [[ (( -e /proc/sys/kernel/core_uses_pid ) && ( "1" == $(cat /proc/sys/kernel/core_uses_pid) )) 
+    if [[ (( -e /proc/sys/kernel/core_uses_pid ) && ( "1" == $(cat /proc/sys/kernel/core_uses_pid) ))
           || ( "$(uname -s)" == "Darwin" ) ]]; then
         core_name_uses_pid=1
     fi
 
-    if [ $core_name_uses_pid == "1" ]; then
+    if [[ "$core_name_uses_pid" == "1" ]]; then
         # We don't know what the PID of the process was, so let's look at all core
         # files whose name matches core.NUMBER
         for f in core.*; do
@@ -711,7 +711,7 @@ function run_test {
     local scriptFileName=$(basename "$scriptFilePath")
     local outputFileName=$(basename "$outputFilePath")
 
-    if [ "$limitedCoreDumps" == "ON" ]; then
+    if [[ "$limitedCoreDumps" == "ON" ]]; then
         set_up_core_dump_generation
     fi
 
@@ -720,7 +720,7 @@ function run_test {
 
     # We will try to print some information from generated core dumps if a debugger
     # is available, and possibly store a dump in a non-transient location.
-    if [ "$limitedCoreDumps" == "ON" ]; then
+    if [[ "$limitedCoreDumps" == "ON" ]]; then
         inspect_and_delete_core_files
     fi
 
@@ -757,7 +757,7 @@ function waitany {
     while true; do
         for (( i=0; i<$maxProcesses; i++ )); do
             pid=${processIds[$i]}
-            if [ -z "$pid" ] || [ "$pid" == "$pidNone" ]; then
+            if [[ -z "$pid" || "$pid" == "$pidNone" ]]; then
                 continue
             fi
             if ! kill -0 $pid 2>/dev/null; then
@@ -777,7 +777,7 @@ function get_available_process_index {
     local i=0
     for (( i=0; i<$maxProcesses; i++ )); do
         pid=${processIds[$i]}
-        if [ -z "$pid" ] || [ "$pid" == "$pidNone" ]; then
+        if [[ -z "$pid" || "$pid" == "$pidNone" ]]; then
             break
         fi
     done
@@ -802,7 +802,7 @@ function finish_test {
         header=$(printf "[%4d]" $countTotalTests)
     fi
 
-    if [ "$showTime" == "ON" ]; then
+    if [[ "$showTime" == "ON" ]]; then
         testEndTime=$(date +%s)
         testRunningTime=$(( $testEndTime - ${testStartTimes[$finishedProcessIndex]} ))
         header=$header$(printf "[%4ds]" $testRunningTime)
@@ -853,13 +853,13 @@ function prep_test {
     local scriptFilePath=$1
     local scriptFileDir=$(dirname "$scriptFilePath")
 
-    test "$verbose" == 1 && echo "Preparing $scriptFilePath"
+    test "$verbose" = 1 && echo "Preparing $scriptFilePath"
 
-    if [ ! "$noLFConversion" == "ON" ]; then
+    if [[ "$noLFConversion" != "ON" ]]; then
         # Convert DOS line endings to Unix if needed
         perl -pi -e 's/\r\n|\n|\r/\n/g' "$scriptFilePath"
     fi
-        
+
     # Add executable file mode bit if needed
     chmod +x "$scriptFilePath"
 
@@ -891,11 +891,11 @@ function start_test {
     local outputFilePath=$(dirname "$scriptFilePath")/${scriptFileName}.out
     outputFilePaths[$nextProcessIndex]=$outputFilePath
 
-    if [ "$showTime" == "ON" ]; then
+    if [[ "$showTime" == "ON" ]]; then
         testStartTimes[$nextProcessIndex]=$(date +%s)
     fi
 
-    test "$verbose" == 1 && echo "Starting $scriptFilePath"
+    test "$verbose" = 1 && echo "Starting $scriptFilePath"
     if is_unsupported_test "$scriptFilePath"; then
         skip_unsupported_test "$scriptFilePath" "$outputFilePath" &
     elif ((runFailingTestsOnly == 0)) && is_failing_test "$scriptFilePath"; then
@@ -1136,10 +1136,10 @@ do
             ;;
         --test-env=*)
             testEnv=${i#*=}
-            ;;            
+            ;;
         --gcstresslevel=*)
             export COMPlus_GCStress=${i#*=}
-            ;;            
+            ;;
         --gcname=*)
             export COMPlus_GCName=${i#*=}
             ;;
@@ -1166,7 +1166,7 @@ do
     esac
 done
 
-if [ -n "$coreOverlayDir" ] && [ "$buildOverlayOnly" == "ON" ]; then
+if [[ -n "$coreOverlayDir" && "$buildOverlayOnly" == "ON" ]]; then
     echo "Can not use \'--coreOverlayDir=<path>\' and \'--build-overlay-only\' at the same time."
     exit $EXIT_CODE_EXCEPTION
 fi
@@ -1189,36 +1189,36 @@ fi
 
 # Copy native interop test libraries over to the mscorlib path in
 # order for interop tests to run on linux.
-if [ -z "$mscorlibDir" ]; then
+if [[ -z "$mscorlibDir" ]]; then
     mscorlibDir=$coreClrBinDir
 fi
 
-if [ ! -z "$longgc" ]; then
+if [[ -n "$longgc" ]]; then
     echo "Running Long GC tests"
     export RunningLongGCTests=1
 fi
 
-if [ ! -z "$gcsimulator" ]; then
+if [[ -n "$gcsimulator" ]]; then
     echo "Running GC simulator tests"
     export RunningGCSimulatorTests=1
 fi
 
-if [[ ! "$jitdisasm" -eq 0 ]]; then
+if [[ "$jitdisasm" -ne 0 ]]; then
     echo "Running jit disasm"
     export RunningJitDisasm=1
 fi
 
-if [ ! -z "$ilasmroundtrip" ]; then
+if [[ -n "$ilasmroundtrip" ]]; then
     echo "Running Ilasm round trip"
     export RunningIlasmRoundTrip=1
 fi
 
 # If this is a coverage run, make sure the appropriate args have been passed
-if [ "$CoreClrCoverage" == "ON" ]
+if [[ "$CoreClrCoverage" == "ON" ]]
 then
     echo "Code coverage is enabled for this run"
     echo ""
-    if [ ! "$OSName" == "Darwin" ] && [ ! "$OSName" == "Linux" ]
+    if [[ "$OSName" != "Darwin" && "$OSName" != "Linux" ]]
     then
         echo "Code Coverage not supported on $OS"
         exit 1
@@ -1251,7 +1251,7 @@ text_file_output_begin
 create_core_overlay
 precompile_overlay_assemblies
 
-if [ "$buildOverlayOnly" == "ON" ];
+if [[ "$buildOverlayOnly" == "ON" ]];
 then
     echo "Build overlay directory '$coreOverlayDir' complete."
     exit 0
@@ -1302,7 +1302,7 @@ echo "$(($time_diff / 60)) minutes and $(($time_diff % 60)) seconds taken to run
 
 xunit_output_end
 
-if [ "$CoreClrCoverage" == "ON" ]
+if [[ "$CoreClrCoverage" == "ON" ]]
 then
     coreclr_code_coverage
 fi
index 26fae14..ec24b72 100755 (executable)
@@ -25,19 +25,19 @@ do
             print_usage
             exit $EXIT_CODE_SUCCESS
             ;;
-       
+
         --clone)
             clone=1
             ;;
-       
+
         --arch=*)
             arch=${i#*=}
             ;;
-       
+
         --os=*)
             os=${i#*=}
             ;;
-       
+
         *)
             echo "Unknown switch: $i"
             print_usage
@@ -48,7 +48,7 @@ done
 
 rid="$os-$arch"
 
-if [ ! -z "$clone" ]; then
+if [[ -n "$clone" ]]; then
     git clone --recursive https://github.com/mono/linker
 fi
 
index 39a87d0..13c2745 100755 (executable)
@@ -95,7 +95,7 @@ esac
 CPUName=$(uname -p)
 
 # Some Linux platforms report unknown for platform, but the arch for machine.
-if [ "$CPUName" == "unknown" ]; then
+if [[ "$CPUName" == "unknown" ]]; then
     CPUName=$(uname -m)
 fi
 
@@ -147,7 +147,7 @@ function waitany {
     while true; do
         for (( i=0; i<$maxProcesses; i++ )); do
             pid=${processIds[$i]}
-            if [ -z "$pid" ] || [ "$pid" == "$pidNone" ]; then
+            if [[ -z "$pid" || "$pid" == "$pidNone" ]]; then
                 continue
             fi
             if ! kill -0 $pid 2>/dev/null; then
@@ -167,7 +167,7 @@ function get_available_process_index {
     local i=0
     for (( i=0; i<$maxProcesses; i++ )); do
         pid=${processIds[$i]}
-        if [ -z "$pid" ] || [ "$pid" == "$pidNone" ]; then
+        if [[ -z "$pid" || "$pid" == "$pidNone" ]]; then
             break
         fi
     done
@@ -189,7 +189,7 @@ function finish_test {
     cat ${outputFilePath}
     echo "<<<<<"
 
-    if [ $testScriptExitCode -ne 0 ] ; then
+    if [ $testScriptExitCode -ne 0 ]; then
         failedTests[$countFailedTests]=$testProject
         countFailedTests=$(($countFailedTests+1))
     else
@@ -266,7 +266,7 @@ function summarize_test_run {
     echo "# Failed           : $countFailedTests"
     echo "======================="
 
-    if [ $countFailedTests -gt 0 ] ; then
+    if [ $countFailedTests -gt 0 ]; then
         echo
         echo "===== Failed tests:"
         for (( i=0; i<$countFailedTests; i++ )); do
@@ -336,7 +336,7 @@ run_test()
     ${TimeoutTool}./RunTests.sh --runtime-path "$Runtime" --rsp-file "$ExclusionRspFile"
     exitCode=$?
 
-    if [ $exitCode -ne 0 ] ; then
+    if [ $exitCode -ne 0 ]; then
         echo "error: One or more tests failed while running tests from '$fileNameWithoutExtension'.  Exit code $exitCode."
     fi
 
@@ -346,12 +346,12 @@ run_test()
 
 coreclr_code_coverage()
 {
-    if [ "$OS" != "FreeBSD" ] && [ "$OS" != "Linux" ] && [ "$OS" != "NetBSD" ] && [ "$OS" != "OSX" ]  && [ "$OS" != "SunOS" ] ; then
+    if [[ "$OS" != "FreeBSD" && "$OS" != "Linux" && "$OS" != "NetBSD" && "$OS" != "OSX" && "$OS" != "SunOS" ]]; then
         echo "error: Code Coverage not supported on $OS"
         exit 1
     fi
 
-    if [ "$CoreClrSrc" == "" ] ; then
+    if [[ -z "$CoreClrSrc" ]]; then
         echo "error: Coreclr source files are required to generate code coverage reports"
         echo "Coreclr source files root path can be passed using '--coreclr-src' argument"
         exit 1
@@ -487,26 +487,22 @@ done
 
 # Compute paths to the binaries if they haven't already been computed
 
-if [ "$Runtime" == "" ]
-then
+if [[ -z "$Runtime" ]]; then
     Runtime="$ProjectRoot/bin/testhost/netcoreapp-$OS-$Configuration-$__Arch"
 fi
 
-if [ "$CoreFxTests" == "" ]
-then
+if [[ -z "$CoreFxTests" ]]; then
     CoreFxTests="$ProjectRoot/bin"
 fi
 
 # Check parameters up front for valid values:
 
-if [ ! "$Configuration" == "Debug" ] && [ ! "$Configuration" == "Release" ]
-then
+if [[ "$Configuration" != "Debug" && "$Configuration" != "Release" ]]; then
     echo "error: Configuration should be Debug or Release"
     exit 1
 fi
 
-if [ "$OS" != "FreeBSD" ] && [ "$OS" != "Linux" ] && [ "$OS" != "NetBSD" ] && [ "$OS" != "OSX" ] && [ "$OS" != "SunOS" ]
-then
+if [[ "$OS" != "FreeBSD" && "$OS" != "Linux" && "$OS" != "NetBSD" && "$OS" != "OSX" && "$OS" != "SunOS" ]]; then
     echo "error: OS should be FreeBSD, Linux, NetBSD, OSX or SunOS"
     exit 1
 fi
@@ -514,8 +510,7 @@ fi
 export CORECLR_SERVER_GC="$serverGC"
 export PAL_OUTPUTDEBUGSTRING="1"
 
-if [ "$LANG" == "" ]
-then
+if [[ -z "$LANG" ]]; then
     export LANG="en_US.UTF-8"
 fi
 
@@ -551,15 +546,13 @@ if [ $RunTestSequential -eq 1 ]; then
     maxProcesses=1
 fi
 
-if [ -n "$TestDirFile" ] || [ -n "$TestDir" ]
-then
+if [[ -n "$TestDirFile" || -n "$TestDir" ]]; then
     run_selected_tests
 else
     run_all_tests "$CoreFxTests/tests/"*.Tests
 fi
 
-if [ "$CoreClrCoverage" == "ON" ]
-then
+if [[ "$CoreClrCoverage" == "ON" ]]; then
     coreclr_code_coverage
 fi
 
index 8e36564..991d180 100755 (executable)
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/usr/bin/env bash
+
 # This script is a bridge that allows .cmd files of individual tests to run the respective test executables
 # in an unloadable AssemblyLoadContext.
 #
index c6f6a3f..f432213 100644 (file)
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/usr/bin/env bash
+
 # This script is a bridge that allows .cmd files of individual tests to run the respective test executables
 # repeatedly so that more methods get rejitted at Tier1
 #
index fa39c53..1a6832d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 #Parse command line arguments
 __buildConfig=
@@ -17,7 +17,7 @@ do
 done
 
 #Check if there are any uncommited changes in the source directory as git adds and removes patches
-if [[ $(git status -s) != "" ]]; then
+if [[ -n $(git status -s) ]]; then
    echo 'ERROR: There are some uncommited changes. To avoid losing these changes commit them and try again.'
    echo ''
    git status
index 581b1e4..72a839b 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 CORECLRROOT=~/src/coreclr
 TESTROOT=~/test
index 35cb824..81ea171 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Run CoreCLR OSS tests on Linux or Mac
 # Use the instructions here:
index 3a97727..575e6a4 100755 (executable)
@@ -17,7 +17,7 @@ function print_usage {
     echo '  --testRootDir=<path>             : Root directory of the test build (e.g. runtime/artifacts/tests/windows.x64.Debug).'
     echo '  --disableEventLogging            : Disable the events logged by both VM and Managed Code'
     echo '  --sequential                     : Run tests sequentially (default is to run in parallel).'
-    echo '  --runcrossgen2tests              : Runs the ReadyToRun tests compiled with Crossgen2' 
+    echo '  --runcrossgen2tests              : Runs the ReadyToRun tests compiled with Crossgen2'
     echo '  --jitstress=<n>                  : Runs the tests with COMPlus_JitStress=n'
     echo '  --jitstressregs=<n>              : Runs the tests with COMPlus_JitStressRegs=n'
     echo '  --jitminopts                     : Runs the tests with COMPlus_JITMinOpts=1'
@@ -181,10 +181,10 @@ do
             ;;
         --test-env=*)
             testEnv=${i#*=}
-            ;;            
+            ;;
         --gcstresslevel=*)
             export COMPlus_GCStress=${i#*=}
-            ;;            
+            ;;
         --gcname=*)
             export COMPlus_GCName=${i#*=}
             ;;
@@ -236,30 +236,30 @@ fi
 if [ "$buildOS" = "Android" ]; then
     runtestPyArguments+=("-os" "Android")
 fi
-    
-if [ ! -z "$testRootDir" ]; then
+
+if [[ -n "$testRootDir" ]]; then
     runtestPyArguments+=("-test_location" "$testRootDir")
     echo "Test Location                 : ${testRootDir}"
 fi
 
-if [ ! -z "${testEnv}" ]; then
+if [[ -n "${testEnv}" ]]; then
     runtestPyArguments+=("-test_env" "${testEnv}")
     echo "Test Env                      : ${testEnv}"
 fi
 
 echo ""
 
-if [ ! -z "$longgc" ]; then
+if [[ -n "$longgc" ]]; then
     echo "Running Long GC tests"
     runtestPyArguments+=("--long_gc")
 fi
 
-if [ ! -z "$gcsimulator" ]; then
+if [[ -n "$gcsimulator" ]]; then
     echo "Running GC simulator tests"
     runtestPyArguments+=("--gcsimulator")
 fi
 
-if [ ! -z "$ilasmroundtrip" ]; then
+if [[ -n "$ilasmroundtrip" ]]; then
     echo "Running Ilasm round trip"
     runtestPyArguments+=("--ilasmroundtrip")
 fi
@@ -268,29 +268,29 @@ if (($verbose!=0)); then
     runtestPyArguments+=("--verbose")
 fi
 
-if [ ! "$runSequential" -eq 0 ]; then
+if [ "$runSequential" -ne 0 ]; then
     echo "Run tests sequentially."
     runtestPyArguments+=("--sequential")
 fi
 
-if [ ! -z "$printLastResultsOnly" ]; then
+if [[ -n "$printLastResultsOnly" ]]; then
     runtestPyArguments+=("--analyze_results_only")
 fi
 
-if [ ! -z "$RunCrossGen2" ]; then
+if [[ -n "$RunCrossGen2" ]]; then
     runtestPyArguments+=("--run_crossgen2_tests")
 fi
 
-if [ "$limitedCoreDumps" == "ON" ]; then
+if [[ "$limitedCoreDumps" == "ON" ]]; then
     runtestPyArguments+=("--limited_core_dumps")
 fi
 
-if [[ ! "$runincontext" -eq 0 ]]; then
+if [[ "$runincontext" -ne 0 ]]; then
     echo "Running in an unloadable AssemblyLoadContext"
     runtestPyArguments+=("--run_in_context")
 fi
 
-if [[ ! "$tieringtest" -eq 0 ]]; then
+if [[ "$tieringtest" -ne 0 ]]; then
     echo "Running to encourage tier1 rejitting"
    runtestPyArguments+=("--tieringtest")
 fi
index 0949d4a..0c0112f 100755 (executable)
@@ -156,7 +156,7 @@ if [ ! -d "$testRootDir" ]; then
     exit $EXIT_CODE_EXCEPTION
 fi
 
-if [ ! -z "$testEnv" ] && [ ! -e "$testEnv" ]; then
+if [[ -n "$testEnv" && ! -e "$testEnv" ]]; then
     echo "File specified by --playlist does not exist: $testEnv"
     exit $EXIT_CODE_EXCEPTION
 fi