forked from Zashas/CTester
-
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
Open
Jimvy
wants to merge
54
commits into
UCL-INGI:master
Choose a base branch
from
Jimvy:v2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
e8b90ab
Various corrections
Jimvy 4bf0af0
Some corrections
Jimvy 47b55fd
Adding (hopefully sufficient) .gitignore
Jimvy ca308e6
Replacing getpagesize() by getconf(_SC_PAGESIZE), which is recommande…
Jimvy 39dbe6e
Adding include guards to prevent multiple inclusions
Jimvy 65736a7
Updating Makefile to include all C source in CTester/
Jimvy 4c2abc5
Prevent SIGFPE from breaking the sandbox and the tests
Jimvy 01ecaba
Applying non-blocking write to pipe_stdout/pipe_stderr
Jimvy be4ef7a
Removes temporarily the possibility for the student to call exit and …
Jimvy 12258c9
Updating Makefile
Jimvy 43ade11
Fixes unused parameters and shadowed declaration of variable i
Jimvy 482e2f5
First version of DNS-related function wrappers
Jimvy 633320d
Update to DNS functions; it seems to work
Jimvy 29a4a70
Updating Makefile
Jimvy a19e302
Wrapper functions for socket and related functions
Jimvy 13d65e9
Make CTester compile on CentOS
Jimvy 98c3073
Add select, poll and byte-order functions
Jimvy 3ec71e5
Add delayed chunks to recv
Jimvy 1a321cd
Update run file to allow copying CTester from a external folder
Jimvy 8df0a72
Add fstdout and fstderr to allow tests to bypass the pipes when writi…
Jimvy f99a7ae
Reorganizing code of read and recv buffering and partial return, for …
Jimvy 60a83ea
Add utility functions for inet and sockets
Jimvy b279f35
Renaming (well, copying) test_network_dns ro test_network_gai_simple_…
Jimvy f2c46e8
Fix broken ci
Jimvy 2b7d4d9
Add UDP support to util_sockets and fix a few errors
Jimvy 3685984
Add tests, clean up read_write, and fix a few bugs
Jimvy 027afe5
Add more unit test, a few features and fix bugs detected by these
Jimvy b0915a3
Remove write_buffer_t, as it is not yet available nor used
Jimvy df4d54e
Add reinit_network_inet_stats
Jimvy 7e0faab
Add reinit_file_stats
Jimvy 73d4fb7
Rename set_read_buffer and add reinit functions for all stats and all…
Jimvy 6b1c968
Small fix to run file
Jimvy 6fbb737
Fix to run file: by default, do not give a sucess status if score is …
Jimvy 7633453
Remove useless fprintf
Jimvy 43c23a3
Add functions to get the number of bytes read from read_buffer
Jimvy d34f371
Correcting a few bugs by Valgrind and add a new function to utils-socket
Jimvy 492e131
Merge branch 'master' of github.com:UCL-INGI/CTester
Jimvy fa5ba4a
Preparing the PR
Jimvy acc0d8e
Update gitignore
Jimvy 49e4e20
CTester.c: fix missing cleanup of read_write
Jimvy 8508162
Add real tests for DNS
Jimvy fb12d77
Fix bugs in DNS wrappers
Jimvy eddc70a
Fix bug in sockets + member name changes for ptr arguments
Jimvy 8fa48fd
Add init, cleanup methods for all mutex wrappers
Jimvy 2d4d4f0
Move fd_is_read_buffered + clean whitespace
Jimvy 080cc6f
Add support for autotest (attempt)
Jimvy 75be8f1
Removing -pedantic as it clashes with RUN's void* and arithmetic
Jimvy c82b71a
When copying CTester, don't overwrite existing files
Jimvy 7ddb2f6
Add documentation in source files, and license headers. Should be split.
Jimvy 1642bbb
Add Sphinx documentation
Jimvy ac11fb2
Fix: copy CTester from /CTester alias /course/common/CTester/
Jimvy 6d9d6f2
Add testing of compatibility with LSINF1252
Jimvy b1b229c
Fix Travis
Jimvy 98ee571
Fix Travis, again
Jimvy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Object files | ||
*.o | ||
*.ko | ||
*.obj | ||
*.elf | ||
|
||
# Linker output | ||
*.ilk | ||
*.map | ||
*.exp | ||
|
||
# Precompiled headers | ||
*.gch | ||
*.pch | ||
|
||
# Libraries | ||
*.a | ||
*.lib | ||
*.la | ||
*.lo | ||
|
||
# Shared objects | ||
*.so | ||
*.dll | ||
*.so.* | ||
*.dylib | ||
|
||
# Executables | ||
*.exe | ||
*.com | ||
*.app | ||
|
||
# Debug files | ||
*.dSYM/ | ||
*.su | ||
*.idb | ||
*.pdb | ||
|
||
# Vi/Vim | ||
*.vim | ||
|
||
# Emacs | ||
*~ | ||
\#*\# | ||
.\#* | ||
|
||
# VS Code | ||
.vscode/ | ||
|
||
# vi | ||
[._]*.s[a-v][a-z] | ||
[._]*.sw[a-p] | ||
[._]s[a-rt-v][a-z] | ||
[._]ss[a-gi-z] | ||
[._]sw[a-p] | ||
|
||
# macOS/Windows | ||
*.DS_Store | ||
._* | ||
Thumbs.db | ||
*.lnk | ||
|
||
# Files specific to this project | ||
student/results.txt | ||
student/tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
language: c | ||
language: python | ||
|
||
python: | ||
- '3.6' | ||
|
||
services: | ||
- mongodb | ||
- docker | ||
|
||
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 ;-) | ||
- docker pull ingi/inginious-c-base | ||
- docker pull ingi/inginious-c-default | ||
- docker pull ingi/inginious-c-cpp | ||
- docker pull ingi/inginious-c-pyjavacpp | ||
|
||
script: ci/run_ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Assume we're in the correct directory | ||
|
||
case $1 in | ||
init) | ||
echo "Git clone" | ||
git clone https://github.com/UCL-INGI/LSINF1252.git | ||
;; | ||
before_autotest) | ||
echo "Before autotest" | ||
# Patch the advanced_queue task's run file | ||
sed -i '/ret = run/i \ \ \ \ subprocess.run(shlex.split("sed -i '"'"'s|\\$(sort \\$(wildcard \\*\\.c))|$(wildcard *.c)|'"'"' student/Makefile"))' advanced_queue/run && echo -e 'Patched advanced_queue' | ||
# cp $2/LSINF1252_advanced_queue_run ./advanced_queue/run | ||
# Patch the three tasks with test submissions to remove the | ||
# "no-use-fifty" option | ||
for i in advanced_queue order_relation_linked_list strcpy; | ||
do | ||
sed -i 's/--no-use-fifty//' $i/run && echo -e 'Patched' $i | ||
done | ||
;; | ||
esac | ||
|
||
# That's all | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.