def TestCaseStepVerify(tc, step): if halapi.IsHalDisabled(): return True print("step") print(step.step_id) if step.step_id == 0: resp = quience_msg_send() return True
def TestCaseSetup(tc): print("Quiesce API: %s" % tc.module.args.api) if halapi.IsHalDisabled(): return if tc.module.args.api == "QUIESCE_START": quiesce_start() elif tc.module.args.api == "QUIESCE_STOP": quiesce_stop() else: print("Invalid API in module definition") return
def TestCaseVerify(tc): print("Crypto API: %s" % tc.module.args.api) if halapi.IsHalDisabled(): return True if tc.module.args.api == "CRYPTO_API_ASYM_ECC_POINT_MUL_P256": return crypto_asym_apis.ecc_point_mul_p256_test() elif tc.module.args.api == "CRYPTO_API_ASYM_ECDSA_P256_SIG_GEN": return crypto_asym_apis.ecdsa_p256_sig_gen_test() elif tc.module.args.api == "CRYPTO_API_ASYM_ECDSA_P256_SIG_VERIFY": return crypto_asym_apis.ecdsa_p256_sig_verify_test() elif tc.module.args.api == "CRYPTO_API_ASYM_RSA2K_ENCRYPT": return crypto_asym_apis.rsa2k_encrypt_test() elif tc.module.args.api == "CRYPTO_API_ASYM_RSA2K_DECRYPT": return crypto_asym_apis.rsa2k_decrypt_test() elif tc.module.args.api == "CRYPTO_API_ASYM_RSA2K_CRT_DECRYPT": return crypto_asym_apis.rsa2k_crt_decrypt_test() elif tc.module.args.api == "CRYPTO_API_HMAC_SHA1_GENERATE": return crypto_sym_apis.hmac_sha1_generate_test() elif tc.module.args.api == "CRYPTO_API_HMAC_SHA1_VERIFY": return crypto_sym_apis.hmac_sha1_verify_test() elif tc.module.args.api == "CRYPTO_API_HMAC_SHA224_GENERATE": return crypto_sym_apis.hmac_sha224_generate_test() elif tc.module.args.api == "CRYPTO_API_HMAC_SHA224_VERIFY": return crypto_sym_apis.hmac_sha224_verify_test() elif tc.module.args.api == "CRYPTO_API_HMAC_SHA256_GENERATE": return crypto_sym_apis.hmac_sha256_generate_test() elif tc.module.args.api == "CRYPTO_API_HMAC_SHA256_VERIFY": return crypto_sym_apis.hmac_sha256_verify_test() elif tc.module.args.api == "CRYPTO_API_HMAC_SHA384_GENERATE": return crypto_sym_apis.hmac_sha384_generate_test() elif tc.module.args.api == "CRYPTO_API_HMAC_SHA384_VERIFY": return crypto_sym_apis.hmac_sha384_verify_test() elif tc.module.args.api == "CRYPTO_API_HMAC_SHA512_GENERATE": return crypto_sym_apis.hmac_sha512_generate_test() elif tc.module.args.api == "CRYPTO_API_HMAC_SHA512_VERIFY": return crypto_sym_apis.hmac_sha512_verify_test() elif tc.module.args.api == "CRYPTO_API_ASYM_RSA2K_SIG_GEN": return crypto_asym_apis.rsa2k_sig_gen_test() elif tc.module.args.api == "CRYPTO_API_ASYM_RSA2K_SIG_VERIFY": return crypto_asym_apis.rsa2k_sig_verify_test() else: print("Invalid API in module definition") return False
def Init(self, qid): if halapi.IsHalDisabled(): qid = resmgr.RawrCbIdAllocator.get() self.id = qid gid = "RawrCb%04d" % qid self.GID(gid) # self.spec = spec_obj # logger.info(" - %s" % self) # self.uplinks = objects.ObjectDatabase() # for uplink_spec in self.spec.uplinks: # uplink_obj = uplink_spec.Get(Store) # self.uplinks.Set(uplink_obj.GID(), uplink_obj) # assert(len(self.uplinks) > 0) logger.info(" - %s" % self) return
def Init(self, qid): if halapi.IsHalDisabled(): qid = resmgr.ProxyrCbIdAllocator.get() self.id = qid gid = "ProxyrCb%04d" % qid self.GID(gid) # self.spec = spec_obj # logger.info(" - %s" % self) # self.uplinks = objects.ObjectDatabase() # for uplink_spec in self.spec.uplinks: # uplink_obj = uplink_spec.Get(Store) # self.uplinks.Set(uplink_obj.GID(), uplink_obj) # assert(len(self.uplinks) > 0) logger.info(" - %s" % self) self.proxyrcbq = SwDscrRingHelper.main("PROXYRCBQ", gid, self.id) return
def Init(self, qid, other_qid=None, session=None, is_iflow=None): if halapi.IsHalDisabled(): qid = resmgr.TcpCbIdAllocator.get() self.id = qid if other_qid != None: self.other_qid = other_qid else: self.other_qid = 0xffff gid = "TcpCb%04d" % qid self.GID(gid) # self.spec = spec_obj # logger.info(" - %s" % self) # self.uplinks = objects.ObjectDatabase() # for uplink_spec in self.spec.uplinks: # uplink_obj = uplink_spec.Get(Store) # self.uplinks.Set(uplink_obj.GID(), uplink_obj) # assert(len(self.uplinks) > 0) logger.info(" - %s" % self) if session is not None: if session.iflow.label == 'NVME-PROXY': logger.info("skipping TLS cb creation for nvme..") else: self.tlscb = TlsCbHelper.main(self) self.sesq = SwDscrRingHelper.main("SESQ", gid, self.id) self.asesq = SwDscrRingHelper.main("ASESQ", gid, self.id) if is_iflow: logger.info("%s is iflow" % gid) tcp_proxy.init_tcb1(self, session) elif is_iflow != None: logger.info("%s is rflow" % gid) if session.iflow.label == 'NVME-PROXY': nvme_o_tcp.init_tcb2(self, session) else: tcp_proxy.init_tcb2(self, session) self.debug_dol = tcp_proxy.tcp_debug_dol_dont_send_ack | \ tcp_proxy.tcp_debug_dol_bypass_barco self.debug_dol_tx = tcp_proxy.tcp_tx_debug_dol_dont_send_ack | \ tcp_proxy.tcp_tx_debug_dol_bypass_barco return