bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new module 'jit/cache'


From: Marc Nieper-Wißkirchen
Subject: Re: new module 'jit/cache'
Date: Sat, 25 Nov 2023 18:22:54 +0100

Hello Bruno,

Here is my attempt at a simple unit test for your new cache module.

I have tested it on an x86 box (where the instruction cache is always in sync) and on an Armv8 Raspberry, both running GNU/Linux.  Commenting out the call to `clear_cache' shows that `clear_cache' is not a NOP on Arm and that the test is actually doing a non-trivial test.

Best,

Marc

Am Mo., 13. Nov. 2023 um 14:33 Uhr schrieb Bruno Haible <bruno@clisp.org>:
>       * m4/valgrind-helper.m4: New file.

Oops, that file was incomplete. Fixed like this:


2023-11-13  Bruno Haible  <bruno@clisp.org>

        jit/cache: Fix configure test.
        * m4/valgrind-helper.m4 (gl_VALGRIND_HELPER): Check already at configure
        time whether <valgrind/valgrind.h> exists. Fix AC_DEFINE_UNQUOTED
        invocation.

diff --git a/m4/valgrind-helper.m4 b/m4/valgrind-helper.m4
index b3d70a7ad9..99c31030b9 100644
--- a/m4/valgrind-helper.m4
+++ b/m4/valgrind-helper.m4
@@ -1,4 +1,4 @@
-# valgrind-helper.m4 serial 1
+# valgrind-helper.m4 serial 2
 dnl Copyright (C) 2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,5 +18,13 @@ AC_DEFUN_ONCE([gl_VALGRIND_HELPER]
        support_valgrind=0
      fi
     ])
-  AC_DEFINE_UNQUOTED([ENABLE_VALGRIND_SUPPORT], [$support_valgrind])
+  if test $support_valgrind = 1; then
+    AC_CHECK_HEADERS([valgrind/valgrind.h])
+    if test $ac_cv_header_valgrind_valgrind_h != yes; then
+      AC_MSG_ERROR([cannot enable valgrind support: <valgrind/valgrind.h> not found])
+    fi
+  fi
+  AC_DEFINE_UNQUOTED([ENABLE_VALGRIND_SUPPORT], [$support_valgrind],
+    [Define to 1 to include support for running the binaries under valgrind,
+     or to 0 otherwise.])
 ])



Attachment: 0001-jit-cache-tests-New-module.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]