|
From: | Marc Nieper-Wißkirchen |
Subject: | Re: new module 'vma-prot' |
Date: | Mon, 2 Sep 2024 14:05:34 +0200 |
I did:
> vma-prot: Add tests.
> * tests/test-vma-prot.c: New file.
> * modules/vma-prot-tests: New file.
Oops, I forgot some parentheses. (I will never understand why the '&' and '|'
operators, which are most meaningful on unsigned integer values, not on
boolean values, have lower precedence than '=='. Maybe I should ask Dennis
Ritchie's former Bitwise Operations Manager...)
2024-09-02 Bruno Haible <bruno@clisp.org>
vma-prot tests: Strengthen test.
Found by Coverity.
* tests/test-vma-prot.c (main): Fix typo.
diff --git a/tests/test-vma-prot.c b/tests/test-vma-prot.c
index 24b5b1873a..dc100d3af3 100644
--- a/tests/test-vma-prot.c
+++ b/tests/test-vma-prot.c
@@ -65,7 +65,7 @@ main (void)
{
prot = get_vma_prot (mem, 1024*1024);
ASSERT (prot != -1);
- ASSERT (prot == VMA_PROT_READ | VMA_PROT_WRITE);
+ ASSERT (prot == (VMA_PROT_READ | VMA_PROT_WRITE));
size_t pagesize = sysconf (_SC_PAGESIZE);
if (pagesize <= 512*1024
[Prev in Thread] | Current Thread | [Next in Thread] |