Menu

#99 writev03 and writev04 should check for PARTIAL success

System Calls
closed
mreed
Testcases (113)
5
2007-05-21
2006-09-18
saperski
No

Hallo,

While testing FreeBSD Linux ABI emulation layer with
LTP I got two false positives on writev03 and writev04.

First, FreeBSD writev() will return EFAULT:

[EFAULT] Part of iov or data to be written to the file
points outside the process's allocated address space.

We need to provide Linux behaviour in our emulation layer.

However this problem went unnoticed until we fixed our
emulator mmap(2) to match exactly Linux behaviour.

We used to have PROT_READ silently added to every
mmap() call - this caused many "bad memory regions" to
be actually valid memory areas for LTP. Needless to say
this caused lots of testcases to fail, but this allowed
writev03 and writev04 to happily access whole iovec
memory and PASS.

Discussion

  • Robert Williamson

    • assigned_to: nobody --> mreed10
     
  • Subrata Modak

    Subrata Modak - 2007-05-21

    Logged In: YES
    user_id=1737361
    Originator: NO

    I do not know how to re-produce your errors exactly and i do not see any deviation in LTP code regarding the same. It would be great if you can point that out, beacuse of which LTP is passing in your emulation layer although it should not have passed. Encourage you also to submit patch in this regard.
    Regards--
    Subrata

     
  • Subrata Modak

    Subrata Modak - 2007-05-21
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB