host_win32=yes
mono_cv_clang=no
if test "x$cross_compiling" = "xno"; then
- if test "x$host" == "x$build" -a "x$host" == "x$target"; then
+ if test "x$host" = "x$build" -a "x$host" = "x$target"; then
target_win32=yes
fi
else
- if test "x$host" == "x$target"; then
+ if test "x$host" = "x$target"; then
target_win32=yes
fi
fi
AC_ARG_ENABLE(bcl-opt, [ --disable-bcl-opt BCL is compiled with no optimizations (allows accurate BCL debugging)], test_bcl_opt=$enableval, test_bcl_opt=yes)
AC_ARG_ENABLE(perf-events, [ --enable-perf-events Enable using `perf` for profiling on Linux], test_perf_events=$enableval, test_perf_events=no)
-if test "x$test_perf_events" == "xyes"; then
+if test "x$test_perf_events" = "xyes"; then
AC_DEFINE(ENABLE_PERF_EVENTS, 1, [Enable using `perf` for profiling on Linux])
AC_SUBST(ENABLE_PERF_EVENTS)
fi
AC_MSG_CHECKING(LLVM version)
AC_MSG_RESULT($llvm_version $llvm_api_version)
if echo $llvm_version | grep -q 'mono'; then
- if test "x$enable_llvm_version_check" == "xyes"; then
+ if test "x$enable_llvm_version_check" = "xyes"; then
if test "$llvm_version" != "$expected_llvm_version"; then
AC_MSG_ERROR([Expected llvm version $expected_llvm_version, but llvm-config --version returned $llvm_version"])
fi
llvm_jit_libs=""
fi
LLVM_LIBS=`$LLVM_CONFIG --libs analysis core bitwriter $llvm_jit_libs`
- if test "x$LLVM_LIBS" == "x"; then
+ if test "x$LLVM_LIBS" = "x"; then
echo "$LLVM_CONFIG --libs failed."
exit 1
fi
-Subproject commit 836ed963de7fc898e60062175babeca17e67520b
+Subproject commit 5b907267935346d2fe110d226bf3a62abcbd0dc6
[TestFixture]
public class ClientWebSocketTest
{
- const string EchoServerUrl = "ws://echo.websocket.org";
+ const string EchoServerUrl = "ws://corefx-net.cloudapp.net/WebSocket/EchoWebSocket.ashx";
int Port = NetworkHelpers.FindFreePort ();
HttpListener listener;
ClientWebSocket socket;
g_free(handles);
- return ret;
+ /* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
+ return ret == WAIT_FAILED ? 0x7fffffff : ret;
}
/* FIXME: exitContext isnt documented */
return ret - WAIT_ABANDONED_0;
}
else {
- return ret;
+ /* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
+ return ret == WAIT_FAILED ? 0x7fffffff : ret;
}
}
mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
- return ret;
+ /* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
+ return ret == WAIT_FAILED ? 0x7fffffff : ret;
}
gint32
mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
- return ret;
+ /* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
+ return ret == WAIT_FAILED ? 0x7fffffff : ret;
}
HANDLE ves_icall_System_Threading_Mutex_CreateMutex_internal (MonoBoolean owned, MonoString *name, MonoBoolean *created)
%.exe: %.cil
- ilasm2 -out:$@ $<
+ ilasm -out:$@ $<
BatchCompiler.exe: BatchCompiler.cs
- gmcs -r:../../../mcs/class/lib/net_2_0/ilasm.exe BatchCompiler.cs
+ mcs -r:../../../mcs/class/lib/net_4_x/ilasm.exe BatchCompiler.cs
test_lib.dll: test_lib.cs
- gmcs test_lib.cs -target:library
+ mcs test_lib.cs -target:library
compile-stamp: generate-stamp BatchCompiler.exe test_lib.dll
for i in *.cs; do \
EXE="`echo $$i | cut -d. -f1`.exe"; \
DLL="`echo $$i | cut -d. -f1`.dll"; \
if ! [ -f $$EXE ] && ! [ -f $$DLL ]; then \
- gmcs /unsafe $$i; \
+ mcs /unsafe $$i; \
fi \
done
#MONO_PATH=../../../mcs/class/lib/net_2_0/ mono BatchCompiler.exe
then \
RES=3; \
fi; \
- if [ "$$FIRST" == "unverifiable" ] || [ "$FIRST" == "typeunverifiable" ]; \
+ if [ "$$FIRST" == "unverifiable" ] || [ "$$FIRST" == "typeunverifiable" ]; \
then \
RES=2; \
fi; \
fi; \
if [ "$$FIRST" == "strict" ]; \
then \
- #in strict more it must fail under strict check and pass under non-strict check \
+ echo "#in strict more it must fail under strict check and pass under non-strict check" >/dev/null; \
../../metadata/pedump --verify partial-md,error,warn,cls,code $$TEST.exe >/dev/null 2>/dev/null; \
R1=$$?; \
../../metadata/pedump --verify partial-md,error,warn,cls,code,non-strict $$TEST.exe >/dev/null 2>/dev/null; \
R2=$$?; \
if [ $$R1 != 2 ] && [ $$R1 != 3 ]; then \
echo "$$TEST is strict but did not fail under strict check, got $${R1} but expected 2 or 3"; \
- fi \
- #non-strict result \
+ fi; \
+ echo "#non-strict result" >/dev/null; \
if [ $$R2 != 0 ]; then \
echo "$$TEST is strict but did not pass under non-strict check, got $${R2} but expected 0"; \
- fi \
+ fi; \
elif [ "$$FIRST" == "typeunverifiable" ]; then \
- #in type unverifiable more it must fail under verifiable mode but it's ok under valid mode \
+ echo "#in type unverifiable more it must fail under verifiable mode but it's ok under valid mode" >/dev/null; \
../../metadata/pedump --verify partial-md,error,warn,cls,code $$TEST.exe >/dev/null 2>/dev/null; \
R1=$$?; \
../../metadata/pedump --verify partial-md,error,warn,cls,code,valid-only $$TEST.exe >/dev/null 2>/dev/null; \
R2=$$?; \
if [ $$R1 != 3 ]; then \
echo "$$TEST is type unverifiable but did not fail under verifiable check, got $${R1} but expected 3"; \
- fi \
- #type unverifiable result \
+ fi; \
+ echo "#type unverifiable result" >/dev/null; \
if [ $$R2 != 0 ]; then \
echo "$$TEST is type unverifiable but did not pass under non-strict check, got $${R2} but expected 0"; \
- fi \
+ fi; \
elif [ $$RES != 99 ]; then \
../../metadata/pedump --verify partial-md,error,warn,cls,code $$TEST.exe >/dev/null 2>/dev/null; \
R=$$?; \
if [ $$R != $$RES ]; then \
echo "$$TEST failed expected $$RES but got $$R"; \
- fi \
+ fi; \
fi; \
done
TEST_EXTENDS=$6
TEST_USE_SUB_CLASS=$7
-if [ "$TEST_EXTENDS" == "yes" ]; then
+if [ "$TEST_EXTENDS" = "yes" ]; then
TEST_EXTENDS="extends Class"
TEST_SUPER_TYPE="Class"
else
TEST_SUPER_TYPE="object"
fi
-if [ "$TEST_USE_SUB_CLASS" == "yes" ]; then
+if [ "$TEST_USE_SUB_CLASS" = "yes" ]; then
TEST_VAR_TYPE="ExampleClass"
else
TEST_VAR_TYPE="Class"
ret
}
}
-//EOF
\ No newline at end of file
+//EOF
TEST_BYTE_1=$4
-if [ "$TEST_BYTE_1" == "" ] ; then
+if [ "x$TEST_BYTE_1" = "x" ] ; then
TEST_BYTE_1="0";
fi
TEST_INIT_EXP=$6
TEST_INIT_VAL=$7
-if [ "$TEST_INIT_VAL" == "yes" ]; then
+if [ "$TEST_INIT_VAL" = "yes" ]; then
TEST_INIT="$TEST_INIT_EXP\n\t\stloc.1"
else
TEST_INIT=""
ldc.i4.0
ret
}
-//EOF
\ No newline at end of file
+//EOF
TEST_BEFORE_OP=$4
TEST_CONSTRAINT_TYPE=$5
-if [ "$TEST_CONSTRAINT_TYPE" == "" ]; then
+if [ "x$TEST_CONSTRAINT_TYPE" = "x" ]; then
TEST_CONSTRAINT_TYPE="IFace";
fi
TEST_OP=$4
TEST_FIN=$5
-if [ "$TEST_FIN" == "" ]; then
+if [ "x$TEST_FIN" = "x" ]; then
TEST_FIN="finally";
fi
TEST_INSTANCE_METHOD=$5
TEST_EXTRA_STUFF=$6
-if [ "$TEST_INSTANCE_METHOD" == "instance" ]; then
+if [ "$TEST_INSTANCE_METHOD" = "instance" ]; then
MEMBER_TEST_OP=$TEST_OP
MEMBER_TEST_LOAD_ARGS=$TEST_LOAD_ARGS
MEMBER_TEST_EXTRA_STUFF=$6
echo $TEST_OP | grep unbox > /dev/null;
-if [ "$?" == "0" ]; then
+if [ $? -eq 0 ]; then
TEST_CODE="
ldloc.0
box $TEST_TYPE";
ZZ=`echo $TEST_TYPE1 | grep "\&"`
T1_REF=$?
-if [ "$T1_REF" == "0" ]; then
+if [ $T1_REF -eq 0 ]; then
T1_NO_REF=`echo $TEST_TYPE1 | cut -d '\' -f 1`
INIT_LOCS=", $T1_NO_REF V_2"
INIT_IL="ldloca.s 2\n\tstloc.0"
ZZ=`echo $TEST_TYPE2 | grep "\&"`
T2_REF=$?
-if [ "$T2_REF" == "0" ]; then
+if [ $T2_REF -eq 0 ]; then
T2_NO_REF=`echo $TEST_TYPE2 | cut -d '\' -f 1`
- if [ "$T1_REF" == "0" ]; then
+ if [ $T1_REF -eq 0 ]; then
INIT_LOCS="$INIT_LOCS , $T2_NO_REF V_3"
INIT_IL="$INIT_IL \n\tldloca.s 3\n\tstloc.1"
else
TEST_LOAD_BASE=$7
-if [ "$TEST_EXTENDS" == "yes" ]; then
+if [ "$TEST_EXTENDS" = "yes" ]; then
TEST_EXTENDS="extends Owner\/Nested"
TEST_CONSTRUCTOR="call instance void Owner\/Nested::.ctor()"
else
TEST_CONSTRUCTOR="call instance void object::.ctor()"
fi
-if [ "$TEST_LOAD_BASE" == "yes" ]; then
+if [ "$TEST_LOAD_BASE" = "yes" ]; then
TEST_LOAD_REF="ldarg.0"
else
TEST_LOAD_REF="call class Owner\/Nested Owner::Create ()"
TARGET_TYPE="Test"
TEST_OTHER_CODE="call instance void TestClass::'.ctor'()"
-if [ "$TEST_TARGET_TYPE" == "other" ]; then
+if [ "$TEST_TARGET_TYPE" = "other" ]; then
TARGET_TYPE="TestSubClass"
TEST_OTHER_CODE=$TEST_CODE
TEST_CODE=""
RET_2_LOCAL="$TEST_RET_TYPE2"
RET_2_OP="ldloc 0"
-if [ "$TEST_RET_TYPE2" == "void" ]; then
+if [ "$TEST_RET_TYPE2" = "void" ]; then
RET_2_LOCAL="int32"
RET_2_OP="nop"
fi
}
"
-if [ "$TEST_USE_NATIVE" == "pinvoke" ]; then
+if [ "$TEST_USE_NATIVE" = "pinvoke" ]; then
LDFTN="ldftn $TCONV_2 ${TEST_RET_TYPE2} Driver::NativeMethod(${TEST_PARAM_TYPE2})"
CALLVIRT="nop"
MANAGED_METHOD=""
TEST_LOAD_BASE=$9
-if [ "$TEST_BASE_EXTENDS" == "yes" ]; then
+if [ "$TEST_BASE_EXTENDS" = "yes" ]; then
TEST_BASE_EXTENDS="extends Root"
TEST_BASE_CONSTRUCTOR="call instance void Root::.ctor()"
else
TEST_BASE_CONSTRUCTOR="call instance void object::.ctor()"
fi
-if [ "$TEST_NESTED_EXTENDS" == "yes" ]; then
+if [ "$TEST_NESTED_EXTENDS" = "yes" ]; then
TEST_NESTED_EXTENDS="extends Root\/Nested"
TEST_NESTED_CONSTRUCTOR="call instance void Root\/Nested::.ctor()"
else
TEST_NESTED_CONSTRUCTOR="call instance void object::.ctor()"
fi
-if [ "$TEST_LOAD_BASE" == "yes" ]; then
+if [ "$TEST_LOAD_BASE" = "yes" ]; then
TEST_LOAD_REF="ldarg.0"
else
TEST_LOAD_REF="call class Root\/Nested Root::Create ()"
TEST_WITH_FILTER_BLOCK=$5
TEST_WITH_FINALLY_BLOCK=$6
-if [ "$TEST_WITH_FILTER_BLOCK" == "yes" ]; then
+if [ "$TEST_WITH_FILTER_BLOCK" = "yes" ]; then
FILTER_BLOCK="
FILTER_BLOCK_3:
nop
FILTER_BLOCK="";
fi
-if [ "$TEST_WITH_FINALLY_BLOCK" == "yes" ]; then
+if [ "$TEST_WITH_FINALLY_BLOCK" = "yes" ]; then
FINALLY_BLOCK="
FINALLY_BLOCK_1:
nop
TEST_TYPE1=$4
TEST_TYPE2=$5
TEST_EMIT_CSTOR=$6
-if [ "${TEST_EMIT_CSTOR}" == "yes" ]; then
+if [ "${TEST_EMIT_CSTOR}" = "yes" ]; then
TEST_CSTOR="newobj instance void ${TEST_TYPE2}::.ctor()";
else
TEST_CSTOR="ldloc.0";
T1_REF=$?
LOCAL_INIT="";
-if [ "$T1_REF" == "0" ]; then
+if [ $T1_REF -eq 0 ]; then
T1_NO_REF=`echo $TEST_TYPE1 | cut -d '\' -f 1`
INIT_LOCS=", $T1_NO_REF V_0"
INIT_IL="ldloca.s 1\n\tstloc.0"
T1_REF=$?
LOCAL_INIT="";
-if [ "$T1_REF" == "0" ]; then
+if [ $T1_REF -eq 0 ]; then
T1_NO_REF=`echo $TEST_TYPE1 | cut -d '\' -f 1`
INIT_LOCS=", $T1_NO_REF V_0"
INIT_IL="ldloca.s 1\n\tstloc.0"
leave END
}"
-if [ "$TEST_BLOCK" == "catch" ]; then
+if [ "$TEST_BLOCK" = "catch" ]; then
TRY_MIDDLE="
leave END
} catch [mscorlib]System.NullReferenceException {"
TRY_END="
leave END
}"
-elif [ "$TEST_BLOCK" == "filter" ]; then
+elif [ "$TEST_BLOCK" = "filter" ]; then
TRY_MIDDLE="
leave END
} filter {"
} {
leave END
}"
-elif [ "$TEST_BLOCK" == "handler" ]; then
+elif [ "$TEST_BLOCK" = "handler" ]; then
TRY_MIDDLE="
leave END
} filter {
TRY_END="
leave END
}"
-elif [ "$TEST_BLOCK" == "finally" ]; then
+elif [ "$TEST_BLOCK" = "finally" ]; then
TRY_MIDDLE="
leave END
} finally {"
TRY_END="
endfinally
}"
-elif [ "$TEST_BLOCK" == "fault" ]; then
+elif [ "$TEST_BLOCK" = "fault" ]; then
TRY_MIDDLE="
leave END
} fault {"
TEST_MEMBER_ACCESS=$5
TEST_EXTENDS=$6
-if [ "$TEST_EXTENDS" == "yes" ]; then
+if [ "$TEST_EXTENDS" = "yes" ]; then
TEST_EXTENDS="extends Owner"
TEST_CONSTRUCTOR="call instance void Owner::.ctor()"
else
ldc.i4.0
ret
}
-//EOF
\ No newline at end of file
+//EOF
TEST_TYPE1=`echo $TEST_TYPE1 | $SED -s 's/&/\\\&/'`
TEST_TYPE2=`echo $TEST_TYPE2 | $SED -s 's/&/\\\&/'`
-if [ "$TEST_CREATE_FIELD" == "no" ]; then
+if [ "$TEST_CREATE_FIELD" = "no" ]; then
CLASS_FIELDS="";
else
CLASS_FIELDS=".field public ${TEST_TYPE1} fld\n .field public static ${TEST_TYPE1} sfld";
TEST_POS_2=$5
TEST_TYPE_0=$6
-if [ "$TEST_TYPE_0" == "" ] ; then
+if [ "x$TEST_TYPE_0" = "x" ] ; then
TEST_TYPE_0="int32";
fi
T2_REF=$?
LOCAL_INIT="";
-if [ "$T2_REF" == "0" ]; then
+if [ $T2_REF -eq 0 ]; then
T2_NO_REF=`echo $TEST_TYPE2 | cut -d '\' -f 1`
INIT_LOCS=", $T2_NO_REF V_2"
INIT_IL="ldloca.s 2\n\tstloc.1"
TEST_OP=$5
TEST_FIN=$6
-if [ "$TEST_FIN" == "" ]; then
+if [ "x$TEST_FIN" = "x" ]; then
TEST_FIN="finally";
fi
TEST_TYPE=$5
TEST_RET_TYPE=$6
-if [ "$TEST_RET_TYPE" == "" ]; then
+if [ "x$TEST_RET_TYPE" = "x" ]; then
TEST_RET_TYPE="void"
else
LD_RET_CODE="ldloc.0"
I=1
for OP in add div mul rem sub
do
- if [ "$OP" == "div" ] || [ "$OP" == "rem" ]; then
+ if [ "$OP" = "div" ] || [ "$OP" = "rem" ]; then
INIT="yes";
else
INIT="no";
I=1
for OP in div mul rem
do
- if [ "$OP" == "div" ] || [ "$OP" == "div" ]; then
+ if [ "$OP" = "div" ] || [ "$OP" = "div" ]; then
INIT="yes";
else
INIT="no";
I=1
for OP in div mul rem add
do
- if [ "$OP" == "div" ] || [ "$OP" == "div" ]; then
+ if [ "$OP" = "div" ] || [ "$OP" = "div" ]; then
INIT="yes";
else
INIT="no";
A=$1;
fi
- if [ "$A" == "bool&" ]; then
+ if [ "$A" = "bool&" ]; then
A="int8&";
- elif [ "$A" == "char&" ]; then
+ elif [ "$A" = "char&" ]; then
A="int16&";
fi
do
TA="$(fix $TYPE1)"
TB="$(fix $TYPE2)"
- if [ "$TA" == "$TB" ]; then
+ if [ "$TA" = "$TB" ]; then
./make_store_test.sh ref_coercion_${I} valid "$OP" "$TYPE1" "$TYPE2"
- elif [ "$TA" == "int32&" ] && [ "$TB" == "int&" ]; then
+ elif [ "$TA" = "int32&" ] && [ "$TB" = "int&" ]; then
./make_store_test.sh ref_coercion_${I} valid "$OP" "$TYPE1" "$TYPE2"
- elif [ "$TA" == "int&" ] && [ "$TB" == "int32&" ]; then
+ elif [ "$TA" = "int&" ] && [ "$TB" = "int32&" ]; then
./make_store_test.sh ref_coercion_${I} valid "$OP" "$TYPE1" "$TYPE2"
else
./make_store_test.sh ref_coercion_${I} unverifiable "$OP" "$TYPE1" "$TYPE2"
do
TA="$(fix $TYPE1)"
TB="$(fix $TYPE2)"
- if [ "$TA" == "$TB" ]; then
+ if [ "$TA" = "$TB" ]; then
./make_store_test.sh ref_coercion_${I} valid "$OP" "$TYPE1" "$TYPE2"
else
./make_store_test.sh ref_coercion_${I} unverifiable "$OP" "$TYPE1" "$TYPE2"
do
for TYPE2 in 'class ClassA&' 'class ClassB&' 'class InterfaceA&' 'class InterfaceB&' 'class ValueType&'
do
- if [ "$TYPE1" == "$TYPE2" ]; then
+ if [ "$TYPE1" = "$TYPE2" ]; then
./make_store_test.sh ref_coercion_${I} valid "$OP" "$TYPE1" "$TYPE2"
else
./make_store_test.sh ref_coercion_${I} unverifiable "$OP" "$TYPE1" "$TYPE2"
ZZ=`echo $TYPE2 | grep "*";`
T2_PTR=$?
- if (($T1_PTR == 0 || $T2_PTR == 0)); then
+ 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
+ elif [ "$TYPE1" = "$TYPE2" ]; then
./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
- elif [ "$TYPE1" == "int32" ] && [ "$TYPE2" == "native int" ]; then
+ elif [ "$TYPE1" = "int32" ] && [ "$TYPE2" = "native int" ]; then
./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
- elif [ "$TYPE1" == "native int" ] && [ "$TYPE2" == "int32" ]; then
+ elif [ "$TYPE1" = "native int" ] && [ "$TYPE2" = "int32" ]; then
./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
- elif [ "$TYPE1" == "int32&" ] && [ "$TYPE2" == "native int&" ]; then
+ elif [ "$TYPE1" = "int32&" ] && [ "$TYPE2" = "native int&" ]; then
./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
- elif [ "$TYPE1" == "native int&" ] && [ "$TYPE2" == "int32&" ]; then
+ elif [ "$TYPE1" = "native int&" ] && [ "$TYPE2" = "int32&" ]; then
./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
else
./make_stack_merge_test.sh stack_merge_${I} unverifiable "$TYPE1" "$TYPE2"
MAX_PARAM_RESULT="unverifiable"
POPS="pop\npop\npop\npop\npop\npop\npop\npop\n"
- if [ "$OP" == "ldloc" ]; then
+ if [ "$OP" = "ldloc" ]; then
MAX_PARAM_RESULT="invalid"
LOCALS_1=$ARGS_1
do
for LOAD in yes no
do
- if ! ( [ "$NESTED" == "no" ] && [ "$LOAD" == "yes" ] ) ; then
+ if ! ( [ "$NESTED" = "no" ] && [ "$LOAD" = "yes" ] ) ; then
./make_double_nesting_test.sh double_nesting_access_check_${K}_$I $2 "$OP" $3 $4 $5 "$BASE" "$NESTED" "$LOAD"
K=`expr $K + 1`
fi
do
for LOAD in yes no
do
- if ! ( [ "$NESTED" == "no" ] && [ "$LOAD" == "yes" ] ) ; then
+ if ! ( [ "$NESTED" = "no" ] && [ "$LOAD" = "yes" ] ) ; then
EXPECT=unverifiable
- if [ "$FIRST" == "$K" ]; then
+ if [ "$FIRST" = "$K" ]; then
EXPECT=valid
fi
./make_double_nesting_test.sh double_nesting_access_check_${K}_$I $EXPECT "$OP" $2 $3 $4 "$BASE" "$NESTED" "$LOAD"
for NESTED in yes no
do
EXPECT=unverifiable
- if [ "$NESTED" == "yes" ]; then
+ if [ "$NESTED" = "yes" ]; then
EXPECT=valid
fi
./make_double_nesting_test.sh double_nesting_access_check_${K}_$I $EXPECT "$OP" $2 $3 $4 "$BASE" "$NESTED" yes
A=$1;
fi
- if [ "$A" == "bool" ]; then
+ if [ "$A" = "bool" ]; then
A="int8";
- elif [ "$A" == "char" ]; then
+ elif [ "$A" = "char" ]; then
A="int16";
fi
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}"
for TYPE1 in "int8" "bool" "int16" "char" "int32" "int64" "float64" "native int" "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_r4_${I} unverifiable "stind.r4" "${TYPE1}\&" "float32"
- if [ "$TYPE1" == "float64" ]; then
+ if [ "$TYPE1" = "float64" ]; then
./make_store_indirect_test.sh indirect_store_good_val_r4_${I} valid "stind.r4" "float32\&" "${TYPE1}"
else
./make_store_indirect_test.sh indirect_store_bad_val_r4_${I} unverifiable "stind.r4" "float32\&" "${TYPE1}"
for TYPE1 in "int8" "bool" "int16" "char" "int32" "int64" "float32" "native int" "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_r8_${I} unverifiable "stind.r8" "${TYPE1}\&" "float64"
- if [ "$TYPE1" == "float32" ]; then
+ if [ "$TYPE1" = "float32" ]; then
./make_store_indirect_test.sh indirect_store_good_val_r8_${I} valid "stind.r8" "float64\&" "${TYPE1}";
else
./make_store_indirect_test.sh indirect_store_bad_val_r8_${I} unverifiable "stind.r8" "float64\&" "${TYPE1}";
# Exception block branch tests (see 2.19)
-for I in {1..2};
+I=1; while [ $I -le 2 ]
do
./make_rethrow_test.sh rethrow_from_catch_${I} invalid ${I}
+ I=$((I + 1))
done
-for I in {3..10};
+I=3; while [ $I -le 10 ]
do
./make_rethrow_test.sh rethrow_from_catch_${I} valid ${I}
+ I=$((I + 1))
done
# endfinally / endfault
-for I in {1..7};
+I=1; while [ $I -le 7 ]
do
./make_endfinally_test.sh endfinally_block_${I} invalid finally ${I}
./make_endfinally_test.sh endfault_block_${I} invalid fault ${I}
+ I=$((I + 1))
done
-for I in {8..9};
+I=8; while [ $I -le 9 ]
do
./make_endfinally_test.sh endfinally_block_${I} valid finally ${I}
./make_endfinally_test.sh endfault_block_${I} valid fault ${I}
+ I=$((I + 1))
done
#stack can have stuff and endfinally or endfault will just empty it
./make_endfilter_test.sh endfilter_inside_protected_block_3 invalid 3 "ldc.i4.1\n\t\tendfilter"
./make_endfilter_test.sh endfilter_inside_protected_block_5 strict 5 "ldc.i4.1\n\t\tendfilter"
-for I in {2,4,6};
+for I in 2 4 6;
do
./make_endfilter_test.sh endfilter_inside_protected_block_${I} unverifiable ${I} "ldc.i4.1\n\t\tendfilter"
done
./make_leave_test.sh "filter_block_test_1" valid "1" "leave END" "$EXTRA"
#but not ok to leave finally or filter
-for I in {2..3};
-do
+I=2; while [ $I -le 3 ]; do
./make_leave_test.sh "filter_block_test_${I}" unverifiable "${I}" "leave END" "${EXTRA}_${I}"
+ I=$((I + 1))
done
#neither is to branch to invalid regions of code
# br.X
#valid tests
-for I in {1..6}; do
+I=1; while [ $I -le 6 ]; do
./make_branch_test.sh branch_inside_same_block_${I} valid ${I} "br BLOCK_${I}";
./make_branch_test.sh branch_inside_same_block_${I}_s valid ${I} "br.s BLOCK_${I}";
+ I=$((I + 1))
done
#branching outside of the protected block
-for I in {2..6}; do
+I=2; while [ $I -le 6 ]; do
./make_branch_test.sh branch_outside_protected_block_${I} unverifiable ${I} "br END";
+ I=$((I + 1))
done
#branching to a protected block from the outside
-for I in {2..6}; do
- if [ "$I" == "4" ]; then
+I=2; while [ $I -le 6 ]; do
+ if [ $I -eq 4 ]; then
./make_branch_test.sh branch_inside_protected_block_from_outside_${I}_finally invalid 1 "br BLOCK_${I}" "finally";
./make_branch_test.sh branch_inside_protected_block_from_outside_${I}_fault invalid 1 "br BLOCK_${I}" "fault";
else
./make_branch_test.sh branch_inside_protected_block_from_outside_${I} unverifiable 1 "br BLOCK_${I}";
fi
+ I=$((I + 1))
done
#TODO test the encoding of the switch table
# switch
#valid tests
-for I in {1..6}; do
+I=1; while [ $I -le 6 ]; do
./make_switch_test.sh switch_inside_same_block_${I} valid ${I} "ldloc.0" "switch (BLOCK_${I}, BLOCK_${I}_B)";
+ I=$((I + 1))
done
./make_switch_test.sh switch_with_native_int_on_stack valid 1 "ldloc.1" "switch (BLOCK_1, BLOCK_1_B)";
#branching outside of the protected block
-for I in {2..6}; do
+I=2; while [ $I -le 6 ]; do
./make_switch_test.sh switch_outside_protected_block_${I} unverifiable ${I} "ldloc.0" "switch (END, BLOCK_1, BLOCK_1_B)";
+ I=$((I + 1))
done
#branching to a protected block from the outside
-for I in {2..6}; do
- if [ "$I" == "4" ]; then
+I=2; while [ $I -le 6 ]; do
+ if [ $I -eq 4 ]; then
./make_switch_test.sh switch_inside_protected_block_from_outside_${I}_finally invalid 1 "ldloc.0" "switch (BLOCK_${I}, BLOCK_${I}_B)" "finally";
./make_switch_test.sh switch_inside_protected_block_from_outside_${I}_fault invalid 1 "ldloc.0" "switch (BLOCK_${I}, BLOCK_${I}_B)" "fault";
else
./make_switch_test.sh switch_inside_protected_block_from_outside_${I} unverifiable 1 "ldloc.0" "switch (BLOCK_${I}, BLOCK_${I}_B)";
fi
+ I=$((I + 1))
done
#TODO branching out of range (FIX ilasm first)
./make_overlapped_test.sh ref_only_overlapping_5 invalid 0 0 8 int32
#invalid opcodes
-for I in {166..178}
+I=166; while [ $I -le 178 ]
do
./make_bad_op_test.sh bad_op_$I invalid $I
+ I=$((I + 1))
done
-for I in {187..193}
+I=187; while [ $I -le 193 ]
do
./make_bad_op_test.sh bad_op_$I invalid $I
+ I=$((I + 1))
done
-for I in {196..207}
+I=196; while [ $I -le 207 ]
do
./make_bad_op_test.sh bad_op_$I invalid $I
+ I=$((I + 1))
done
-for I in {225..253}
+I=225; while [ $I -le 253 ]
do
./make_bad_op_test.sh bad_op_$I invalid $I
+ I=$((I + 1))
done
./make_bad_op_test.sh bad_op_xff invalid 255
-for I in {35..255}
+I=35; while [ $I -le 255 ]
do
./make_bad_op_test.sh bad_op_with_prefix_$I invalid 0xFE $I
+ I=$((I + 1))
done
./make_generic_argument_constraints_test.sh type_mixed_3 valid "" "(IfaceA)"
./make_generic_argument_constraints_test.sh type_mixed_4 valid "" "class (IfaceA)"
-
-
#if defined(_POSIX_VERSION)
#include <sys/errno.h>
#include <sys/param.h>
+#include <errno.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#define UCONTEXT_REG_RSI(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_RSI])
#define UCONTEXT_REG_RDI(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_RDI])
#define UCONTEXT_REG_RIP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_RIP])
+ #define UCONTEXT_REG_R8(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R8])
+ #define UCONTEXT_REG_R9(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R9])
+ #define UCONTEXT_REG_R10(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R10])
+ #define UCONTEXT_REG_R11(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R11])
#define UCONTEXT_REG_R12(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R12])
#define UCONTEXT_REG_R13(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R13])
#define UCONTEXT_REG_R14(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R14])
#define UCONTEXT_REG_R11(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_fp)
#define UCONTEXT_REG_R12(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_ip)
#define UCONTEXT_REG_CPSR(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_cpsr)
+#elif defined(__NetBSD__)
+ typedef ucontext_t arm_ucontext;
+
+ #define UCONTEXT_REG_PC(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_PC])
+ #define UCONTEXT_REG_SP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_SP])
+ #define UCONTEXT_REG_LR(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_LR])
+ #define UCONTEXT_REG_R0(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R0])
+ #define UCONTEXT_REG_R1(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R1])
+ #define UCONTEXT_REG_R2(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R2])
+ #define UCONTEXT_REG_R3(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R3])
+ #define UCONTEXT_REG_R4(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R4])
+ #define UCONTEXT_REG_R5(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R5])
+ #define UCONTEXT_REG_R6(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R6])
+ #define UCONTEXT_REG_R7(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R7])
+ #define UCONTEXT_REG_R8(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R8])
+ #define UCONTEXT_REG_R9(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R9])
+ #define UCONTEXT_REG_R10(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R10])
+ #define UCONTEXT_REG_R11(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R11])
+ #define UCONTEXT_REG_R12(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R12])
+ #define UCONTEXT_REG_CPSR(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_CPSR])
+ #define UCONTEXT_REG_VFPREGS(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_VFPREGS])
#endif
#elif defined(TARGET_ARM64)
# only enable the mobile profiles and mobile_static on the main architectures
fi
+if [ -x "/usr/bin/dpkg-architecture" ];
+ then
+ EXTRA_CONF_FLAGS="$EXTRA_CONF_FLAGS --host=`/usr/bin/dpkg-architecture -qDEB_HOST_GNU_TYPE`"
+ #force build arch = dpkg arch, sometimes misdetected
+fi
+
${TESTCMD} --label=configure --timeout=60m --fatal ./autogen.sh $EXTRA_CONF_FLAGS
if [[ ${label} == w* ]];
then