running testsuite with PREFER_APPLETS=y and EXEC_PATH=

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Sun Nov 10 21:12:08 UTC 2013


On 10 November 2013 21:57, Tito <farmatito at tiscali.it> wrote:
> On Sunday 10 November 2013 15:46:10 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?
>>
>> Thanks,
>>
>> /mjt
>
> Hi,
> maybe something like this could help, but it needs root:
>
> su
> mount --bind /path_to_your/busybox /bin/busybox
>
>
> do the tests
>
> su
> umount /bin/busybox
>
> Tested:
> busybox
> BusyBox v1.20.2 (Debian 1:1.20.0-7) multi-call binary.
> su
> mount --bind $PWD/busybox /bin/busybox
> busybox
> BusyBox v1.22.0.git (2013-11-10 14:50:23 CET) multi-call binary.
> umount /bin/busybox
> busybox
> BusyBox v1.20.2 (Debian 1:1.20.0-7) multi-call binary.

or chroot into _install and test there?


More information about the busybox mailing list