• lch's avatar
    posixtest: fix test FcntlFlockSetLk · ae8e0199
    lch authored
    This test case is going to test whether the file lock works well on the
    system. It firstly adds a lock and then get the lock through syscalls.
    It uses F_OFD_GETLK command of fcntl(2) to get the lock info on an
    opened file description[1], which is not defined on the FreeBSD. This
    commit seperate the process of getting the information of lock for
    different OSes, and mimic the behaviour of F_OFD_GETLK on FreeBSD.
    
    [1]: https://www.gnu.org/software/libc/manual/html_node/Open-File-Description-Locks.html
    
    Change-Id: I8abae0e7040fc667143eea028731e341be9b1baf
    ae8e0199
test_freebsd.go 1.28 KB