From c7ab6d1a231f18c7d35f9bc499bd72b8809bd7a2 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 25 Aug 2015 15:28:20 -0700 Subject: [PATCH] Create an initial testing TODO list. --- ml-proto/TestingTodo.md | 101 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 ml-proto/TestingTodo.md diff --git a/ml-proto/TestingTodo.md b/ml-proto/TestingTodo.md new file mode 100644 index 0000000000..9574ca8d08 --- /dev/null +++ b/ml-proto/TestingTodo.md @@ -0,0 +1,101 @@ +This is a rough list of "tests to write". Everything here should either be +specified in +[AstSemantics.md](https://github.com/WebAssembly/design/blob/master/AstSemantics.md), +have a link to an open issue/PR, or be obvious. Comments/corrections/additions +welcome. + +Misc semantics: + - test that linear memory is little-endian for all integers and floats + - test that unaligned and misaligned accesses work, even if slow + - test that runaway recursion traps + - test that too-big linear memory resize fails appropriately + - test that too-big linear memory initial allocation fails + - test that function addresses are monotonic indices, and not actual addresses. + - test that one can clobber the entire contents of the linear memory without corrupting: call stack, global variables, local variables, program execution. + +Operator semantics: + - test that promote/demote, sext/trunc, zext/trunc is bit-preserving if not NaN + - test that clz/ctz handle zero + - test that numbers slightly outside of the int32 range round into the int32 range in floating-to-int32 conversion + - test that neg, abs, copysign, reinterpretcast, store+load, set+get, preserve the sign bit and significand bits of NaN and don't canonicalize + - test that shifts don't mask their shift count. 32 is particularly nice to test. + - test that `page_size` returns something sane [(power of 2?)](https://github.com/WebAssembly/design/pull/296) + - test that arithmetic operands are evaluated left-to-right + - test that add/sub/mul/wrap/wrapping-store silently wrap on overflow + - test that sdiv/udiv/srem/urem trap on divide-by-zero + - test that sdiv traps on overflow + - test that srem doesn't trap when the corresponding sdiv would overflow + - test that float-to-integer conversion traps on overflow and invalid + - test that unsigned operations are properly unsigned + +Floating point semantics: + - test for round-to-nearest rounding + - test for ties-to-even rounding + - test that all operations with floating point inputs correctly handle all their NaN, -0, 0, Infinity, and -Infinity special cases + - test that all operations that can overflow produce Infinity and with the correct sign + - test that all operations that can divide by zero produce Infinity with the correct sign + - test that all operations that can have an invalid produce NaN + - test that all operations that can have underflow behave [correctly](https://github.com/WebAssembly/design/issues/148) + - test that nearestint doesn't do JS-style Math.round or C-style round(3) rounding + - test that signalling NaN doesn't cause weirdness + - test that signalling/quiet NaNs can have sign bits and payloads in literals + - test that conversion from int32/int64 to float32 rounds correctly + +Linear memory semantics: + - test that loading from null works + - test that loading from constant OOB traps and is not DCE'd or folded (pending [discussion](https://github.com/WebAssembly/design/blob/master/AstSemantics.md#out-of-bounds)) + - test that loading from "beyond the STACKPTR" succeeds + - test that "stackptr + (linearmemptr - stackptr)" loads from linearmemptr. + - test loading "uninitialized" things from aliased stack frames return what's there + - test that loadwithoffset traps in overflow cases + - test that newly allocated memory is zeroed + +Function pointer semantics: + - test that function pointers work [correctly](https://github.com/WebAssembly/design/issues/89) + +Expression optimizer bait: + - test that `a+1