[PATCH 1/3] hush_tests: add checking to leak_argv1 and negate test

Michal Simek monstr at monstr.eu
Wed Aug 12 13:51:33 UTC 2009


Denys,

> Michal,
> 
> The testsuite so far was used (at least by me) this way:
> I change something in hush.c, I build busybox,
> I cd to shell/hush_test, I run ./run_all.
> 
> You are using it in a different way. This is good -
> it's beneficial if hush is tested more ways.

I cross compile busybox and I create rootfs from _install folder.
I have hust_test accessible through NFS, or in any folder
on roofs when I do it manualy.

> 
> But this inevitably means you will see some things
> in testsuite which are not working in _your_ setup.
> Because they were never tested that way.

Of course because I am not able compile bysybox source on Microblaze.


> 
> You are fixing testsuite to make it work in your
> usage case. What you need to take care of, though,
> is to _not break it for existing use case_.
> 
> That is to say, you canoot assume that the system
> you run tests on is using busybox, let alone it is
> using busybox with the same config.
> 
>> ps -o is supported in busybox only with CONFIG_DESKTOP option.
> 
> Yes. But the system you run tests on may not only have
> different .config, it may actually have _non-busybox_ ps!

Of course but there should be cover cases when your ps in busybox
don't have -o option or external one.

> 
> Here, ps -o was used delibarately because -o option
> is mandated by POSIX etc. It is not too unreasonable
> to assume it is available.

Yes, it is but if you use only busybox on small embedded system the test
should handle it.

> 
> However, this can be fixed just by moving to by far more
> robust facility for measuring leaks: memleak debugging builtin.

I saw your patch.

> 
> I will do it.
>> negate test:
>> There were hardcoded path to /usr/bin/printf but
>> when is CONFIG_INSTALL_NO_USR enable is printf in /bin folder.
> 
> Same here. But here (unlike ps -o), we can simply try to
> autodetect where printf is using "which printf"
> 
> Please try attached patch.

Make sense to me but here is the same issue as you describe with ps.
Maybe will be worth to find busybox and then use busybox printf to cover
case when is in your fs standalone printf app.

Michal


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian


More information about the busybox mailing list