diff --git a/tests/general/abort.c.stderr.expected b/tests/general/abort.c.stderr.expected index c6ecf6a..d533e58 100644 --- a/tests/general/abort.c.stderr.expected +++ b/tests/general/abort.c.stderr.expected @@ -1,6 +1,7 @@ Error: failed to run main module `abort.c.---.wasm` Caused by: - 0: failed to invoke command default + 0: failed to invoke --- 1: error while executing at wasm backtrace: + note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information 2: wasm trap: wasm `unreachable` instruction executed diff --git a/tests/general/abort.c.stderr.expected.filter b/tests/general/abort.c.stderr.expected.filter index 742503a..ecd16c0 100755 --- a/tests/general/abort.c.stderr.expected.filter +++ b/tests/general/abort.c.stderr.expected.filter @@ -3,4 +3,5 @@ set -euo pipefail cat \ | sed -e 's/main module `abort\.c\.[^`]*\.wasm`/main module `abort.c.---.wasm`/' \ + | sed -e 's/failed to invoke.*/failed to invoke ---/' \ | sed -E '/0x[[:xdigit:]]+/d' diff --git a/tests/general/abort.c.wasm32-wasi-preview2.stderr.expected b/tests/general/abort.c.wasm32-wasi-preview2.stderr.expected deleted file mode 100644 index 26fe376..0000000 --- a/tests/general/abort.c.wasm32-wasi-preview2.stderr.expected +++ /dev/null @@ -1,6 +0,0 @@ -Error: failed to run main module `abort.c.---.wasm` - -Caused by: - 0: failed to invoke `run` function - 1: error while executing at wasm backtrace: - 2: wasm trap: wasm `unreachable` instruction executed diff --git a/tests/general/abort.c.wasm32-wasi.stderr.expected b/tests/general/abort.c.wasm32-wasi.stderr.expected deleted file mode 100644 index c6ecf6a..0000000 --- a/tests/general/abort.c.wasm32-wasi.stderr.expected +++ /dev/null @@ -1,6 +0,0 @@ -Error: failed to run main module `abort.c.---.wasm` - -Caused by: - 0: failed to invoke command default - 1: error while executing at wasm backtrace: - 2: wasm trap: wasm `unreachable` instruction executed diff --git a/tests/general/abort.c.wasm32-wasip2.stderr.expected b/tests/general/abort.c.wasm32-wasip2.stderr.expected deleted file mode 100644 index 26fe376..0000000 --- a/tests/general/abort.c.wasm32-wasip2.stderr.expected +++ /dev/null @@ -1,6 +0,0 @@ -Error: failed to run main module `abort.c.---.wasm` - -Caused by: - 0: failed to invoke `run` function - 1: error while executing at wasm backtrace: - 2: wasm trap: wasm `unreachable` instruction executed diff --git a/tests/general/assert-fail.c.stderr.expected b/tests/general/assert-fail.c.stderr.expected index c179f09..9e0f44c 100644 --- a/tests/general/assert-fail.c.stderr.expected +++ b/tests/general/assert-fail.c.stderr.expected @@ -2,6 +2,7 @@ Assertion failed: false (assert-fail.c: main: 5) Error: failed to run main module `assert-fail.c.---.wasm` Caused by: - 0: failed to invoke command default + 0: failed to invoke --- 1: error while executing at wasm backtrace: + note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information 2: wasm trap: wasm `unreachable` instruction executed diff --git a/tests/general/assert-fail.c.stderr.expected.filter b/tests/general/assert-fail.c.stderr.expected.filter index d2213dd..a1d649d 100755 --- a/tests/general/assert-fail.c.stderr.expected.filter +++ b/tests/general/assert-fail.c.stderr.expected.filter @@ -3,4 +3,5 @@ set -euo pipefail cat \ | sed -e 's/main module `assert-fail\.c\.[^`]*\.wasm`/main module `assert-fail.c.---.wasm`/' \ + | sed -e 's/failed to invoke.*/failed to invoke ---/' \ | sed -E '/0x[[:xdigit:]]+/d' diff --git a/tests/general/assert-fail.c.wasm32-wasi-preview2.stderr.expected b/tests/general/assert-fail.c.wasm32-wasi-preview2.stderr.expected deleted file mode 100644 index 3702431..0000000 --- a/tests/general/assert-fail.c.wasm32-wasi-preview2.stderr.expected +++ /dev/null @@ -1,7 +0,0 @@ -Assertion failed: false (assert-fail.c: main: 5) -Error: failed to run main module `assert-fail.c.---.wasm` - -Caused by: - 0: failed to invoke `run` function - 1: error while executing at wasm backtrace: - 2: wasm trap: wasm `unreachable` instruction executed diff --git a/tests/general/assert-fail.c.wasm32-wasip2.stderr.expected b/tests/general/assert-fail.c.wasm32-wasip2.stderr.expected deleted file mode 100644 index 3702431..0000000 --- a/tests/general/assert-fail.c.wasm32-wasip2.stderr.expected +++ /dev/null @@ -1,7 +0,0 @@ -Assertion failed: false (assert-fail.c: main: 5) -Error: failed to run main module `assert-fail.c.---.wasm` - -Caused by: - 0: failed to invoke `run` function - 1: error while executing at wasm backtrace: - 2: wasm trap: wasm `unreachable` instruction executed diff --git a/tests/general/stat.c b/tests/general/stat.c index dc007c1..393921f 100644 --- a/tests/general/stat.c +++ b/tests/general/stat.c @@ -43,10 +43,20 @@ int main(int argc, char *argv[]) { assert(file_statbuf.st_dev == link_statbuf.st_dev); - // Clear out the access time fields, and they should be the same. - memset(&file_statbuf.st_atim, 0, sizeof(struct timespec)); - memset(&link_statbuf.st_atim, 0, sizeof(struct timespec)); - assert(memcmp(&file_statbuf, &link_statbuf, sizeof(struct stat)) == 0); + assert(file_statbuf.st_dev == link_statbuf.st_dev); + assert(file_statbuf.st_ino == link_statbuf.st_ino); + assert(file_statbuf.st_mode == link_statbuf.st_mode); + assert(file_statbuf.st_uid == link_statbuf.st_uid); + assert(file_statbuf.st_gid == link_statbuf.st_gid); + assert(file_statbuf.st_rdev == link_statbuf.st_rdev); + assert(file_statbuf.st_size == link_statbuf.st_size); + assert(file_statbuf.st_blksize == link_statbuf.st_blksize); + assert(file_statbuf.st_blocks == link_statbuf.st_blocks); + // NB: `atim` is explicitly not compared here + assert(file_statbuf.st_mtim.tv_sec == link_statbuf.st_mtim.tv_sec); + assert(file_statbuf.st_mtim.tv_nsec == link_statbuf.st_mtim.tv_nsec); + assert(file_statbuf.st_ctim.tv_sec == link_statbuf.st_ctim.tv_sec); + assert(file_statbuf.st_ctim.tv_nsec == link_statbuf.st_ctim.tv_nsec); // Test lstat.