Bug 678 - [LTP] fallocate always gets -EFBIG on qemuarm/qemumips
Summary: [LTP] fallocate always gets -EFBIG on qemuarm/qemumips
Status: VERIFIED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-runtime (show other bugs)
Version: 1.0
Hardware: Other Multiple
: Low minor
Target Milestone: 1.1
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard: looks to be a simulation limitation (...
Depends on:
Blocks:
 
Reported: 2011-01-27 23:33 UTC by Kevin Tian
Modified: 2011-08-19 00:53 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Tian 2011-01-27 23:33:32 UTC
This is found on 1.0-M2 build

Actually ext3 doesn't support fallocate operation, and thus -EOPNOTSUPP is expected, and then LTP will skip related tests. This happens on all other platforms except qemuarm and qemumips.

On these two targets, -EFBIG is always returned whatever offset and length is given. You can create a new file, and then use fallocate utility included in utillinux (included in SDK image):
    fallocate new_file -o any_offset -l any_length

take a look at the kernel code (fs/open.c):

do_fallocate:
    ...
    /* Check for wrap through zero too */
    if (((offset + len) > inode->i_sb->s_maxbytes) || (offset + len) < 0))
        return -EFBIG;

    IF (!inode->i_op->fallocate)
        return -EOPNOTSUPP;

I don't understand why the -EFBIG condition is triggered in this case, and thus still report this problem though it's expected to fail on ext3 file system

I tried latest 01/27 nightly arm kernel. same error.
Comment 1 Bruce Ashfield 2011-01-28 12:22:10 UTC
we'll have a look at this as time permits
Comment 2 Yi Zhao 2011-08-12 00:23:15 UTC
We perform LTP on 20110806 build by using latest ltp-full-20110606 instead of ltp-full-20101031. These cases can pass now.

The output message as below: 
##########
<<<test_start>>>
tag=fallocate01 stime=1313050545
cmdline="fallocate01"
contacts=""
analysis=exit
<<<test_output>>>
fallocate01    1  TCONF  :  fallocate system call is not implemented
fallocate01    2  TCONF  :  Remaining cases not appropriate for configuration
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=2
<<<test_end>>>
<<<test_start>>>
tag=fallocate02 stime=1313050545
cmdline="fallocate02"
contacts=""
analysis=exit
<<<test_output>>>
fallocate02    1  TPASS  :  fallocate(tfile_read_14572:5, 1, 0, 4096) returned 9
fallocate02    2  TPASS  :  fallocate(tfile_write_14572:6, 1, -4096, 4096) returned 22
fallocate02    3  TPASS  :  fallocate(tfile_write_14572:6, 1, 4096, -4096) returned 22
fallocate02    4  TPASS  :  fallocate(tfile_write_14572:6, 1, 49152, 0) returned 22
fallocate02    5  TPASS  :  fallocate(tfile_write_14572:6, 1, 49152, -4096) returned 22
fallocate02    6  TPASS  :  fallocate(tfile_write_14572:6, 1, -98304, 4096) returned 22
fallocate02    7  TCONF  :  fallocate system call is not implemented
fallocate02    8  TCONF  :  Remaining cases not appropriate for configuration
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=2
<<<test_end>>>
<<<test_start>>>
tag=fallocate03 stime=1313050545
cmdline="fallocate03"
contacts=""
analysis=exit
<<<test_output>>>
fallocate03    1  TCONF  :  fallocate system call is not implemented
fallocate03    2  TCONF  :  Remaining cases not appropriate for configuration
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=2
<<<test_end>>>
##############
Comment 3 Bruce Ashfield 2011-08-12 06:47:02 UTC
marking as resolved, since this can't be seen on the latest builds.
Comment 4 Yi Zhao 2011-08-19 00:53:42 UTC
Verified it with 20110806 build by using ltp-full-20110606.