From ae28dc3ca64eb09d0ed792f0145576c17920ede5 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 8 Dec 2023 23:16:17 -0800 Subject: test(tvix/eval): test for b/338 catchable hygiene problem Commit 05f42519b53575ad3235b5e0a0cd7d71f04076a5 fixed b/281 by establishing a hygiene regimen to partition *catchable* errors (i.e. those which tryEval can detect) from all other errors, like internal VM failures or I/O errors (which Nix must not be allowed to detect, since these errors are fundamentally impure). Unfotunately there are still cases where tvix assumes that anything other than Value::Bool means it should panic!(). I found another one, and added a test case for it in: eval_okay_src_tests_tvix_tests_eval_okay_compare_ordering_catchable_nix Not yet passing. Change-Id: I69c62ed9ea5c8f81870e8de5c5fe12dcde849763 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10220 Autosubmit: Adam Joseph Reviewed-by: tazjin Tested-by: BuildkiteCI --- .../tvix_tests/notyetpassing/eval-okay-compare-ordering-catchable.exp | 1 + .../tvix_tests/notyetpassing/eval-okay-compare-ordering-catchable.nix | 1 + 2 files changed, 2 insertions(+) create mode 100644 tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-compare-ordering-catchable.exp create mode 100644 tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-compare-ordering-catchable.nix (limited to 'tvix') diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-compare-ordering-catchable.exp b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-compare-ordering-catchable.exp new file mode 100644 index 000000000000..c508d5366f70 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-compare-ordering-catchable.exp @@ -0,0 +1 @@ +false diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-compare-ordering-catchable.nix b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-compare-ordering-catchable.nix new file mode 100644 index 000000000000..9000160e57fe --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-compare-ordering-catchable.nix @@ -0,0 +1 @@ +(builtins.tryEval ((throw "x") < 3)).success -- cgit 1.4.1