static int test_rand_seed(void)
{
    RAND_DRBG *master = RAND_DRBG_get0_master();
    unsigned char rand_buf[256];
    size_t rand_buflen;
#ifdef OPENSSL_RAND_SEED_NONE
    size_t required_seed_buflen = rand_drbg_seedlen(master);
#else
    size_t required_seed_buflen = 0;
#endif
    memset(rand_buf, 0xCD, sizeof(rand_buf));
    for ( rand_buflen = 256 ; rand_buflen > 0 ; --rand_buflen ) {
        RAND_DRBG_uninstantiate(master);
        RAND_seed(rand_buf, rand_buflen);
        if (!TEST_int_eq(RAND_status(),
                         (rand_buflen >= required_seed_buflen)))
            return 0;
    }
    return 1;
}
['static int test_rand_seed(void)\n{\n    RAND_DRBG *master = RAND_DRBG_get0_master();\n    unsigned char rand_buf[256];\n    size_t rand_buflen;\n#ifdef OPENSSL_RAND_SEED_NONE\n    size_t required_seed_buflen = rand_drbg_seedlen(master);\n#else\n    size_t required_seed_buflen = 0;\n#endif\n    memset(rand_buf, 0xCD, sizeof(rand_buf));\n    for ( rand_buflen = 256 ; rand_buflen > 0 ; --rand_buflen ) {\n        RAND_DRBG_uninstantiate(master);\n        RAND_seed(rand_buf, rand_buflen);\n        if (!TEST_int_eq(RAND_status(),\n                         (rand_buflen >= required_seed_buflen)))\n            return 0;\n    }\n    return 1;\n}', 'RAND_DRBG *RAND_DRBG_get0_master(void)\n{\n    if (!RUN_ONCE(&rand_drbg_init, do_rand_drbg_init))\n        return NULL;\n    return master_drbg;\n}', 'int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))\n{\n    if (pthread_once(once, init) != 0)\n        return 0;\n    return 1;\n}', 'int RAND_DRBG_uninstantiate(RAND_DRBG *drbg)\n{\n    int index = -1, type, flags;\n    if (drbg->meth == NULL) {\n        RANDerr(RAND_F_RAND_DRBG_UNINSTANTIATE,\n                RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED);\n        return 0;\n    }\n    drbg->meth->uninstantiate(drbg);\n    if (drbg->flags & RAND_DRBG_FLAG_MASTER)\n        index = RAND_DRBG_TYPE_MASTER;\n    else if (drbg->flags & RAND_DRBG_FLAG_PRIVATE)\n        index = RAND_DRBG_TYPE_PRIVATE;\n    else if (drbg->flags & RAND_DRBG_FLAG_PUBLIC)\n        index = RAND_DRBG_TYPE_PUBLIC;\n    if (index != -1) {\n        flags = rand_drbg_flags[index];\n        type = rand_drbg_type[index];\n    } else {\n        flags = drbg->flags;\n        type = drbg->type;\n    }\n    return RAND_DRBG_set(drbg, type, flags);\n}']