summaryrefslogtreecommitdiffhomepage
path: root/testsuite/od.tests
AgeCommit message (Collapse)Author
2017-07-19od_bloaty: fix floating point outputRon Yorston
Currently od_bloaty does this: $ /bin/echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' | busybox od -f od: invalid character 'F' in type string 'fF' $ /bin/echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' | busybox od -t fD od: invalid character 'D' in type string 'fD' $ /bin/echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' | busybox od -t f 0000000 0000010 The first two occur because the alphabetic length specifier isn't being properly skipped. The third is due to the empty length specifier being treated as alphabetic so we fall off the end of the FDL_sizeof array with undetermined consequences. Coreutils defaults to printing a double in this case. With this patch the output is: $ /bin/echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' | ./busybox od -f 0000000 0.0000000e+00 0.0000000e+00 0000010 $ /bin/echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' | ./busybox od -t fD 0000000 0.000000000000000e+00 0000010 $ /bin/echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' | ./busybox od -t f 0000000 0.000000000000000e+00 0000010 I guess nobody uses BusyBox od to print floating point numbers. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-10randomconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-21od: code shrink, fix "od --traditional FILE"Denys Vlasenko
function old new delta parse_old_offset 107 125 +18 packed_usage 28715 28691 -24 od_main 2312 2275 -37 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-11randomtest fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-04tests: fix POSIX shell source styleMike Frysinger
The source command does not search $PWD, and bash recently fixed itself to follow this behavior for /bin/sh. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-18fix mountpoint test to not prevemt mkfs_xxx from making image in any fileDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2008-04-14od: fix testsuiteDenis Vlasenko
2008-04-14od: fix "od -b"Denis Vlasenko