From: Jeremy Allison Date: Fri, 10 Apr 2020 21:14:25 +0000 (-0700) Subject: s3: VFS: Add cmocka test for vfs_full_audit to make sure all arrays are correct. X-Git-Tag: ldb-2.2.0~922 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5e987e2f40e7698de489696d795ebe26b7e75c9b;p=thirdparty%2Fsamba.git s3: VFS: Add cmocka test for vfs_full_audit to make sure all arrays are correct. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14343 Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Apr 14 17:58:40 UTC 2020 on sn-devel-184 --- diff --git a/source3/modules/test_vfs_full_audit.c b/source3/modules/test_vfs_full_audit.c new file mode 100644 index 00000000000..4a12e466ff3 --- /dev/null +++ b/source3/modules/test_vfs_full_audit.c @@ -0,0 +1,49 @@ +/* + * Unix SMB/CIFS implementation. + * + * Unit test for entries in vfs_full_audit arrays. + * + * Copyright (C) Jeremy Allison 2020 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +/* Needed for static build to complete... */ +#include "includes.h" +#include "smbd/smbd.h" +NTSTATUS vfs_full_audit_init(TALLOC_CTX *ctx); + +#include "vfs_full_audit.c" +#include + +static void test_full_audit_array(void **state) +{ + unsigned i; + + for (i=0; i