Skip to content
Snippets Groups Projects
Commit 24734bad authored by Jammer, Tim's avatar Jammer, Tim
Browse files

added additional invalid buffer cases

parent 9eb0b500
Branches
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ from itertools import chain
class InvalidBufErrorP2P(ErrorGenerator):
invalid_bufs = [CorrectParameterFactory().buf_var_name, "NULL"]
invalid_bufs = [ "NULL", 'MPI_BOTTOM', 'MPI_IN_PLACE']
send_funcs = ["mpi_send",
"mpi_isend", "mpi_ssend", "mpi_issend", "mpi_rsend", "mpi_irsend", "mpi_bsend", "mpi_ibsend",
"mpi_send_init", "mpi_ssend_init", "mpi_bsend_init", "mpi_rsend_init", "mpi_psend_init",
......@@ -40,8 +40,9 @@ class InvalidBufErrorP2P(ErrorGenerator):
send_func = func
recv_func = "mpi_irecv"
tm = get_invalid_param_p2p_case("buf", "NULL", check_recv, send_func, recv_func)
tm.set_description("InvalidParam-Buffer-" + func, "Invalid Buffer: NULL")
for buf_to_use in self.invalid_bufs:
tm = get_invalid_param_p2p_case("buf", buf_to_use, check_recv, send_func, recv_func)
tm.set_description("InvalidParam-Buffer-" + func, "Invalid Buffer: "+buf_to_use)
yield tm
tm = get_invalid_param_p2p_case("buf", "not_allocated", check_recv, send_func, recv_func)
......@@ -63,10 +64,11 @@ class InvalidBufErrorP2P(ErrorGenerator):
return
for func in ["mpi_mrecv", "mpi_imrecv"]:
for buf_to_use in self.invalid_bufs:
tm = get_send_recv_template("mpi_isend", ["mpi_mprobe", func])
tm.set_description("InvalidParam-Buffer-" + func, "Invalid Buffer: NULL")
tm.set_description("InvalidParam-Buffer-" + func, "Invalid Buffer: "+buf_to_use)
for call in tm.get_instruction(identifier="MATCHEDRECEIVE", return_list=True):
call.set_arg("buf", "NULL")
call.set_arg("buf", buf_to_use)
call.set_has_error()
yield tm
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment