summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2019-03-21 21:29:52 +0200
committerEli Zaretskii <eliz@gnu.org>2019-03-21 21:29:52 +0200
commit093d3e78d21d3d6c718997368ef4b31f9884401c (patch)
treec0abe35a3b3cfee61fe793feb7684a0cdf3bce00 /test
parentee7ad83f20903208404a84b58b7a478b62924570 (diff)
downloademacs-093d3e78d21d3d6c718997368ef4b31f9884401c.tar.gz
Revert "Revert "Rely on conservative stack scanning to find "emacs_value"s""
This reverts commit ee7ad83f20903208404a84b58b7a478b62924570. There was no consensus on reverting 3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a, so doing that will have to wait until the discussion ends.
Diffstat (limited to 'test')
-rw-r--r--test/data/emacs-module/mod-test.c6
-rw-r--r--test/src/emacs-module-tests.el3
2 files changed, 4 insertions, 5 deletions
diff --git a/test/data/emacs-module/mod-test.c b/test/data/emacs-module/mod-test.c
index a39e41afee6..47ea159d0e7 100644
--- a/test/data/emacs-module/mod-test.c
+++ b/test/data/emacs-module/mod-test.c
@@ -94,7 +94,7 @@ Fmod_test_signal (emacs_env *env, ptrdiff_t nargs, emacs_value args[],
assert (env->non_local_exit_check (env) == emacs_funcall_exit_return);
env->non_local_exit_signal (env, env->intern (env, "error"),
env->make_integer (env, 56));
- return NULL;
+ return env->intern (env, "nil");
}
@@ -106,7 +106,7 @@ Fmod_test_throw (emacs_env *env, ptrdiff_t nargs, emacs_value args[],
assert (env->non_local_exit_check (env) == emacs_funcall_exit_return);
env->non_local_exit_throw (env, env->intern (env, "tag"),
env->make_integer (env, 65));
- return NULL;
+ return env->intern (env, "nil");
}
@@ -304,7 +304,7 @@ Fmod_test_invalid_finalizer (emacs_env *env, ptrdiff_t nargs, emacs_value *args,
{
current_env = env;
env->make_user_ptr (env, invalid_finalizer, NULL);
- return env->intern (env, "nil");
+ return env->funcall (env, env->intern (env, "garbage-collect"), 0, NULL);
}
static void
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index 35aaaa64b65..e30980b5993 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -265,8 +265,7 @@ during garbage collection."
(skip-unless (file-executable-p mod-test-emacs))
(module--test-assertion
(rx "Module function called during garbage collection\n")
- (mod-test-invalid-finalizer)
- (garbage-collect)))
+ (mod-test-invalid-finalizer)))
(ert-deftest module/describe-function-1 ()
"Check that Bug#30163 is fixed."