-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add socket-related functions and wrappers, and a few other fixes. #2
base: master
Are you sure you want to change the base?
Conversation
…d by POSIX standard
(Including wrap_getpid.c which was absent) Minor changes to student_code.h
The original code only made the reading end of the pipe non-blocking, as it needs to empty the pipe after the sandbox. But, if the student's program actually writes a lot on the writing end of the pipe, the pipe will block and cause the program to timeout. It is better to actually report this error (too much output) rather than waiting for the task to end. In both cases, the output will be truncated and it will not pass the tests, as we may expect the problem author to not require the student to output more than 65536 bytes or so of data on stdout or on stderr.
…bypass the tests. Also, makes sure to have a less undefined behaviour if the student actually calls exit: it will predictably raise a SIGSEGV instead of randomly not crashing instantly.
Functions: socket, bind, connect, accept, listen, recv (and al), send (and al). Currently only supports statistics Also included: Some unit tests
Not well-tested, however
…ng on stdout and stderr
…use by wrap_file and wrap_socket
- Remove write-related functions from read_write (currently not needed). - Add to run_ci the possibility of executing a single test. - A few corrections in read_write (time.h, NULL, const etc). - Allow exit to be called normally when the sandbox is not running.
Among these were incoherence between nanoseconds, microseconds and milliseconds, bad type for intervals, and something else. Functionnalities added include the possibility to create a read_buffer_t from the tables of offsets and intervals, when the data is contigous.
The function allows to connect a UDP socket to a remote client. Also, a confusion has been fixed
Needs to be applied after read_write changes
- monitored.gai_strerror - memory leak when reset - missing implementations of setters of fai_report and check_fai - Fix simple_getaddrinfo so that it is more compliant to the true one - Add reset for all alternative methods
Sooo...
|
FINALY.
Note that in the process of adding LSINF1252, it became possible to test for multiple subdirectories in ci/, but there may be some uncovered bugs. |
Great! I don't know much about CTester itself, so I can't review every line of code you wrote, but the tests output give some confidence on the fact that nothing broke. I think having the CI testing other courses from this repository is not the best option though. Don't get me wrong, having a CI testing a course is nice but it should not be CTester's CI. I think this repository should only contain self-contained tests, such as the ones you also added. |
|
||
before_install: | ||
- sudo apt-get install libcunit1 libcunit1-dev | ||
- pip3 install git+https://github.com/Maxmawt/INGInious # Until UCL-INGI/INGInious has fixed his part ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed ? Could you refer to a specific issue we should track on the INGInious repository ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was #414, but I don't know if it has been fixed since then. I'll check.
This contains a lot of fixes and additions to CTester: