/** * Copyright - See the COPYRIGHT that is included with this distribution. * pvxs is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. */ #include #include #include #include #include #include #include #include namespace { using namespace pvxs; void testAccount() { testShow()<<__func__; std::string account; { std::vector buf(128); testOk(osiGetUserName(buf.data(), buf.size()-1u)==osiGetUserNameSuccess, "osiGetUserName()"); buf.back() = '\0'; account = buf.data(); } testOk(!account.empty(), "User: '%s'", account.c_str()); std::set roles; osdGetRoles(account, roles); testNotEq(roles.size(), 0u); for(auto& role : roles) { testDiag(" %s", role.c_str()); } } } // namespace MAIN(testutil) { testPlan(4); testTrue(version_abi_check())<<" 0x"<