The necessity of SOstart/SOend was understood after email exchanges with
David Breaux <davidbreaux67@gmail.com>.
See openair2/LAYER2/rlc_v2/tests/test46.h for some details.
Basically if we NACK without SOstart/SOend then the other end of the RLC
channel will consider all the bytes as NACKed and will have to resend them
all. If another status is then reported before all the bytes are sent,
and because we don't use SOstart/SOend this status will NACK all the bytes
again, then all the bytes are to be sent again. And the cycle repeats.
It will end with a max retx reached (which triggers RLF, Radio Link Failure).
The function put_bit in openair2/LAYER2/rlc_v2/rlc_pdu.c has been changed
too, maybe introducing some performance issues.
To run tests, simply type: make
Each test is made of:
testXX.h definition of the test
testXX.txt.gz compressed expected output of the test
At runtime, we generate:
testXX.run actual output of the test
test.c is the test driving program.
Only the output lines of the test program starting with "TEST" are
stored into testXX.txt and testXX.run.
A test is considered a success if testXX.txt and testXX.run are equal.
Only failed tests are reported.
How to define a new test?
1 - get the ID
Look in the file run_tests.sh, the variable test_count gives you
the number of existing tests. The ID of your test has to be
test_count + 1.
2 - create files
Create the file test<ID>.h containing the test, then generate test<ID>.run
by running 'make all TEST=test<ID>' and copy test<ID>.run to test<ID>.txt.
Then compress this file (gzip -9 test<ID>.txt). Be sure that the output
is correct, of course.
For the file names, replace <ID> by the actual number of the test.
For example, if your test ID is 47, then name the files test47.h and
test47.txt. And run 'make all TEST=test47' to generate test47.run.
The available instructions for a test are described at the top of test.c.