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
exit 0
else
passedSubset="$(echo "$2" | tr "[:upper:]" "[:lower:]")"
- if [ $passedSubset == "help" ]; then
+ if [[ "$passedSubset" == "help" ]]; then
showSubsetHelp
exit 0
fi
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
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
echo "$MANAGED_FILES" | xargs git add
fi
-
exit 0
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`"
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
# 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
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"
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"
# 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
export CORECLR_SERVER_GC="$serverGC"
export PAL_OUTPUTDEBUGSTRING="1"
-if [ -z "$LANG" ]
-then
+if [[ -z "$LANG" ]]; then
export LANG="en_US.UTF-8"
fi
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."
TEST_NAME=$4
XHARNESS_OUT="$EXECUTION_DIR/xharness-output"
-if [ -n "$5" ]; then
+if [[ -n "$5" ]]; then
ADDITIONAL_ARGS=${@:5}
fi
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"
-#!/usr/bin/env bash
+#!/usr/bin/env bash
# NOTE: this script is only used locally, on CI we use the Helix SDK from arcade
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"
shift
done
-if [ "$RUNTIME_PATH" == "" ]; then
+if [[ -z "$RUNTIME_PATH" ]]; then
echo "error: -r|--runtime-path argument is required."
usage
exit -1
}
# ========================= 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.
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.
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 ===============================
# 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.* ...
# ======================== 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
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"
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"
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"
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
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 ""
esac
done
-if [ "$repository" == "dotnet/performance" ] || [ "$repository" == "dotnet-performance" ]; then
+if [[ "$repository" == "dotnet/performance" || "$repository" == "dotnet-performance" ]]; then
run_from_perf_repo=true
fi
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
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
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
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
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
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
esac
done
- if [ $__TurnOff == 1 ]; then
+ if [[ "$__TurnOff" == 1 ]]; then
unset DEBUG_SANITIZERS
echo "Setting DEBUG_SANITIZERS="
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"
# 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
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
# 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.
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
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
-#!/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
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
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
}
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
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 _ -)
}
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
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
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
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
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
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
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
-#!/bin/bash
+#!/usr/bin/env bash
current_user=$(whoami)
if [ $current_user != "root" ]; then
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
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"
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"
}
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
}
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"
}
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
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(){
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
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
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
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
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
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
-#!/bin/bash
+#!/usr/bin/env bash
InstallationTestResult="result.txt"
InstallationTestLogFile="logfile.txt"
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
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
-#!/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 "$@"
-#!/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
-#!/bin/bash
+#!/usr/bin/env bash
rm -f /etc/samba/smb.conf
# Configure domain and start daemons
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
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)}"
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
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.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
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void SUPER_TYPE::.ctor()
ret
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
TEST_BYTE_1=$4
-if [ "x$TEST_BYTE_1" = "x" ] ; then
+if [ "x$TEST_BYTE_1" = "x" ]; then
TEST_BYTE_1="0";
fi
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
TEST_NAME=$1
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.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
{
}
}
{
.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
{
}
}
.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 ()
TARGET:
leave END
END:
- ret
+ ret
}
}
call instance void class DriverClass<IFaceImpl>::Driver()
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
$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'
.entrypoint
.maxstack 8
.locals init ( int32 BLA)
-
+
${BRANCH_1}
ldc.i4 0x7FFFFFFF
pop
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
.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
.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
.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
}
.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
}
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
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
.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
}
}
call void foo ()
leave END
} catch [mscorlib]System.InvalidCastException {
- pop
+ pop
leave END
} catch [mscorlib]System.NullReferenceException {
- pop
+ pop
leave END
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
{
.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)
leave END
END:
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
.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
.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
.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
}
.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
}
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
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.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
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
{
.maxstack 8
ldc.i4.0
- ret
- }
+ ret
+ }
}
.class nested public Test EXTENDS
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
CONSTRUCTOR
ret
}
OPCODE // VALIDITY.
pop
ret
- }
+ }
}
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.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
}
}
.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
}
}
.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 ()
newobj instance void ${TARGET_TYPE}::.ctor()
pop
ldc.i4.0
- ret
+ ret
}
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
TCONV_1="default"
TCONV_2=""
-if [ "$TEST_CCONV1" != "" ]; then
+if [ -z "$TEST_CCONV1" ]; then
TCONV_1=$TEST_CCONV1
TCONV_2=$TEST_CCONV2
fi
$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'
.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
{
}
}
{
$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
{
.locals init ($LOCAL_PARAM_1 ARG)
ldnull
-
+
$LDFTN
newobj instance void class TargetDelegate::.ctor(object, native int) // VALIDITY
ldloc.0
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
{
.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 ()
.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 ()
{
.maxstack 8
.locals init (MyValueType V_0)
-
+
OPCODE
LDFTN_OP
DELEGATE_OP:
{
pop
leave END
-
+
}
END:
ldc.i4.0
- ret
+ ret
}
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.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
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
{
.maxstack 8
ldc.i4.0
- ret
- }
+ ret
+ }
}
}
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
ROOT_CONSTRUCTOR
ret
}
{
.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
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.try
{
nop
- nop
+ nop
${LEAVE_2}
}
- catch [mscorlib]System.Exception
+ catch [mscorlib]System.Exception
{
pop
${LEAVE_3}
leave END
- } catch [mscorlib]System.Exception
+ } catch [mscorlib]System.Exception
{
pop
leave END
}
NEXT_4:
- .try
+ .try
{
nop
nop
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
${OPCODE_2}
leave TRY_2
}
- catch [mscorlib]System.NullReferenceException
+ catch [mscorlib]System.NullReferenceException
{
pop
${OPCODE_3}
nop
leave TRY_4
}
- catch [mscorlib]System.NullReferenceException
+ catch [mscorlib]System.NullReferenceException
{
pop
${OPCODE_5}
TRY_4:
- .try
+ .try
{
nop
leave END
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
OPCODE2
leave branch_target5
}
- catch [mscorlib]System.Exception
+ catch [mscorlib]System.Exception
{
pop
branch_target2:
OPCODE4
endfinally
}
- .try
+ .try
{
nop
leave branch_target5
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
pop
FILTER_BLOCK_3_A:
- stloc.0
+ stloc.0
nop
nop
ldc.i4.0
pop
FINALLY_BLOCK_1_A:
- stloc.0
+ stloc.0
nop
nop
ldc.i4.0
.entrypoint
.maxstack 8
.locals init (object _X0, int32 V0)
-
+
ldloca 1
volatile.
AFTER_PREFIX_1:
ldind.i4
pop
-
+
TRY_BLOCK_1:
nop
TRY_BLOCK_1_A:
CATCH_BLOCK_1:
nop
CATCH_BLOCK_1_A:
- stloc.0
+ stloc.0
nop
ldloca 1
CATCH_BLOCK_2:
nop
CATCH_BLOCK_2_A:
- stloc.0
+ stloc.0
nop
nop
leave END
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.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
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void ClassA::.ctor()
ret
}
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void Overlapped::.ctor()
ret
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.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
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
.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
}
-}
+}
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> ()
call void class Test2< $INST_TYPE >::Method()
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
initobj TYPE2 // VALIDITY
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
$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'
.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
call TYPE class Driver::Foo()
pop
ldc.i4.0
- ret
+ ret
}
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
call void foo ()
leave END
} catch [mscorlib]System.NullReferenceException {
- pop
+ pop
leave END
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
call void foo ()
leave END
} catch [mscorlib]System.NullReferenceException {
- pop
+ pop
leave END
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.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 ()
LDFTN_OP
pop
ldc.i4.0
- ret
+ ret
}
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
ldobj TYPE2 // VALIDITY
pop
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
CALL_OP
pop
ldc.i4.0
- ret
+ ret
}
}
-
+
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.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 ()
pop
ldc.i4.0
- ret
+ ret
}
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
throw
leave END
}
- catch [mscorlib]System.Exception
+ catch [mscorlib]System.Exception
{
pop
leave END
.try
{
newobj instance void class [mscorlib]System.Exception::.ctor()
- throw
+ throw
leave END
}
finally
endfinally
}
- .try
+ .try
{
newobj instance void class [mscorlib]System.Exception::.ctor()
- throw
+ throw
leave END
}
filter
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
OP
stloc.0
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
$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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
$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'
.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
}
}
.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
}
}
.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
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
pop
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.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
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
{
.maxstack 8
ldc.i4.0
- ret
- }
+ ret
+ }
}
}
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
CONSTRUCTOR
ret
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
POST_OP
pop
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
.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)
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()
.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
}
}
{
.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
}
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.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
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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
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'
.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
}
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
{
.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)
leave END
END:
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
${OPCODE_2}
leave END
}
- catch [mscorlib]System.NullReferenceException
+ catch [mscorlib]System.NullReferenceException
{
pop
${OPCODE_3}
${OPCODE_4}
leave END
}
- catch [mscorlib]System.NullReferenceException
+ catch [mscorlib]System.NullReferenceException
{
pop
${OPCODE_5}
}
- .try
+ .try
{
nop
leave END
endfinally
}
- .try
+ .try
{
nop
leave END
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
.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
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
.method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
{
.maxstack 8
- ldarg.0
+ ldarg.0
call instance void object::.ctor()
ret
}
{
.maxstack 8
ldc.i4.0
- ret
- }
+ ret
+ }
}
.method public void Method ()
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
$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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
.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
}
}
call void foo ()
leave END
} catch [mscorlib]System.ArrayTypeMismatchException {
- pop
+ pop
leave END
} catch [mscorlib]System.NullReferenceException {
- pop
+ pop
leave END
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
ldloc.1
OP
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
$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'
.entrypoint
.maxstack 8
.locals init ( int32 V0, native int V1)
-
+
${BRANCH_EXTRA_1}
${BRANCH_1}
ldc.i4 0x7FFFFFFF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
{
.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 ()
leave END
END:
$LD_RET_CODE
- ret
+ ret
}
leave END
END:
ldc.i4.0
- ret
+ ret
}
//EOF
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}"
./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}"
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}"
# 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
./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
./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
#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
function fix () {
- if [ "$3" != "" ]; then
+ if [ -n "$3" ]; then
A=$3;
- elif [ "$2" != "" ]; then
+ elif [ -n "$2" ]; then
A=$2;
else
A=$1;
./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
./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
#./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`
# 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'
# 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'
# 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
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
# 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"
./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
./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
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"
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}"
./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)'
./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'
#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
#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
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}"
#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`
#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
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`
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
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
./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`
./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"
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"
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`
#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"
#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";
#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"
#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
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
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
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
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
#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
#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`
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
#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
./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)
./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)
./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
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`
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`
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)"
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`
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`
./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`
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
.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
}
}
call void foo ()
leave END
} catch [mscorlib]System.NullReferenceException {
- pop
+ pop
leave END
}
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
$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'
.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
}
}
.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
}
}
{
.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
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
TEST_EXTRA_LOC=$5
-if [ "$TEST_EXTRA_LOC" != "" ]; then
+if [ -n "$TEST_EXTRA_LOC" ]; then
EXTRA_LOC=", $TEST_EXTRA_LOC V_1"
fi
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
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'
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
END:
ldc.i4.0
- ret
+ ret
}
//EOF
#! /bin/sh
SED="sed"
-if [ `which gsed 2> /dev/null` ] ; then
+if [ `which gsed 2> /dev/null` ]; then
SED="gsed"
fi
POST_OP
pop
ldc.i4.0
- ret
+ ret
}
//EOF
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"
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
-#!/bin/bash
+#!/usr/bin/env bash
#Usage message
function usage {
local printUsage=$2
echo "ERROR: $errorMessage"
- if [ "$printUsage" == "true" ]; then
+ if [[ "$printUsage" == "true" ]]; then
echo ''
usage
fi
echo 'The script is exited. Cleaning environment..'
- if [ "$__ciMode" == "emulator" ]; then
+ if [[ "$__ciMode" == "emulator" ]]; then
clean_env
fi
}
# 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)
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)
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"
# 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"
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"
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
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
__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
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
## 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
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
-#!/bin/bash
+#!/usr/bin/env bash
set -x
local printUsage=$2
echo "ERROR: $errorMessage"
- if [ "$printUsage" == "true" ]; then
+ if [[ "$printUsage" == "true" ]]; then
echo ''
usage
fi
__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
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'
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
echo "$line" >>"$xunitTestOutputPath"
line=" "
- if [ "$testResult" == "Skip" ]; then
+ if [[ "$testResult" == "Skip" ]]; then
line="${line}<reason><![CDATA[$(cat "$outputFilePath")]]></reason>"
echo "$line" >>"$xunitTestOutputPath"
else
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"
function is_skip_crossgen_test {
for skip in "${skipCrossGenFiles[@]}"; do
- if [ "$1" == "$skip" ]; then
+ if [[ "$1" == "$skip" ]]; then
return 0
fi
done
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
function is_unsupported_test {
for unsupportedTest in "${unsupportedTests[@]}"; do
- if [ "$1" == "$unsupportedTest" ]; then
+ if [[ "$1" == "$unsupportedTest" ]]; then
return 0
fi
done
function is_failing_test {
for failingTest in "${failingTests[@]}"; do
- if [ "$1" == "$failingTest" ]; then
+ if [[ "$1" == "$failingTest" ]]; then
return 0
fi
done
function is_playlist_test {
for playlistTest in "${playlistTests[@]}"; do
- if [ "$1" == "$playlistTest" ]; then
+ if [[ "$1" == "$playlistTest" ]]; then
return 0
fi
done
# 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
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
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
local scriptFileName=$(basename "$scriptFilePath")
local outputFileName=$(basename "$outputFilePath")
- if [ "$limitedCoreDumps" == "ON" ]; then
+ if [[ "$limitedCoreDumps" == "ON" ]]; then
set_up_core_dump_generation
fi
# 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
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
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
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)
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"
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
;;
--test-env=*)
testEnv=${i#*=}
- ;;
+ ;;
--gcstresslevel=*)
export COMPlus_GCStress=${i#*=}
- ;;
+ ;;
--gcname=*)
export COMPlus_GCName=${i#*=}
;;
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
# 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
create_core_overlay
precompile_overlay_assemblies
-if [ "$buildOverlayOnly" == "ON" ];
+if [[ "$buildOverlayOnly" == "ON" ]];
then
echo "Build overlay directory '$coreOverlayDir' complete."
exit 0
xunit_output_end
-if [ "$CoreClrCoverage" == "ON" ]
+if [[ "$CoreClrCoverage" == "ON" ]]
then
coreclr_code_coverage
fi
print_usage
exit $EXIT_CODE_SUCCESS
;;
-
+
--clone)
clone=1
;;
-
+
--arch=*)
arch=${i#*=}
;;
-
+
--os=*)
os=${i#*=}
;;
-
+
*)
echo "Unknown switch: $i"
print_usage
rid="$os-$arch"
-if [ ! -z "$clone" ]; then
+if [[ -n "$clone" ]]; then
git clone --recursive https://github.com/mono/linker
fi
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
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
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
cat ${outputFilePath}
echo "<<<<<"
- if [ $testScriptExitCode -ne 0 ] ; then
+ if [ $testScriptExitCode -ne 0 ]; then
failedTests[$countFailedTests]=$testProject
countFailedTests=$(($countFailedTests+1))
else
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
${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
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
# 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
export CORECLR_SERVER_GC="$serverGC"
export PAL_OUTPUTDEBUGSTRING="1"
-if [ "$LANG" == "" ]
-then
+if [[ -z "$LANG" ]]; then
export LANG="en_US.UTF-8"
fi
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
-#!/bin/bash
+#!/usr/bin/env bash
OSName=$(uname -s)
case $OSName in
-#!/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.
#
-#!/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
#
-#!/bin/bash
+#!/usr/bin/env bash
#Parse command line arguments
__buildConfig=
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
-#!/bin/bash
+#!/usr/bin/env bash
CORECLRROOT=~/src/coreclr
TESTROOT=~/test
-#!/bin/bash
+#!/usr/bin/env bash
# Run CoreCLR OSS tests on Linux or Mac
# Use the instructions here:
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'
;;
--test-env=*)
testEnv=${i#*=}
- ;;
+ ;;
--gcstresslevel=*)
export COMPlus_GCStress=${i#*=}
- ;;
+ ;;
--gcname=*)
export COMPlus_GCName=${i#*=}
;;
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
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
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