PDA

Bekijk de volledige versie : /usr/sbin/test broken ?



Jean-Fabrice
05-05-2005, 17:00
Well,

can ppl try the following test and post here the result + fw in use ?
Assuming 'test' is 9896 bytes /usr/sbin/test (fw's one, not busybox link)


if test "x$FOO" != "x"; then echo "ok" ; fi

and


if test "x$PATH" != "x"; then echo "ok" ; fi


For me (Oleg's 1.9.2.7-4 fw), I got :
First test :
before write 0 : 1115308384
before read 0 : 1115308384
ok

Second test :
ok

I was wondering if my first result is the normal behaviour of '/usr/sbin/test'(I don't think so coz' busybox test doesn't give the samre result but would like others guy test results)

Oleg : if test is broken, is it Asus related or uclibc ? Can it be fixed some way ?

JF

:edit: correct typo in second test

xopr
05-05-2005, 17:29
I tested test with the Oleg 1.9.2.7-4 firmware
First test gave:
before write 0 : 1115309808
before read 0 : 1115309808
ok

Second test seems to wait for some kind of string termination (I can't break it with ctrl+c:
[admin@router root]$ if test "x$PATH != "x"; then echo "ok" ; fi
>

My $PATH variable is:
/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Currently, my /opt dir is not mounted because I unplugged all hardware.
I can't see 'test' anymore in the process list, only a '/usr/sbin/dropbear', and a '-sh' (and some other irrelevant processes :))


Hope this helps

:edit:
Forgot the firmware version :)

Oleg
05-05-2005, 17:39
This test is not the test you expect. This is in fact asus program. I've removed it now - you could use -pre14 or wait for 1.9.2.7-5.

Jean-Fabrice
05-05-2005, 17:51
This test is not the test you expect. This is in fact asus program. I've removed it now - you could use -pre14 or wait for 1.9.2.7-5.
phew !
Thank you very much for clearing this point

I should have check for busybox applet /usr/bin/test before asking. sorry :/

As a lot of OptWare (unslung package) use 'test' without full path in their rcScript, rc fails all the time. your next release fw will be welcome to patch this issue.