Skip to content

Commit

Permalink
Fix incorrect unlock in witness/tm-inv-transfer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Oct 2, 2023
1 parent 15e6c3d commit 7857a68
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions tests/regression/56-witness/60-tm-inv-transfer-protection.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ int main(void) {
__goblint_check(g >= 40);
__goblint_check(g <= 41); // UNKNOWN (lacks expressivity)
pthread_mutex_unlock(&C);
pthread_mutex_unlock(&C);
pthread_mutex_unlock(&B);

pthread_mutex_lock(&C);
__goblint_check(g >= 40);
__goblint_check(g <= 42); // UNKNOWN (widen)
pthread_mutex_unlock(&C);

return 0;
}
8 changes: 4 additions & 4 deletions tests/regression/56-witness/61-tm-inv-transfer-mine.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ int main(void) {
__goblint_check(g >= 40);
__goblint_check(g <= 41);
pthread_mutex_unlock(&C);
pthread_mutex_unlock(&C);
pthread_mutex_unlock(&B);

pthread_mutex_lock(&C);
__goblint_check(g >= 40);
__goblint_check(g >= 40); // TODO why?
__goblint_check(g <= 42);
pthread_mutex_unlock(&C);

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ int main(void) {
__goblint_check(g >= 40);
__goblint_check(g <= 41); // UNKNOWN (lacks expressivity)
pthread_mutex_unlock(&C);
pthread_mutex_unlock(&C);
pthread_mutex_unlock(&B);

pthread_mutex_lock(&C);
__goblint_check(g >= 40);
__goblint_check(g <= 42);
pthread_mutex_unlock(&C);

return 0;
}

0 comments on commit 7857a68

Please sign in to comment.