bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33195: 27.0.50; user-login-name has no group-login-name


From: Glenn Morris
Subject: bug#33195: 27.0.50; user-login-name has no group-login-name
Date: Sat, 10 Nov 2018 13:36:47 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Jules Tamagnan wrote:

> I've tried my hand at writing a test for this but am dubious it will
> pass on all machines, I believe it should work on gnu/linux
[...]
> +(ert-deftest group-name ()
> +  (let ((list `((0 . "root")
> +                (1000 . ,(user-login-name 1000))
> +                (1212345 . nil))))
> +    (dolist (test list)
> +      (should (equal (group-name (car test)) (cdr test))))))

This assumes that user 1000's primary group is the same as their login name.
This is not at all guaranteed, so I will remove it.
Eg it fails for me on rhel 7.5, and also on hydra.nixos.org, ref
https://hydra.nixos.org/eval/1488740

I guess that UID 0 is always the root group, but I wouldn't swear to it.
The 1212345 thing relies on UID 1212345 not existing.
It seems to me that this is fragile too.
So all in all, I'm not sure this test is very useful.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]