flock_compare
qsort(expect, __arraycount(expect), sizeof(expect[0]), &flock_compare);
qsort(result, nlocks, sizeof(result[0]), &flock_compare);