Re: [PATCH v3 2/3] test-lib-functions: optionally keep HOME, TERM and SHELL in 'test_pause'

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

 



Hi Elijah and Junio,

Le 2021-09-01 à 19:09, Junio C Hamano a écrit :
Elijah Newren <newren@xxxxxxxxx> writes:

Because a new process instance of $PAUSE_SHELL is run, the options
you add when inserting test_pause does not affect what happens in
the tests after you exit the $PAUSE_SHELL [*], right?

I think the warning was less about what happens after test_pause is
complete and the testcase resumes, and more intended to convey that if
the user tries to manually copy & paste snippets of code from the test
into $PAUSE_SHELL, then the use of these flags can cause the result of
those pasted commands to differ.

Yes, I added the warnings based on the reticence I got in v1 to change the
behaviour without adding flags.


But the difference of TERM and SHELL are much smaller issue when one
cuts and pastes the lines from the test script.  Even if you do not
use -s or -t options, shell variables and helpers won't be available
to the interactive session given by test_pause, and that is a much
bigger difference between the "real" shell environment that is
running the tests and the user's shell environment test_pause gives
us.  That is why I think the WARNING should be attached _directly_
to the description of test_pause and not to individual "this uses
different X environment compared to the real shell environment
running the tests" options.

OK, I can make that tweak.


Le 2021-09-01 à 17:52, Elijah Newren a écrit :
-- snip --
those pasted commands to differ.  If so, a small rewording might be in
order, e.g. "WARNING: this can cause commands run in the paused shell
to give different results".  I'd also say the CAUTION would perhaps
benefit from some rewording (since the option itself doesn't cause
files to be overwritten), e.g. "CAUTION: using this option and copying
commands from the test script into the paused shell might result in
files in your HOME being overwritten".

Thanks for these suggestions, that wording does seem clearer.

Philippe.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux