Rob Savoye wrote:
On 9/6/24 9:54 PM, Jacob Bachmeyer wrote:
In the first place I was wondering why at all logname is needed.
I can guess the reason for putting the user's login name into the log
based on DejaGnu's history: DejaGnu originated at Cygnus, where the
ability to easily look at a log and see who had run the tests meant
knowing who to ask about the results. I suspect that Cygnus had
quite a bit of shared infrastructure and test results may have been
passed around instead of each developer working in relative isolation
as is now common. (I.e. one person runs the tests, but several work
to chase down the failures.)
Yes, the logname was for the logs so it's possible to tell who ran
the tests. Probably not that useful, most people test their own work.
33 years ago though it sounded like a good idea but I can't remember
why. :-) This is probably some of the very first lines of code I wrote
in DejaGnu. In the early years at Cygnus we had no real office, we all
worked at home, and this was pre-internet.
So the logs were not sitting on a shared server, then. Perhaps a notion
of credit-where-credit-is-due to the testers?
I am still inclined to keep it, but perhaps we should check if the
working directory or source tree is a Git checkout, and if so, use the
user's preferred Git identity ("`git config --get user.name` <`git
config --get user.email`>" in that directory) instead of a login name?
That would likely require splitting the "Test run by ..." line into
separate "Test run by <user>" and "Test run began <timestamp>" lines,
since Git identities are likely to be longer than login names. This
could be an interesting new feature for 1.7. What do you (and the rest
of the list) think?
Also, do you remember what system used `who am i` instead of `whoami`
and why DejaGnu extracts the second /[ !]/-delimited field from that
command's output?
-- Jacob