It would be nice to improve the testing of the pam-module. Especially a fuzzy testing for input from pam application (conversation function) and via the unix socket interface should be added. The output as well as memory access should be checked.
https://cmocka.org/ and https://cwrap.org/pam_wrapper.html look very promising.