Home | History | Annotate | Download | only in tests

Lines Matching refs:username

43 static void check_passwd(const passwd* pwd, const char* username, uid_t uid, uid_type_t uid_type) {
45 ASSERT_STREQ(username, pwd->pw_name);
61 static void check_getpwuid(const char* username, uid_t uid, uid_type_t uid_type) {
66 check_passwd(pwd, username, uid, uid_type);
69 static void check_getpwnam(const char* username, uid_t uid, uid_type_t uid_type) {
71 passwd* pwd = getpwnam(username);
74 check_passwd(pwd, username, uid, uid_type);
77 static void check_getpwuid_r(const char* username, uid_t uid, uid_type_t uid_type) {
88 check_passwd(pwd, username, uid, uid_type);
91 static void check_getpwnam_r(const char* username, uid_t uid, uid_type_t uid_type) {
98 result = getpwnam_r(username, &pwd_storage, buf, sizeof(buf), &pwd);
102 check_passwd(pwd, username, uid, uid_type);
105 static void check_get_passwd(const char* username, uid_t uid, uid_type_t uid_type) {
106 check_getpwuid(username, uid, uid_type);
107 check_getpwnam(username, uid, uid_type);
108 check_getpwuid_r(username, uid, uid_type);
109 check_getpwnam_r(username, uid, uid_type);
114 static void check_get_passwd(const char* /* username */, uid_t /* uid */, uid_type_t /* uid_type */) {
115 GTEST_LOG_(INFO) << "This test is about uid/username translation for Android, which does nothing on libc other than bionic.\n";