On Sun, Nov 10, 2013 at 06:46:10PM +0400, Michael Tokarev wrote: > Hello. > > When running testsuite, we're trying to execute applets > by their names, like "grep", "cp", "sh" and so on. > > When CONFIG_BUSYBOX_PREFER_APPLETS set to "y", busybox > tries to exec itself. But this, in turn, depends on > CONFIG_BUSYBOX_EXEC_PATH pointing to the right executable. > On linux this is /proc/self/exe, but this obviously requires > mounted /proc. On other systems, this does not work. > > On Debian we used "/bin/busybox" as BUSYBOX_EXEC_PATH, > to work around not mounted /proc (since busybox is used > as shell for initramfs), and for other systems without > /proc/self support. > > But this way, as long as our just-built busybox is not > placed to /bin/busybox, we can't test it, we're testing > system /bin/busybox (provided it actually exists), > or system utilities (found in $PATH). > > So now I'm basically lost. I can re-set EXEC_PATH back to > the default "/proc/self/exe", this will re-enable testsuite > on linux correctly. It will still fail on other systems > (*bsd, solaris etc). > > Any suggestion on this?
How about parsing the aux vector for AT_EXECFN and using that? It could at least be an option. Or, busybox could just fallback to not preferring applets when the exec of /proc/self/exe fails... Rich _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox