From: Eli Zaretskii <eliz@gnu.org>
To: Glenn Morris <rgm@gnu.org>
Cc: 33195@debbugs.gnu.org, jtamagnan@gmail.com
Subject: bug#33195: 27.0.50; user-login-name has no group-login-name
Date: Sat, 10 Nov 2018 21:15:34 +0200 [thread overview]
Message-ID: <83wopkagmh.fsf@gnu.org> (raw)
In-Reply-To: <ntftw8g4ow.fsf@fencepost.gnu.org> (message from Glenn Morris on Sat, 10 Nov 2018 13:36:47 -0500)
> From: Glenn Morris <rgm@gnu.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, 33195@debbugs.gnu.org
> Date: Sat, 10 Nov 2018 13:36:47 -0500
>
> 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.
Maybe all platforms should use the same code as MS-Windows for this
test, then.
next prev parent reply other threads:[~2018-11-10 19:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-29 18:52 bug#33195: 27.0.50; user-login-name has no group-login-name Jules Tamagnan
2018-10-30 10:34 ` Eli Zaretskii
2018-10-30 18:25 ` Jules Tamagnan
2018-11-10 18:36 ` Glenn Morris
2018-11-10 18:49 ` Glenn Morris
2018-11-10 19:00 ` Jules Tamagnan
2018-11-10 19:12 ` Glenn Morris
2018-11-10 19:15 ` Eli Zaretskii [this message]
2018-11-10 21:02 ` Andreas Schwab
2018-11-11 3:17 ` Glenn Morris
2018-10-30 18:28 ` Jules Tamagnan
2018-11-10 9:24 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83wopkagmh.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=33195@debbugs.gnu.org \
--cc=jtamagnan@gmail.com \
--cc=rgm@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.