* bug#46625: tramp-test33-environment-variables fails
@ 2021-02-18 22:03 Glenn Morris
2021-02-19 8:25 ` Michael Albinus
0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2021-02-18 22:03 UTC (permalink / raw)
To: 46625; +Cc: michael.albinus
Package: emacs
Severity: minor
Version: 28.0.50
tramp-test33-environment-variables fails on hydra.nixos since
e5f50f32f76bab2607d77f0dc51cf81ec0c1e232.
It seems to me that:
(string-match-p (regexp-quote envvar) "printenv")
isn't a robust way to test if ENVVAR is (not) set, because it can
falsely match on $_=ENVVAR.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#46625: tramp-test33-environment-variables fails
2021-02-18 22:03 bug#46625: tramp-test33-environment-variables fails Glenn Morris
@ 2021-02-19 8:25 ` Michael Albinus
2021-02-19 16:13 ` Glenn Morris
0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2021-02-19 8:25 UTC (permalink / raw)
To: Glenn Morris; +Cc: 46625-done
Glenn Morris <rgm@gnu.org> writes:
Hi Glenn,
> tramp-test33-environment-variables fails on hydra.nixos since
> e5f50f32f76bab2607d77f0dc51cf81ec0c1e232.
>
> It seems to me that:
>
> (string-match-p (regexp-quote envvar) "printenv")
>
> isn't a robust way to test if ENVVAR is (not) set, because it can
> falsely match on $_=ENVVAR.
Thanks for the report. I've changed the way how Tramp suppresses unused
environment variables, unfortunately this new problem doesn't occur when
I run this test locally. Likely, it depends on the shell flavor /bin/sh
is pointing too.
Fixed and pushed, closing the bug.
Best regards, Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#46625: tramp-test33-environment-variables fails
2021-02-19 8:25 ` Michael Albinus
@ 2021-02-19 16:13 ` Glenn Morris
2021-02-19 16:52 ` Michael Albinus
0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2021-02-19 16:13 UTC (permalink / raw)
To: Michael Albinus; +Cc: 46625
What is the printenv check telling you that the preceding ${var:-} one
doesn't?
Why does the test use "set" to double-check a variable is set,
but "printenv" to double-check it's unset?
Why not search for ^ENVVAR= rather than doing a second grep to remove $_?
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#46625: tramp-test33-environment-variables fails
2021-02-19 16:13 ` Glenn Morris
@ 2021-02-19 16:52 ` Michael Albinus
0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2021-02-19 16:52 UTC (permalink / raw)
To: Glenn Morris; +Cc: 46625
Glenn Morris <rgm@gnu.org> writes:
> What is the printenv check telling you that the preceding ${var:-} one
> doesn't?
>
> Why does the test use "set" to double-check a variable is set,
> but "printenv" to double-check it's unset?
>
> Why not search for ^ENVVAR= rather than doing a second grep to remove $_?
Anything goes. If you believe it is better, change it.
Best regards, Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-02-19 16:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 22:03 bug#46625: tramp-test33-environment-variables fails Glenn Morris
2021-02-19 8:25 ` Michael Albinus
2021-02-19 16:13 ` Glenn Morris
2021-02-19 16:52 ` Michael Albinus
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).