From: Philippe Blain Date: Thu, 02 Sep 2021 13:10:51 GMT Subject: Re: [PATCH v3 2/3] test-lib-functions: optionally keep HOME, TERM and SHELL in 'test_pause' Message-ID: <3256e230-9db4-57fa-8b43-b9d7e18ba725@gmail.com> In-Reply-To: Hi Elijah and Junio, Le 2021-09-01 à 19:09, Junio C Hamano a écrit : > Elijah Newren 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.