Writing a unit test with cmocka

Andreas Schneider asn at samba.org
Thu May 4 15:00:14 UTC 2017

On Thursday, 4 May 2017 16:54:55 CEST Andreas Schneider via samba-technical 
> Hello Samba-Developers,
> if possible and practical please write unit tests to test code. If you're
> looking for an example you can find it at:
>    testsuite/unittests/test_krb5_samba.c

Oh, a unit test doesn't need to be executed with 'make test' normally.

test: test_smb_krb5_kt_open
success: test_smb_krb5_kt_open
test: test_smb_krb5_kt_open_file
success: test_smb_krb5_kt_open_file
test: test_smb_krb5_kt_open_fail
success: test_smb_krb5_kt_open_fail
test: test_smb_krb5_kt_open_relative_memory
success: test_smb_krb5_kt_open_relative_memory

More information about the samba-technical mailing list