Skip to content

Commit

Permalink
Fix a few testing errors with promotedSizeMismatch (#26622)
Browse files Browse the repository at this point in the history
[trivial, not reviewed]

First, I made the classic mistake of failing to think about --fast
testing, which turns off the bounds checking this test is looking for.
Here, I add --checks to its .compopts file to try and avoid this going
forward.

More subtly, it didn't occur to me that the test has a race since the
leader will fire off multiple follower tasks, giving the potential to
have the size mismatch in dimension 0 or 1 to appear first. Here, I
side-stepped that by only making a single dimension mismatch in size.
  • Loading branch information
bradcray authored Jan 30, 2025
2 parents b789f5b + a7630ac commit 0ad286b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/arrays/errors/promotedSizeMismatch.chpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var A : [1..5, 1..5] int = 0;
var B : [1..3, 1..3] int = 1;
var B : [1..5, 1..3] int = 1;

A += B;

Expand Down
1 change: 1 addition & 0 deletions test/arrays/errors/promotedSizeMismatch.compopts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--checks

0 comments on commit 0ad286b

Please sign in to comment.