gem5 v24.0.0.0
|
Go to the source code of this file.
Functions | |
TEST (Coroutine, Unstarted) | |
This test is checking if the Coroutine, once it's created it doesn't start since the second argument of the constructor (run_coroutine) is set to false. | |
TEST (Coroutine, Unfinished) | |
This test is checking if the Coroutine, once it yields back to the caller, it is still marked as not finished. | |
TEST (Coroutine, Passing) | |
This test is checking the parameter passing interface of a coroutine which takes an integer as an argument. | |
TEST (Coroutine, Returning) | |
This test is checking the yielding interface of a coroutine which takes no argument and returns integers. | |
TEST (Coroutine, Fibonacci) | |
This test is still supposed to test the returning interface of the the Coroutine, proving how coroutine can be used for generators. | |
TEST (Coroutine, Cooperative) | |
This test is using a bi-channel coroutine (accepting and yielding values) for testing a cooperative task. | |
TEST (Coroutine, Nested) | |
This test is testing nested coroutines by using one inner and one outer coroutine. | |
TEST (Coroutine, TwoCallers) | |
This test is stressing the scenario where two distinct fibers are calling the same coroutine. | |
TEST | ( | Coroutine | , |
Cooperative | ) |
This test is using a bi-channel coroutine (accepting and yielding values) for testing a cooperative task.
The caller and the coroutine have a string each; they are composing a new string by merging the strings together one character per time. The result string is hence passed back and forth between the coroutine and the caller.
Definition at line 185 of file coroutine.test.cc.
References gem5::ArmISA::c, expected(), and gem5::Coroutine< Arg, Ret >::get().
TEST | ( | Coroutine | , |
Fibonacci | ) |
This test is still supposed to test the returning interface of the the Coroutine, proving how coroutine can be used for generators.
The coroutine is computing the first #steps of the fibonacci sequence and it is yielding back results one number per time.
Definition at line 144 of file coroutine.test.cc.
References expected(), gem5::Coroutine< Arg, Ret >::get(), and gem5::RiscvISA::sum.
TEST | ( | Coroutine | , |
Nested | ) |
This test is testing nested coroutines by using one inner and one outer coroutine.
It basically ensures that yielding from the inner coroutine returns to the outer coroutine (mid-layer of execution) and not to the outer caller.
Definition at line 218 of file coroutine.test.cc.
References expected(), and gem5::Coroutine< Arg, Ret >::get().
TEST | ( | Coroutine | , |
Passing | ) |
This test is checking the parameter passing interface of a coroutine which takes an integer as an argument.
Coroutine::operator() and CallerType::get() are the tested APIS.
Definition at line 85 of file coroutine.test.cc.
References expected(), and gem5::X86ISA::val.
TEST | ( | Coroutine | , |
Returning | ) |
This test is checking the yielding interface of a coroutine which takes no argument and returns integers.
Coroutine::get() and CallerType::operator() are the tested APIS.
Definition at line 115 of file coroutine.test.cc.
References expected(), gem5::Coroutine< Arg, Ret >::get(), and gem5::output().
TEST | ( | Coroutine | , |
TwoCallers | ) |
This test is stressing the scenario where two distinct fibers are calling the same coroutine.
First the test instantiates (and runs) a coroutine, then spawns another one and it passes it a reference to the first coroutine. Once the new coroutine calls the first coroutine and the first coroutine yields, we are expecting execution flow to be yielded to the second caller (the second coroutine) and not the original caller (the test itself)
Definition at line 259 of file coroutine.test.cc.
TEST | ( | Coroutine | , |
Unfinished | ) |
This test is checking if the Coroutine, once it yields back to the caller, it is still marked as not finished.
Definition at line 67 of file coroutine.test.cc.
TEST | ( | Coroutine | , |
Unstarted | ) |
This test is checking if the Coroutine, once it's created it doesn't start since the second argument of the constructor (run_coroutine) is set to false.
Definition at line 49 of file coroutine.test.cc.
References gem5::Fiber::started().