[PATCH v5] tests/fcntl.c: add test for print_f_owner_ex
Eugene Syromiatnikov
esyr at redhat.com
Tue Apr 10 12:48:06 UTC 2018
On Sun, Apr 08, 2018 at 12:10:14AM +0800, Zhibin Li wrote:
> + test_f_owner_ex_umove(ARG_STR(F_OWNER_TID), 1234567890);
> + test_f_owner_ex_umove(ARG_STR(F_OWNER_PID), 1298126790);
> + test_f_owner_ex_umove(ARG_STR(F_OWNER_PGRP), 1294567890);
> + test_f_owner_ex_umove(ARG_STR(F_OWNER_TID), 20);
> + test_f_owner_ex_umove(ARG_STR(F_OWNER_PID), 30);
> + test_f_owner_ex_umove(ARG_STR(F_OWNER_PGRP), 40);
Just a quick note - instead of multiple calls of the same function with
various arguments one can put those arguments in an array and call the
function in a loop. Some tests in strace test suite already employ this
technique, such as file_handle.c or fanotify_mark.c (from the top of my
head).
More information about the Strace-devel
mailing list