Skip to content

Commit 20ec036

Browse files
committed
slightly more detailed cmdmsg
1 parent ca86946 commit 20ec036

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

flang/runtime/execute.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ int TerminationCheck(int status, const Descriptor *cmdstat,
7676
"Invalid command quit with exit status code: %d", exitStatusVal);
7777
} else {
7878
StoreIntToDescriptor(cmdstat, INVALID_CL_ERR, terminator);
79-
CheckAndCopyCharsToDescriptor(cmdmsg, "Invalid command line");
79+
CheckAndCopyCharsToDescriptor(cmdmsg,
80+
"Invalid command line: check for exitstat and console printout");
8081
}
8182
}
8283
if (status == -1) {

flang/unittests/Runtime/CommandTest.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ TEST_F(ZeroArguments, ECLInvalidCommandErrorSync) {
344344
bool wait{true};
345345
OwningPtr<Descriptor> exitStat{IntDescriptor(404)};
346346
OwningPtr<Descriptor> cmdStat{IntDescriptor(202)};
347-
OwningPtr<Descriptor> cmdMsg{CharDescriptor("Message ChangedXXXXXXXXX")};
347+
OwningPtr<Descriptor> cmdMsg{CharDescriptor(
348+
"cmdmsg will not modify the remaining buffer XXXXXXXXXXXXXXXXXXXXX")};
348349

349350
RTNAME(ExecuteCommandLine)
350351
(*command.get(), wait, exitStat.get(), cmdStat.get(), cmdMsg.get());
@@ -354,7 +355,8 @@ TEST_F(ZeroArguments, ECLInvalidCommandErrorSync) {
354355
CheckDescriptorEqInt<std::int64_t>(exitStat.get(), 127);
355356
#endif
356357
CheckDescriptorEqInt<std::int64_t>(cmdStat.get(), 3);
357-
CheckDescriptorEqStr(cmdMsg.get(), "Invalid command lineXXXX");
358+
CheckDescriptorEqStr(cmdMsg.get(),
359+
"Invalid command line: check for exitstat and console printoutXXXX");
358360
}
359361

360362
TEST_F(ZeroArguments, ECLInvalidCommandTerminatedSync) {

0 commit comments

Comments
 (0)