forked from chapel-lang/chapel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memleaks testing warnings for with
--warn-unstable
(chapel-lang…
…#23320) [reviewed by @vasslitvinov] Because the `--memLeaks` flag is unstable, when we use it in our nightly memleaks job on tests that use the `--warn-unstable` flag, extra output is generated. Fix that <details> To fix that, add a prediff script that will be used for the single locale and multilocale memleaks jobs. This script will explicitly remove the memLeaks warning from from tests that encounter it. </details> There are two tests that intentionally throw both of these flags together normally. Unfortunately, that means that they would generate an extra error, which would cause them to fail. So, skip them when the flag is thrown generally (which is fine, because what it would otherwise be testing is already handled in the default nightly setting, as a result of those flags being always provided to those tests) - this involved splitting the memLeaks config test away from the other config tests. Passed full memleaks testing with futures (aside from some tests that don't run in nightly memleaks testing), when the environment variable that nightly will use is set.
- Loading branch information
Showing
8 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# because we already explicitly throw memleaks, we'll get duplicate warnings | ||
# due to the flag being unstable | ||
EXECOPTS <= memLeaks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
config var myUserConfig = 0; | ||
|
||
@unstable("Hey it's unstable!") | ||
config var myUnstableConfig = 0; | ||
|
||
|
||
config param myUserParam = 0; | ||
|
||
|
||
writeln(myUserConfig); | ||
writeln(myUnstableConfig); | ||
writeln(myUserParam); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--memTrack=true --memStats=true --memLeaksByType=true --memLeaks=true --memMax=0 --memThreshold=0 --memLog="log" --memLeaksLog="leaklog" --memLeaksByDesc=" " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# because we already explicitly throw memleaks, we'll get duplicate warnings | ||
# due to the flag being unstable | ||
EXECOPTS <= memLeaks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# want to eliminate the message | ||
# `<command-line arg>:n: warning: The variable 'memLeaks' is unstable and its interface is subject to change in the future` | ||
# from tests that don't normally provide it when in the general memleaks config | ||
|
||
import sys | ||
|
||
testname = sys.argv[1] | ||
outfile = sys.argv[2] | ||
|
||
memleaksWarn = "warning: The variable 'memLeaks' is unstable and its interface is subject to change in the future" | ||
|
||
with open(outfile, 'r', newline='') as outR: | ||
myLines = outR.readlines() | ||
|
||
with open(outfile, 'w', newline='') as overwrite: | ||
for line in myLines: | ||
if line.find(memleaksWarn) == -1: | ||
overwrite.write(line) |