|
|
6cf099 |
From 681fd36964b873135b2b8dd5200ddcfd1e420214 Mon Sep 17 00:00:00 2001
|
|
|
6cf099 |
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
|
|
|
6cf099 |
Date: Mon, 27 Jul 2015 17:24:45 +0200
|
|
|
6cf099 |
Subject: [PATCH 20/23] VIEWS TEST: add null-check
|
|
|
6cf099 |
|
|
|
6cf099 |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
6cf099 |
---
|
|
|
6cf099 |
src/tests/cmocka/test_sysdb_views.c | 6 ++++++
|
|
|
6cf099 |
1 file changed, 6 insertions(+)
|
|
|
6cf099 |
|
|
|
6cf099 |
diff --git a/src/tests/cmocka/test_sysdb_views.c b/src/tests/cmocka/test_sysdb_views.c
|
|
|
6cf099 |
index 1fb598219e9ee581e465ddbb32ba9f2544600c26..123d4c5cb613f41e1bca9e89feed701a1e86f8d3 100644
|
|
|
6cf099 |
--- a/src/tests/cmocka/test_sysdb_views.c
|
|
|
6cf099 |
+++ b/src/tests/cmocka/test_sysdb_views.c
|
|
|
6cf099 |
@@ -225,10 +225,12 @@ void test_sysdb_add_overrides_to_object(void **state)
|
|
|
6cf099 |
assert_non_null(orig);
|
|
|
6cf099 |
|
|
|
6cf099 |
tmp_str = talloc_strdup(orig, "ORIGNAME");
|
|
|
6cf099 |
+ assert_non_null(tmp_str);
|
|
|
6cf099 |
ret = ldb_msg_add_string(orig, SYSDB_NAME, tmp_str);
|
|
|
6cf099 |
assert_int_equal(ret, EOK);
|
|
|
6cf099 |
|
|
|
6cf099 |
tmp_str = talloc_strdup(orig, "ORIGGECOS");
|
|
|
6cf099 |
+ assert_non_null(tmp_str);
|
|
|
6cf099 |
ret = ldb_msg_add_string(orig, SYSDB_GECOS, tmp_str);
|
|
|
6cf099 |
assert_int_equal(ret, EOK);
|
|
|
6cf099 |
|
|
|
6cf099 |
@@ -236,18 +238,22 @@ void test_sysdb_add_overrides_to_object(void **state)
|
|
|
6cf099 |
assert_non_null(override);
|
|
|
6cf099 |
|
|
|
6cf099 |
tmp_str = talloc_strdup(override, "OVERRIDENAME");
|
|
|
6cf099 |
+ assert_non_null(tmp_str);
|
|
|
6cf099 |
ret = ldb_msg_add_string(override, SYSDB_NAME, tmp_str);
|
|
|
6cf099 |
assert_int_equal(ret, EOK);
|
|
|
6cf099 |
|
|
|
6cf099 |
tmp_str = talloc_strdup(override, "OVERRIDEGECOS");
|
|
|
6cf099 |
+ assert_non_null(tmp_str);
|
|
|
6cf099 |
ret = ldb_msg_add_string(override, SYSDB_GECOS, tmp_str);
|
|
|
6cf099 |
assert_int_equal(ret, EOK);
|
|
|
6cf099 |
|
|
|
6cf099 |
tmp_str = talloc_strdup(override, "OVERRIDEKEY1");
|
|
|
6cf099 |
+ assert_non_null(tmp_str);
|
|
|
6cf099 |
ret = ldb_msg_add_string(override, SYSDB_SSH_PUBKEY, tmp_str);
|
|
|
6cf099 |
assert_int_equal(ret, EOK);
|
|
|
6cf099 |
|
|
|
6cf099 |
tmp_str = talloc_strdup(override, "OVERRIDEKEY2");
|
|
|
6cf099 |
+ assert_non_null(tmp_str);
|
|
|
6cf099 |
ret = ldb_msg_add_string(override, SYSDB_SSH_PUBKEY, tmp_str);
|
|
|
6cf099 |
assert_int_equal(ret, EOK);
|
|
|
6cf099 |
|
|
|
6cf099 |
--
|
|
|
6cf099 |
2.4.3
|
|
|
6cf099 |
|