[PATCH 24/27] tests: check decoding of crypto_user_alg CRYPTOCFGA_REPORT_KPP attribute

JingPiao Chen chenjingpiao at gmail.com
Sat Jul 22 13:00:39 UTC 2017


* tests/nlattr_crypto_user_alg.c (main): Check decoding of
CRYPTOCFGA_REPORT_KPP attribute.
---
 tests/nlattr_crypto_user_alg.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/nlattr_crypto_user_alg.c b/tests/nlattr_crypto_user_alg.c
index d4d7b3e..e693b77 100644
--- a/tests/nlattr_crypto_user_alg.c
+++ b/tests/nlattr_crypto_user_alg.c
@@ -201,6 +201,17 @@ main(void)
 			      printf("{type=\"efgh\"}"));
 #endif
 
+#ifdef HAVE_STRUCT_CRYPTO_REPORT_KPP
+	struct crypto_report_kpp rkpp = {
+		.type = "abcd"
+	};
+	TEST_NLATTR_OBJECT_EX(fd, nlh0, hdrlen,
+			      init_crypto_user_alg, print_crypto_user_alg,
+			      CRYPTOCFGA_REPORT_KPP,
+			      pattern, rkpp, print_quoted_nul_string,
+			      printf("{type=\"abcd\"}"));
+#endif
+
 	puts("+++ exited with 0 +++");
 	return 0;
 }
-- 
2.7.4





More information about the Strace-devel mailing list