unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Jules Tamagnan <jtamagnan@gmail.com>
Cc: 33195@debbugs.gnu.org
Subject: bug#33195: 27.0.50; user-login-name has no group-login-name
Date: Sat, 10 Nov 2018 13:36:47 -0500	[thread overview]
Message-ID: <ntftw8g4ow.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <871s87e1gi.fsf@gmail.com> (Jules Tamagnan's message of "Tue, 30 Oct 2018 11:25:33 -0700")

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	other threads:[~2018-11-10 18:36 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 [this message]
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
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ntftw8g4ow.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=33195@debbugs.gnu.org \
    --cc=jtamagnan@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).