libXmu: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 16 19:01:19 UTC 2024


 test/StrToShap.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 9329cf7611284fe7e68a67aef852c76ad30e9ebd
Author: Matt Turner <mattst88 at gmail.com>
Date:   Tue Apr 16 13:40:40 2024 -0400

    test: Add missing setjmp()
    
    Bug: https://bugs.gentoo.org/928419
    Closes: https://gitlab.freedesktop.org/xorg/lib/libxmu/-/issues/2
    Fixes: d729c59 ("test: Add simple test cases for functions in src/StrToShap.c")
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxmu/-/merge_requests/12>

diff --git a/test/StrToShap.c b/test/StrToShap.c
index c73d5eb..eae556a 100644
--- a/test/StrToShap.c
+++ b/test/StrToShap.c
@@ -172,8 +172,12 @@ test_XmuCvtShapeStyleToString(void)
     value = 1984;
     from.addr = (XPointer) &value;
     g_test_message("ShapeStyleToString(%d)", value);
-    ret = XmuCvtShapeStyleToString(NULL, NULL, &nargs, &from, &to, NULL);
-    g_assert_cmpint(ret, ==, False);
+    if (setjmp(jmp_env) == 0) {
+        ret = XmuCvtShapeStyleToString(NULL, NULL, &nargs, &from, &to, NULL);
+        g_assert_cmpint(ret, ==, False);
+    } else {
+        /* We jumped here from error handler as expected. */
+    }
     g_assert_cmpint(warning_count, >, 0);
     g_test_message("test_XmuCvtShapeStyleToString completed");
 }


More information about the xorg-commit mailing list