[Toybox] Multiple OS support in tests
Ed Maste
emaste at freebsd.org
Fri Jan 18 11:27:11 PST 2019
On Fri, 18 Jan 2019 at 14:14, Rob Landley <rob at landley.net> wrote:
>
> $ sysctl -n kern.hostname
> sysctl: cannot stat /proc/sys/kern/hostname: No such file or directory
> $ toybox sysctl -n kernel.hostname
> halfbrick
>
> You know... I think ubuntu's error message is clearer. :)
>
> Does the longer name work on BSD, or just the short one?
Just the short one.
% sysctl -n kernel.hostname
sysctl: unknown oid 'kernel.hostname'
% sysctl -n kern.hostname
volta
> I could do a tests-portability.sh but let's hold off and collect a few and try
> to actually fix them first...
Sounds good to me. For now I'm just changing them to run on FreeBSD in
my tree as I find them, breaking Linux in the process, to get a better
idea of the scope.
The next one is stat - it seems "stat -c %i" becomes "stat -f %i" but
other fields (e.g. %s) don't exist.
More information about the Toybox
mailing list