Skip to content

Commit

Permalink
Fix some lock-unlock copy-paste mistakes in regression tests
Browse files Browse the repository at this point in the history
We should analyze this...
  • Loading branch information
sim642 committed Oct 16, 2020
1 parent eb30110 commit e141caf
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/regression/05-lval_ls/03-fld_rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ int main() {
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&m.y);
glob++; // RACE!
pthread_mutex_lock(&m.y);
pthread_mutex_unlock(&m.y);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/regression/05-lval_ls/04-fld_nr.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ int main() {
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&m.x);
glob++; // NORACE
pthread_mutex_lock(&m.x);
pthread_mutex_unlock(&m.x);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/regression/06-symbeq/04-funloop_hard1.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ int main () {

pthread_mutex_lock(&cache[4].refs_mutex);
cache[5].refs++; // RACE!
pthread_mutex_lock(&cache[4].refs_mutex);
pthread_mutex_unlock(&cache[4].refs_mutex);
return 0;
}
2 changes: 1 addition & 1 deletion tests/regression/06-symbeq/05-funloop_hard2.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ int main () {

pthread_mutex_lock(&cache[5].refs_mutex);
cache[5].refs++; // NORACE
pthread_mutex_lock(&cache[5].refs_mutex);
pthread_mutex_unlock(&cache[5].refs_mutex);
return 0;
}
2 changes: 1 addition & 1 deletion tests/regression/06-symbeq/10-equ_rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct s {
void *t_fun(void *arg) {
pthread_mutex_lock(&A.mutex);
B.datum = 5; // RACE!
pthread_mutex_lock(&A.mutex);
pthread_mutex_unlock(&A.mutex);
return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/regression/06-symbeq/11-equ_nr.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct s {
void *t_fun(void *arg) {
pthread_mutex_lock(&A.mutex);
A.datum = 5; // NORACE
pthread_mutex_lock(&A.mutex);
pthread_mutex_unlock(&A.mutex);
return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/regression/06-symbeq/12-equ_proc_rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct s {
void *t_fun(void *arg) {
pthread_mutex_lock(&B.mutex);
A.datum = 5; // RACE!
pthread_mutex_lock(&B.mutex);
pthread_mutex_unlock(&B.mutex);
return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/regression/06-symbeq/13-equ_proc_nr.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct s {
void *t_fun(void *arg) {
pthread_mutex_lock(&A.mutex);
A.datum = 5; // NORACE
pthread_mutex_lock(&A.mutex);
pthread_mutex_unlock(&A.mutex);
return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/regression/06-symbeq/14-list_entry_rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void update (int *p) {
pthread_mutex_lock(&s->mutex);
s++;
s->datum++; // RACE!
pthread_mutex_lock(&s->mutex);
pthread_mutex_unlock(&s->mutex);
}

void *t_fun(void *arg) {
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/06-symbeq/15-list_entry_nr.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void update (int *p) {
struct s *s = list_entry(p, struct s, list);
pthread_mutex_lock(&s->mutex);
s->datum++; // NORACE
pthread_mutex_lock(&s->mutex);
pthread_mutex_unlock(&s->mutex);
}

void *t_fun(void *arg) {
Expand Down

0 comments on commit e141caf

Please sign in to comment.