On Thu, Aug 19, 2021 at 4:03 PM Elijah Newren <newren@xxxxxxxxx> wrote: > On Thu, Aug 19, 2021 at 11:10 AM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote: > > I also find the test_pause() user-experience suboptimal and appreciate > > the idea of improving it. However, this approach seems fatally flawed. > > In particular, setting HOME to the user's real home directory could > > lead to undesirable results. When I'm using test_pause() to debug a > > problem with a test, I'm not just inspecting the test state, but I > > quite often interact with the state using the same Git commands as the > > test itself would use. Hence, it is very common for me to pause the > > test just before the suspect commands and then run those commands > > manually (instead of allowing the test script to do so). In such a > > scenario, HOME must be pointing at the test's home directory, not at > > my real home directory. > > I agree, but I worry that it's not just HOME. I'd think the point of > test_pause is to let you interact with the repository state while > getting the same results that the test framework would, and I think > some tests could be affected by TERM and SHELL too (e.g. perhaps the > recent issues with COLUMNS). Granted, I suspect far fewer tests would > be affected by those, but I'm not sure I like the idea of inability to > reproduce the same issues. Oh, indeed. I didn't mean to imply that HOME is the only problematic one; they all are since, as you say, they can impact correctness and reproducibility of the tests themselves. I called out HOME specially because of the potential danger involved with pointing it at the user's real home directory since it could very well lead to clobbering of precious files and other settings belonging to the user.