mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
libsmb: Fix test for smbc_getxattr
Bug: https://bugzilla.samba.org/show_bug.cgi?id=14808 Signed-off-by: Remi Collet <rcollet@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sun Apr 9 10:44:38 UTC 2023 on atb-devel-224
This commit is contained in:
parent
4fc166628f
commit
0cd66fe6bd
@ -1542,17 +1542,30 @@ static bool torture_libsmbclient_getxattr(struct torture_context *tctx)
|
||||
ret));
|
||||
|
||||
/*
|
||||
* Ensure getting a valid attribute returns 0.
|
||||
* Ensure getting a valid attribute computes its size.
|
||||
*/
|
||||
ret = smbc_getxattr(getxattr_name, "system.*", value, sizeof(value));
|
||||
torture_assert_int_equal_goto(tctx,
|
||||
ret,
|
||||
0,
|
||||
ret = smbc_getxattr(getxattr_name, "system.*", NULL, 0);
|
||||
torture_assert_goto(tctx,
|
||||
ret >= 0,
|
||||
ok,
|
||||
done,
|
||||
talloc_asprintf(tctx,
|
||||
"smbc_getxattr(foobar) on '%s' should "
|
||||
"get -1, got %d\n",
|
||||
"smbc_getxattr(foobar, NULL) on '%s' should "
|
||||
"get >=0, got %d\n",
|
||||
getxattr_name,
|
||||
ret));
|
||||
|
||||
/*
|
||||
* Ensure getting a valid attribute returns its size.
|
||||
*/
|
||||
ret = smbc_getxattr(getxattr_name, "system.*", value, sizeof(value));
|
||||
torture_assert_goto(tctx,
|
||||
ret >= 0,
|
||||
ok,
|
||||
done,
|
||||
talloc_asprintf(tctx,
|
||||
"smbc_getxattr(foobar, value) on '%s' should "
|
||||
"get >=0, got %d\n",
|
||||
getxattr_name,
|
||||
ret));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user