tests: Check pointers of get(pw|gr)(nam|uid|gid)_r functions
authorAndreas Schneider <asn@samba.org>
Tue, 30 Oct 2018 10:04:22 +0000 (11:04 +0100)
committerAndreas Schneider <asn@samba.org>
Tue, 30 Oct 2018 19:49:09 +0000 (20:49 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
tests/testsuite.c

index 6a9f4d13e5f37a0ebe86f7d7a3e081f4a65ae2e8..a423c55af06e33ba0f85c522064cf2f5c07bc35c 100644 (file)
@@ -166,6 +166,7 @@ static void test_nwrap_getpwnam_r(const char *name,
                }
                assert_true(ret);
        }
+       assert_ptr_equal(&pwd, pwdp);
 
        print_passwd(&pwd);
 
@@ -214,6 +215,7 @@ static bool test_nwrap_getpwuid_r(uid_t uid,
                }
                assert_true(ret);
        }
+       assert_ptr_equal(&pwd, pwdp);
 
        print_passwd(&pwd);
 
@@ -334,6 +336,7 @@ static bool test_nwrap_getgrnam_r(const char *name,
                }
                assert_true(ret);
        }
+       assert_ptr_equal(&grp, grpp);
 
        print_group(&grp);
 
@@ -384,6 +387,7 @@ static bool test_nwrap_getgrgid_r(gid_t gid,
                }
                assert_true(ret);
        }
+       assert_ptr_equal(&grp, grpp);
 
        print_group(&grp);