Using the 'expr' program from busybox returns incorrect values: # ln -s /bin/busybox /tmp/expr # /tmp/expr 111517272011 - 111517292011 0 Large numbers are supported: # /tmp/expr 111517272011 111517272011 Math works, but only for smaller values: # /tmp/expr 65536 - 4 65532 The 'expr' from coreutils works correctly # expr.coreutils 111517272011 - 111517292011 -20000 I get the same results on ARM and PowerPC Tested using master fa81f8dfb7a342e355b608aa4204cf23ed2b251c
I compiled busybox on my machine and this bug is still present. So i think that this is a busybox bug and not a yocto one. You can test this by downloading source tar ball from upstream and: ~/Desktop/busybox-1.19.3 $ ./expr 111517272011 - 111517292011 0 ~/Desktop/busybox-1.19.3 $ ./expr 111517272011 111517272011 ~/Desktop/busybox-1.19.3 $ ./expr 65536 - 4 65532
(In reply to comment #1) > I compiled busybox on my machine and this bug is still present. So i think that > this is a busybox bug and not a yocto one. You can test this by downloading > source tar ball from upstream and: > > ~/Desktop/busybox-1.19.3 $ ./expr 111517272011 - 111517292011 > 0 > ~/Desktop/busybox-1.19.3 $ ./expr 111517272011 > 111517272011 > ~/Desktop/busybox-1.19.3 $ ./expr 65536 - 4 > 65532 So the problem was around a busybox config. I will commit this change in order to fix this bug. Edwin, you can assign this bug to me if you didn't already fix this.
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-January/015853.html
Fix: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=91367de75575e79a94b2f90b6b7aa8740a039fc5
(In reply to comment #4) > Fix: > http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=91367de75575e79a94b2f90b6b7aa8740a039fc5 Sorry. My fix was for yocto time set issue, which was caused by this bug. You can forget my comment.
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4884ccd2362681cccc27ea0d198873c7d7a9f09e