<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>2896</bug_id>
          
          <creation_ts>2012-08-06 01:39:16 +0000</creation_ts>
          <short_desc>busybox:  du-k-works test case failed</short_desc>
          <delta_ts>2013-02-05 09:19:57 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>(P2)(D5)(Merged)</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="LiRongQing">rongqing.li</reporter>
          <assigned_to name="Kai Kang">kai.kang</assigned_to>
          <cc>alexandrux.palalau</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>kai.kang</cc>
    
    <cc>liang.li2</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>zhenfeng.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>23808</commentid>
    <comment_count>0</comment_count>
    <who name="LiRongQing">rongqing.li</who>
    <bug_when>2012-08-06 01:39:16 +0000</bug_when>
    <thetext>The du-k-works test seems to assume that du -k on a directory with two files
totaling 80 kilobytes should report either 80k or 88k. In ext4 filesystm however,
both busybox&apos; du -k and coreutils&apos; du -k reports a size of 84k which causes the
test to fail.

=&gt;du-k-works
FAIL: du-k-works
+ mkdir du.testdir
+ cd du.testdir
+ dd if=/dev/zero of=file1 bs=1k count=64
+ dd if=/dev/zero of=file2 bs=1k count=16
++ busybox du -k .
++ busybox du -k .
+ test &apos;x84    .&apos; = &apos;x80    .&apos; -o &apos;x84    .&apos; = &apos;x88    .&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24213</commentid>
    <comment_count>1</comment_count>
    <who name="LiRongQing">rongqing.li</who>
    <bug_when>2012-08-20 08:29:20 +0000</bug_when>
    <thetext>https://github.com/openembedded/oe-core/commit/a022fb6b69388f28f3130e71125b64e4c154d504</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24606</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandru Palalau">alexandrux.palalau</who>
    <bug_when>2012-08-29 13:42:55 +0000</bug_when>
    <thetext>I have built the ext3 and ext4 images for the Qemux86 machine, core-image-minimal.
Followed the steps presented below and got the following output:
EXT4: file1 = 64k
      file2 = 16k
busybox du -k . command returns 81

EXT3: file1 = 64k
      file2 = 16k
busybox du -k . command returns 83</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28832</commentid>
    <comment_count>3</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2013-01-15 10:29:11 +0000</bug_when>
    <thetext>This is problem of the test case itself. 
It expect a directory occupies 0 or 8 kb which is the &quot;block size&quot; of file system. But when create a ext3/4 file system,  mke2fs will use heuristics to determine the appropriate block size if &apos;-b&apos; is not provided. When the size of partition less than 512MB, the &quot;block size&quot; is 1024. That why the result of &quot;busybox du -k .&quot; is 81.

We can 
1 run mkfs.ext3/4 with &quot;-b 4096&quot;  or &quot;-b 8192&quot;, or
2 run this case on a partition which larger than 512M to make test case pass after the patch merged(and the patch is merged to busybox git repo).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29428</commentid>
    <comment_count>4</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2013-02-01 02:00:28 +0000</bug_when>
    <thetext>Patch merged by busybox upstream, then backport it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29517</commentid>
    <comment_count>5</comment_count>
    <who name="liang li">liang.li2</who>
    <bug_when>2013-02-05 09:19:57 +0000</bug_when>
    <thetext>no error with git master branch commit 7e9cb437b1b720e656f4a33f73c07c5dc7356a2c.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>