On 1/18/19 11:59 AM, Ed Maste wrote: > I applied a few hacks to run tests on FreeBSD - changes like (hostname.test): > > -HOST="$(cat /proc/sys/kernel/hostname)" > +HOST=$(sysctl -n kern.hostname) > > Of course this isn't an acceptable upstream change; what's the most > desirable way to handle these? One approach would be something like:
Hmmm... $ toybox sysctl -n kern.hostname sysctl: unknown key 'kern.hostname' $ 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? > case $(uname -s) in > FreeBSD) > HOST=$(sysctl -n kern.hostname) > ;; > Linux) > HOST=$(cat /proc/sys/kernel/hostname) > ;; > esac > > but perhaps this is too verbose in the individual tests? I could do a tests-portability.sh but let's hold off and collect a few and try to actually fix them first... Rob > _______________________________________________ > Toybox mailing list > [email protected] > http://lists.landley.net/listinfo.cgi/toybox-landley.net > _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
