From: Christof Schmitt Date: Tue, 18 Aug 2020 20:54:07 +0000 (-0700) Subject: test_vfs_gpfs: Add test for lease mapping function X-Git-Tag: talloc-2.3.2~567 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5cfe884b39327d5208d4d7059b242e9c3dd881e5;p=thirdparty%2Fsamba.git test_vfs_gpfs: Add test for lease mapping function Signed-off-by: Christof Schmitt Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/test_vfs_gpfs.c b/source3/modules/test_vfs_gpfs.c index 55b48611a3d..05f12d0b24a 100644 --- a/source3/modules/test_vfs_gpfs.c +++ b/source3/modules/test_vfs_gpfs.c @@ -43,10 +43,18 @@ static void test_share_deny_mapping(void **state) 0); /* GPFS limitation, cannot deny only delete. */ } +static void test_gpfs_lease_mapping(void **state) +{ + assert_int_equal(lease_type_to_gpfs(F_RDLCK), GPFS_LEASE_READ); + assert_int_equal(lease_type_to_gpfs(F_WRLCK), GPFS_LEASE_WRITE); + assert_int_equal(lease_type_to_gpfs(F_UNLCK), GPFS_LEASE_NONE); +} + int main(int argc, char **argv) { const struct CMUnitTest tests[] = { cmocka_unit_test(test_share_deny_mapping), + cmocka_unit_test(test_gpfs_lease_mapping), }; cmocka_set_message_output(CM_OUTPUT_SUBUNIT);