hercules-390 / hyperion

Hercules 390
Other
248 stars 67 forks source link

make check / runtest issues when Hercules source file name > 10 characterst and msglevel debug in effect #200

Open srorso opened 7 years ago

srorso commented 7 years ago

When msglevel debug is in effect, all Hercules console messages are prefixed with fn(line), where fn is the Hercules source file name and line is the line number where the message was issued. This string is truncated at 17 characters by logmsg.c.

If the Hercules source file name is longer than 10 characters and line is greater than four digits, the trailing ')" is truncated and redtest.rexx does not identify the line as having a debug prefix. Depending on the module issuing a message and whether redtest.rexx is looking for that message, log file analysis can fail.

Redtest.rexx tests for debug prefixes at line 84.

At present most messages examined by redtest.rexx are issued by cmdtab.c or by hscmisc.c, so this is not a big issue. This issue could also cause Error, Hmsg, and *Info runtest directives to miss messages issued by source modules having long file names.

A solution would be to change logmsg.c to follow the potentially truncated debug prefix with a delimiter that identifies the prefix, with or without the trailing ")", as a debug prefix, and to make the corresponding change to redtest.rexx.

jphartmann commented 7 years ago

I'm not partial to trying to second-guess a broken piece of code. If the logger is not production strength, it should not be turned on when doing make check.

Doctor, doctor, it hurts when ...