Skip to content

msync01:testcase need revisit #1259

@huilinzh

Description

@huilinzh

Source code: kernel/syscalls/msync/msync01.c

If run the command "msync01" without any options, the test tries to do the following:

  1. open/create a file
  2. mmap this file
  3. memset part of the mapped memory to "1" for this file
  4. msync the mapped memory to this file
  5. lseek the file to the position, which is memset to "1" in above step 3.
  6. read the file and compare the value

In step 4, msync is called with flag MS_ASYNC. This flag means an update be scheduled, but the call to msync returns immediately. That's it doesn't guarantee the synchronization is completed before the msync() return. So the comparation in
step 6 may succeed or fail. The test result can't be expected to be always successful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions