projects
/
model-checker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15762db
)
test: rmwprog: add MODEL_ASSERT
author
Brian Norris
<banorris@uci.edu>
Fri, 15 Mar 2013 19:03:14 +0000
(12:03 -0700)
committer
Brian Norris
<banorris@uci.edu>
Fri, 15 Mar 2013 19:03:14 +0000
(12:03 -0700)
Might as well improve this 'litmus' test.
test/rmwprog.c
patch
|
blob
|
history
diff --git
a/test/rmwprog.c
b/test/rmwprog.c
index 57ab54462bab9b03b48a87cf86578d06c8c5e070..ebace1ec262966d5d367afefd5dbaaddef168a26 100644
(file)
--- a/
test/rmwprog.c
+++ b/
test/rmwprog.c
@@
-4,6
+4,7
@@
#include <stdatomic.h>
#include "librace.h"
+#include "model-assert.h"
atomic_int x;
static int N = 2;
@@
-29,5
+30,7
@@
int user_main(int argc, char **argv)
thrd_join(t1);
thrd_join(t2);
+ MODEL_ASSERT(atomic_load(&x) == N * 2);
+
return 0;
}