From c1fff7163a4be4bae7e72406b39e6c3185866377 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Sun, 11 Apr 2021 15:21:10 +0530 Subject: [PATCH 01/11] long file name support add check to parse cmd files function Signed-off-by: Lakshya Singh --- compiler/parser/parser.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compiler/parser/parser.cpp b/compiler/parser/parser.cpp index f4ecb7aeb079..d85e2fa0c553 100644 --- a/compiler/parser/parser.cpp +++ b/compiler/parser/parser.cpp @@ -330,6 +330,14 @@ static void parseCommandLineFiles() { while ((inputFileName = nthFilename(fileNum++))) { if (isChplSource(inputFileName)) { parseFile(inputFileName, MOD_USER, true, false); + /* + Ensure that all the files parsed don't exceed the + NAME_MAX/2 125 bytes Limits + */ + if (strlen(inputFileName) > NAME_MAX / 2 - 16) + { + USR_FATAL("File name too long"); + } } } From b64a14d527eea04b79de9aa76c8161b15a346551 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Sun, 25 Apr 2021 18:11:50 +0530 Subject: [PATCH 02/11] refactor : throw error before parsing file reorder check so no need to parse on much longer files Signed-off-by: Lakshya Singh --- compiler/parser/parser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/parser/parser.cpp b/compiler/parser/parser.cpp index d85e2fa0c553..bcc8dbca05c0 100644 --- a/compiler/parser/parser.cpp +++ b/compiler/parser/parser.cpp @@ -328,8 +328,8 @@ static void parseCommandLineFiles() { } while ((inputFileName = nthFilename(fileNum++))) { - if (isChplSource(inputFileName)) { - parseFile(inputFileName, MOD_USER, true, false); + if (isChplSource(inputFileName)) + { /* Ensure that all the files parsed don't exceed the NAME_MAX/2 125 bytes Limits @@ -338,6 +338,7 @@ static void parseCommandLineFiles() { { USR_FATAL("File name too long"); } + parseFile(inputFileName, MOD_USER, true, false); } } From 248a022a176b1585be3520561b7a8973861639c3 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Sun, 25 Apr 2021 18:12:42 +0530 Subject: [PATCH 03/11] feat : handle error with scalable code shorten file length to fit error dynamically generate error with filename use snprintf to ensure control on buffers Signed-off-by: Lakshya Singh --- compiler/parser/parser.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/compiler/parser/parser.cpp b/compiler/parser/parser.cpp index bcc8dbca05c0..4e6c4c59acea 100644 --- a/compiler/parser/parser.cpp +++ b/compiler/parser/parser.cpp @@ -332,11 +332,23 @@ static void parseCommandLineFiles() { { /* Ensure that all the files parsed don't exceed the - NAME_MAX/2 125 bytes Limits + (NAME_MAX - 16) i.e. 239 bytes Limits */ - if (strlen(inputFileName) > NAME_MAX / 2 - 16) + const size_t maxFileName = NAME_MAX - 16; + if (strlen(inputFileName) > maxFileName) { - USR_FATAL("File name too long"); + char reducedFileName[maxFileName]; + // sprintf fileName to allowed length buffer + snprintf(reducedFileName, maxFileName, "%s", inputFileName); + // error message format with fileName and allowed length + const char *errorFormat = "%s, filename is longer than maximum allowed length of %d"; + // allow max length in error with error + const size_t errorLength = maxFileName + strlen(errorFormat) - 4 + 3; + // buffer to store errorMessage + char errorMessage[errorLength]; + snprintf(errorMessage, errorLength, errorFormat, reducedFileName, maxFileName); + // throw error + USR_FATAL(errorMessage); } parseFile(inputFileName, MOD_USER, true, false); } From ffbfaa7e345abb023582dc7823f520e4adde3d93 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Sun, 25 Apr 2021 22:43:10 +0530 Subject: [PATCH 04/11] fix : change to strncpy instead of snprintf Signed-off-by: Lakshya Singh --- compiler/parser/parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/parser/parser.cpp b/compiler/parser/parser.cpp index 4e6c4c59acea..59003b7d1e1d 100644 --- a/compiler/parser/parser.cpp +++ b/compiler/parser/parser.cpp @@ -339,7 +339,7 @@ static void parseCommandLineFiles() { { char reducedFileName[maxFileName]; // sprintf fileName to allowed length buffer - snprintf(reducedFileName, maxFileName, "%s", inputFileName); + strncpy(reducedFileName, inputFileName, maxFileName); // error message format with fileName and allowed length const char *errorFormat = "%s, filename is longer than maximum allowed length of %d"; // allow max length in error with error From 82c74747cc7589147e1b73569089187c0f47b8c1 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Tue, 27 Apr 2021 14:11:41 +0530 Subject: [PATCH 05/11] fix : simple use of USR_FATAL instead of sprintf no need to use formatting instead we can leave interleaving strings to USR_FATAL only by passing multiple arguments Signed-off-by: Lakshya Singh --- compiler/parser/parser.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/compiler/parser/parser.cpp b/compiler/parser/parser.cpp index 59003b7d1e1d..3d9665b42fb4 100644 --- a/compiler/parser/parser.cpp +++ b/compiler/parser/parser.cpp @@ -340,15 +340,10 @@ static void parseCommandLineFiles() { char reducedFileName[maxFileName]; // sprintf fileName to allowed length buffer strncpy(reducedFileName, inputFileName, maxFileName); - // error message format with fileName and allowed length - const char *errorFormat = "%s, filename is longer than maximum allowed length of %d"; - // allow max length in error with error - const size_t errorLength = maxFileName + strlen(errorFormat) - 4 + 3; - // buffer to store errorMessage - char errorMessage[errorLength]; - snprintf(errorMessage, errorLength, errorFormat, reducedFileName, maxFileName); - // throw error - USR_FATAL(errorMessage); + // error message to print between filename and filename limit + const char *errorMessage = "%s, filename is longer than maximum allowed length of %d\n"; + // throwr error will concatenated messages + USR_FATAL(errorMessage, reducedFileName, maxFileName); } parseFile(inputFileName, MOD_USER, true, false); } From 9c8d2313288a14cd2f15dd31200bfb8e452b1216 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Wed, 28 Apr 2021 00:28:47 +0530 Subject: [PATCH 06/11] test: add test for checking error on long names will change the message currently diff is not working although similar messages are thrown Signed-off-by: Lakshya Singh --- .gitignore | 3 +++ test/parsing/king-11/longName.chpl | 3 +++ test/parsing/king-11/longName.compopts | 1 + test/parsing/king-11/longName.noexec | 0 test/parsing/king-11/longName.precomp | 19 +++++++++++++++++++ test/parsing/king-11/shortName.chpl | 1 + test/parsing/king-11/shortName.good | 1 + 7 files changed, 28 insertions(+) create mode 100644 test/parsing/king-11/longName.chpl create mode 100644 test/parsing/king-11/longName.compopts create mode 100644 test/parsing/king-11/longName.noexec create mode 100755 test/parsing/king-11/longName.precomp create mode 100644 test/parsing/king-11/shortName.chpl create mode 100644 test/parsing/king-11/shortName.good diff --git a/.gitignore b/.gitignore index c4d02cd5d4b5..2fcbab844dc2 100644 --- a/.gitignore +++ b/.gitignore @@ -274,6 +274,9 @@ tags /test/parallel/taskPar/taskIntents/src/*.d /test/parallel/taskPar/taskIntents/src/*.o +/test/parsing/king-11/aaa*.chpl +/test/parsing/king-11/longName.good + /test/performance/compiler/elliot/passCheck.good /test/performance/vectorization/vectorPragmas/*.good diff --git a/test/parsing/king-11/longName.chpl b/test/parsing/king-11/longName.chpl new file mode 100644 index 000000000000..9c1b968745ce --- /dev/null +++ b/test/parsing/king-11/longName.chpl @@ -0,0 +1,3 @@ +use LongName; + +printSomething(); diff --git a/test/parsing/king-11/longName.compopts b/test/parsing/king-11/longName.compopts new file mode 100644 index 000000000000..1db11892f2dc --- /dev/null +++ b/test/parsing/king-11/longName.compopts @@ -0,0 +1 @@ +aaaaa*.chpl diff --git a/test/parsing/king-11/longName.noexec b/test/parsing/king-11/longName.noexec new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test/parsing/king-11/longName.precomp b/test/parsing/king-11/longName.precomp new file mode 100755 index 000000000000..ff449e607930 --- /dev/null +++ b/test/parsing/king-11/longName.precomp @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +NAME_MAX=`getconf NAME_MAX /` +NAME_MAX=$((NAME_MAX - 15)) +LIMIT=$((NAME_MAX - 1)) +VAL=`realpath "$0" | sed 's|\(.*\)/.*|\1|'` + +repeatChar() { + local input="$1" + local count="$2" + printf -v myString "%*s" "$count" + printf '%s\n' "${myString// /$input}" +} + +FILENAME=$(repeatChar a $NAME_MAX).chpl +printf 'module LongName {\n\tfunc printSomething() {\n\t\twrite(%s); \n\t}\n}' "'Won't Compile'" > $VAL/$FILENAME +FILENAME=$(repeatChar a $LIMIT) +BOLD_ERROR=`echo -e '\033[1merror:\033[0m'` +printf "%s %s, filename is longer than maximum allowed length of %s\n" $BOLD_ERROR $FILENAME $LIMIT > $VAL/longName.good diff --git a/test/parsing/king-11/shortName.chpl b/test/parsing/king-11/shortName.chpl new file mode 100644 index 000000000000..2ba0ea49daa7 --- /dev/null +++ b/test/parsing/king-11/shortName.chpl @@ -0,0 +1 @@ +writeln("A short File Name"); diff --git a/test/parsing/king-11/shortName.good b/test/parsing/king-11/shortName.good new file mode 100644 index 000000000000..4dc88bcf992f --- /dev/null +++ b/test/parsing/king-11/shortName.good @@ -0,0 +1 @@ +A short File Name From 86776bfe5f500892d5c9d6e16f9d2049b8a10818 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Wed, 28 Apr 2021 11:21:34 +0530 Subject: [PATCH 07/11] fix: dont use realpath as in default path use dirname instead of realpath which isn't in default bin of bash cleanfiles before run and add them to gitignore Signed-off-by: Lakshya Singh --- .gitignore | 2 +- test/parsing/king-11/longName.cleanfiles | 3 +++ test/parsing/king-11/longName.precomp | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 test/parsing/king-11/longName.cleanfiles diff --git a/.gitignore b/.gitignore index 2fcbab844dc2..18ee8c3163aa 100644 --- a/.gitignore +++ b/.gitignore @@ -274,7 +274,7 @@ tags /test/parallel/taskPar/taskIntents/src/*.d /test/parallel/taskPar/taskIntents/src/*.o -/test/parsing/king-11/aaa*.chpl +/test/parsing/king-11/aaa* /test/parsing/king-11/longName.good /test/performance/compiler/elliot/passCheck.good diff --git a/test/parsing/king-11/longName.cleanfiles b/test/parsing/king-11/longName.cleanfiles new file mode 100644 index 000000000000..45a777ed9fc6 --- /dev/null +++ b/test/parsing/king-11/longName.cleanfiles @@ -0,0 +1,3 @@ +aaa*.chpl +aaa*. +longName.good diff --git a/test/parsing/king-11/longName.precomp b/test/parsing/king-11/longName.precomp index ff449e607930..460cc717a2bf 100755 --- a/test/parsing/king-11/longName.precomp +++ b/test/parsing/king-11/longName.precomp @@ -3,7 +3,7 @@ NAME_MAX=`getconf NAME_MAX /` NAME_MAX=$((NAME_MAX - 15)) LIMIT=$((NAME_MAX - 1)) -VAL=`realpath "$0" | sed 's|\(.*\)/.*|\1|'` +VAL="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" repeatChar() { local input="$1" @@ -12,8 +12,8 @@ repeatChar() { printf '%s\n' "${myString// /$input}" } -FILENAME=$(repeatChar a $NAME_MAX).chpl -printf 'module LongName {\n\tfunc printSomething() {\n\t\twrite(%s); \n\t}\n}' "'Won't Compile'" > $VAL/$FILENAME +FILENAME=$(repeatChar a $NAME_MAX) +printf 'module LongName {\n\tfunc printSomething() {\n\t\twrite(%s); \n\t}\n}' "'Won't Compile'" > $VAL/$FILENAME.chpl FILENAME=$(repeatChar a $LIMIT) BOLD_ERROR=`echo -e '\033[1merror:\033[0m'` -printf "%s %s, filename is longer than maximum allowed length of %s\n" $BOLD_ERROR $FILENAME $LIMIT > $VAL/longName.good +printf "%s %s, filename is longer than maximum allowed length of %s" $BOLD_ERROR $FILENAME $LIMIT > $VAL/longName.good From a1b911c1e7554e02fb1fa01f58457cf18f1c1576 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Thu, 29 Apr 2021 16:32:42 +0530 Subject: [PATCH 08/11] refactor: cleaning new approach use a helper script longNameHelper generate dynamically with require statement compots cant do dynamic as will be ignored mv .cleanfiles to CLEANFILES and add to .gitignore Signed-off-by: Lakshya Singh --- .gitignore | 1 + test/parsing/king-11/CLEANFILES | 3 +++ test/parsing/king-11/longName.chpl | 4 +--- test/parsing/king-11/longName.cleanfiles | 3 --- test/parsing/king-11/longName.compopts | 1 - 5 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 test/parsing/king-11/CLEANFILES delete mode 100644 test/parsing/king-11/longName.cleanfiles delete mode 100644 test/parsing/king-11/longName.compopts diff --git a/.gitignore b/.gitignore index 18ee8c3163aa..619cabe714db 100644 --- a/.gitignore +++ b/.gitignore @@ -276,6 +276,7 @@ tags /test/parsing/king-11/aaa* /test/parsing/king-11/longName.good +/test/parsing/king-11/longNameHelper* /test/performance/compiler/elliot/passCheck.good diff --git a/test/parsing/king-11/CLEANFILES b/test/parsing/king-11/CLEANFILES new file mode 100644 index 000000000000..1467b2e78f9e --- /dev/null +++ b/test/parsing/king-11/CLEANFILES @@ -0,0 +1,3 @@ +aaaaaa* +longName.good +longNameHelper* diff --git a/test/parsing/king-11/longName.chpl b/test/parsing/king-11/longName.chpl index 9c1b968745ce..3a23b4b2beb5 100644 --- a/test/parsing/king-11/longName.chpl +++ b/test/parsing/king-11/longName.chpl @@ -1,3 +1 @@ -use LongName; - -printSomething(); +require "longNameHelper.chpl"; diff --git a/test/parsing/king-11/longName.cleanfiles b/test/parsing/king-11/longName.cleanfiles deleted file mode 100644 index 45a777ed9fc6..000000000000 --- a/test/parsing/king-11/longName.cleanfiles +++ /dev/null @@ -1,3 +0,0 @@ -aaa*.chpl -aaa*. -longName.good diff --git a/test/parsing/king-11/longName.compopts b/test/parsing/king-11/longName.compopts deleted file mode 100644 index 1db11892f2dc..000000000000 --- a/test/parsing/king-11/longName.compopts +++ /dev/null @@ -1 +0,0 @@ -aaaaa*.chpl From eb1d95ca76bfdc567c76ae333be943a828749f48 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Thu, 29 Apr 2021 16:34:44 +0530 Subject: [PATCH 09/11] fix and refator: update script for new approach touch no test file as well for cleaning purpose and ignore Signed-off-by: Lakshya Singh --- test/parsing/king-11/longName.precomp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/parsing/king-11/longName.precomp b/test/parsing/king-11/longName.precomp index 460cc717a2bf..829e9d41eabb 100755 --- a/test/parsing/king-11/longName.precomp +++ b/test/parsing/king-11/longName.precomp @@ -14,6 +14,8 @@ repeatChar() { FILENAME=$(repeatChar a $NAME_MAX) printf 'module LongName {\n\tfunc printSomething() {\n\t\twrite(%s); \n\t}\n}' "'Won't Compile'" > $VAL/$FILENAME.chpl +touch $VAL/$FILENAME.notest +printf 'require %s;' "'$FILENAME.chpl'" > $VAL/longNameHelper.chpl +touch $VAL/longNameHelper.notest FILENAME=$(repeatChar a $LIMIT) -BOLD_ERROR=`echo -e '\033[1merror:\033[0m'` -printf "%s %s, filename is longer than maximum allowed length of %s" $BOLD_ERROR $FILENAME $LIMIT > $VAL/longName.good +printf "error: %s, filename is longer than maximum allowed length of %d\n\n" $FILENAME $LIMIT > $VAL/longName.good From ac81a75480957fa15a38781873f738b64a3acb66 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Thu, 6 May 2021 18:48:43 +0530 Subject: [PATCH 10/11] chore: move files to proper location no need of noexec file change gitignore to local instead of global Signed-off-by: Lakshya Singh --- .gitignore | 4 ---- test/parsing/.gitignore | 3 +++ test/parsing/{king-11 => errors/nameLength}/CLEANFILES | 0 test/parsing/{king-11 => errors/nameLength}/longName.chpl | 0 test/parsing/{king-11 => errors/nameLength}/longName.precomp | 0 test/parsing/{king-11 => errors/nameLength}/shortName.chpl | 0 test/parsing/{king-11 => errors/nameLength}/shortName.good | 0 test/parsing/king-11/longName.noexec | 0 8 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 test/parsing/.gitignore rename test/parsing/{king-11 => errors/nameLength}/CLEANFILES (100%) rename test/parsing/{king-11 => errors/nameLength}/longName.chpl (100%) rename test/parsing/{king-11 => errors/nameLength}/longName.precomp (100%) rename test/parsing/{king-11 => errors/nameLength}/shortName.chpl (100%) rename test/parsing/{king-11 => errors/nameLength}/shortName.good (100%) delete mode 100644 test/parsing/king-11/longName.noexec diff --git a/.gitignore b/.gitignore index 619cabe714db..c4d02cd5d4b5 100644 --- a/.gitignore +++ b/.gitignore @@ -274,10 +274,6 @@ tags /test/parallel/taskPar/taskIntents/src/*.d /test/parallel/taskPar/taskIntents/src/*.o -/test/parsing/king-11/aaa* -/test/parsing/king-11/longName.good -/test/parsing/king-11/longNameHelper* - /test/performance/compiler/elliot/passCheck.good /test/performance/vectorization/vectorPragmas/*.good diff --git a/test/parsing/.gitignore b/test/parsing/.gitignore new file mode 100644 index 000000000000..08945468a403 --- /dev/null +++ b/test/parsing/.gitignore @@ -0,0 +1,3 @@ +**/nameLength/aaa* +**/nameLength/longName.good +**/nameLength/longNameHelper.* diff --git a/test/parsing/king-11/CLEANFILES b/test/parsing/errors/nameLength/CLEANFILES similarity index 100% rename from test/parsing/king-11/CLEANFILES rename to test/parsing/errors/nameLength/CLEANFILES diff --git a/test/parsing/king-11/longName.chpl b/test/parsing/errors/nameLength/longName.chpl similarity index 100% rename from test/parsing/king-11/longName.chpl rename to test/parsing/errors/nameLength/longName.chpl diff --git a/test/parsing/king-11/longName.precomp b/test/parsing/errors/nameLength/longName.precomp similarity index 100% rename from test/parsing/king-11/longName.precomp rename to test/parsing/errors/nameLength/longName.precomp diff --git a/test/parsing/king-11/shortName.chpl b/test/parsing/errors/nameLength/shortName.chpl similarity index 100% rename from test/parsing/king-11/shortName.chpl rename to test/parsing/errors/nameLength/shortName.chpl diff --git a/test/parsing/king-11/shortName.good b/test/parsing/errors/nameLength/shortName.good similarity index 100% rename from test/parsing/king-11/shortName.good rename to test/parsing/errors/nameLength/shortName.good diff --git a/test/parsing/king-11/longName.noexec b/test/parsing/king-11/longName.noexec deleted file mode 100644 index e69de29bb2d1..000000000000 From dfa8d40a759b5a65874aa32d47a7d1908ccabd80 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Thu, 6 May 2021 19:32:18 +0530 Subject: [PATCH 11/11] refactor : throw complete error instead of short change precomp script to check with full name justify selection of 16 in parser.cpp add and rename variables to precomp for better clarity Signed-off-by: Lakshya Singh --- compiler/parser/parser.cpp | 20 +++++++++++-------- .../errors/nameLength/longName.precomp | 10 +++++----- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/compiler/parser/parser.cpp b/compiler/parser/parser.cpp index 3d9665b42fb4..755571e44228 100644 --- a/compiler/parser/parser.cpp +++ b/compiler/parser/parser.cpp @@ -331,19 +331,23 @@ static void parseCommandLineFiles() { if (isChplSource(inputFileName)) { /* - Ensure that all the files parsed don't exceed the - (NAME_MAX - 16) i.e. 239 bytes Limits + Selection of 16 is did so as to provide + enough space for generating files like .tmp.obj + whose length is 8 so selection of double the required */ - const size_t maxFileName = NAME_MAX - 16; + const size_t reductionMaxLength = 16; + /* + Ensure that all the files parsed don't exceed + (NAME_MAX - reductionMaxLength) e.g. 239 bytes on + unix and linux system. + */ + const size_t maxFileName = NAME_MAX - reductionMaxLength; if (strlen(inputFileName) > maxFileName) { - char reducedFileName[maxFileName]; - // sprintf fileName to allowed length buffer - strncpy(reducedFileName, inputFileName, maxFileName); - // error message to print between filename and filename limit + // error message to print placeholders for fileName and maxLength const char *errorMessage = "%s, filename is longer than maximum allowed length of %d\n"; // throwr error will concatenated messages - USR_FATAL(errorMessage, reducedFileName, maxFileName); + USR_FATAL(errorMessage, inputFileName, maxFileName); } parseFile(inputFileName, MOD_USER, true, false); } diff --git a/test/parsing/errors/nameLength/longName.precomp b/test/parsing/errors/nameLength/longName.precomp index 829e9d41eabb..6d7da1e83902 100755 --- a/test/parsing/errors/nameLength/longName.precomp +++ b/test/parsing/errors/nameLength/longName.precomp @@ -1,8 +1,9 @@ #!/usr/bin/env bash NAME_MAX=`getconf NAME_MAX /` -NAME_MAX=$((NAME_MAX - 15)) -LIMIT=$((NAME_MAX - 1)) +REDUCTIONMAXLENGTH=16 +LIMIT=$((NAME_MAX - REDUCTIONMAXLENGTH)) +OUTOFBOUND=$((LIMIT + 1)) VAL="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" repeatChar() { @@ -12,10 +13,9 @@ repeatChar() { printf '%s\n' "${myString// /$input}" } -FILENAME=$(repeatChar a $NAME_MAX) +FILENAME=$(repeatChar a $OUTOFBOUND) printf 'module LongName {\n\tfunc printSomething() {\n\t\twrite(%s); \n\t}\n}' "'Won't Compile'" > $VAL/$FILENAME.chpl touch $VAL/$FILENAME.notest printf 'require %s;' "'$FILENAME.chpl'" > $VAL/longNameHelper.chpl touch $VAL/longNameHelper.notest -FILENAME=$(repeatChar a $LIMIT) -printf "error: %s, filename is longer than maximum allowed length of %d\n\n" $FILENAME $LIMIT > $VAL/longName.good +printf "error: %s, filename is longer than maximum allowed length of %d\n\n" $FILENAME.chpl $LIMIT > $VAL/longName.good