On Tue, 29 Sep 2026 03:16:48 +0900, Pedro Falcato wrote: > > On Mon, Sep 28, 2026 at 06:27:42PM +0100, Pedro Falcato wrote: > > On Sat, Sep 26, 2026 at 10:08:17AM +0900, Hajime Tazaki wrote: > > > The kselftest runner currently uses `cd -` to restore its working > > > directory after running a test. > > > > > > This is not supported by the minimal BusyBox hush shell used by some > > > NOMMU targets. Store the original directory explicitly and restore it > > > with a quoted path instead. > > > > > > This also avoids printing the directory change performed by `cd -` and > > > handles paths containing whitespace correctly. > > > > > > Cc: Shuah Khan <[email protected]> > > > Cc: Kees Cook <[email protected]> > > > Cc: Andy Lutomirski <[email protected]> > > > Cc: Will Drewry <[email protected]> > > > Cc: Mark Brown <[email protected]> > > > Cc: Brendan Jackman <[email protected]> > > > Cc: Hangbin Liu <[email protected]> > > > Cc: "Ricardo B. Marliere" <[email protected]> > > > Cc: [email protected] > > > Cc: [email protected] > > > Cc: [email protected] > > > Signed-off-by: Hajime Tazaki <[email protected]> > > > > NACK. > > > > https://pubs.opengroup.org/onlinepubs/009695099/utilities/cd.html > > > > - > > When a hyphen is used as the operand, this shall be equivalent to the > > command: > > cd "$OLDPWD" && pwd > > > > which changes to the previous working directory and then writes its name. > > > > > > If you're running selftests on !POSIX compliant shells, that's a > > you-issue. Fix the shell, or use something decent. > > ... I realize I was a bit too aggressive but seriously, lets not support > broken software, please?
thanks for the comments. no, your comment makes 100% sense to me. under fork-less environment, we have less options but I agree that this should be addressed in a shell implementation. I will try to fix a busybox shell and drop this patch from next spin. -- Hajime
