Skip to content
Extraits de code Groupes Projets
Valider 6d781281 rédigé par Samuel de Meester de Ravestein's avatar Samuel de Meester de Ravestein
Parcourir les fichiers

better names for tests dir

parent 972a7a7c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 213 ajouts et 9 suppressions
*.o
.vscode/
unwanted_logs/
test_logs/
log_files/
*.zip
linksimulator/
......
......@@ -9,13 +9,13 @@ FILENAME=$1
BASENAME=$(basename $FILENAME)
BSN_PRE="${BASENAME%.*}"
BSN_EXT="${BASENAME##*.}"
TEST_OUTPUT_FILES="unwanted_logs/advanced_tests/${BSN_PRE}"
TEST_OUTPUT_FILES="tests_logs/advanced_tests/${BSN_PRE}"
GREEN='\033[0;32m'
NC='\033[0m'
# If the directory does not exist, we create it
if [ ! -d "unwanted_logs/advanced_tests/" ]; then
mkdir 'unwanted_logs/advanced_tests/' 2>/dev/null
if [ ! -d "tests_logs/advanced_tests/" ]; then
mkdir 'tests_logs/advanced_tests/' 2>/dev/null
fi
mkdir "${TEST_OUTPUT_FILES}/" 2>/dev/null
......
......@@ -2,10 +2,17 @@
# Note that this assumes to be called from the Makefile, you may want to adapt it.
FILESIZE=""
TEST_FILES_DIR=./test_files/
TEST_FILES_DIR=./tests_files/
if [ ! -d ./tests_logs/ ]; then
mkdir ./tests_logs
fi
# Remove everything
rm -rf ./unwanted_logs/*
rm -rf ./tests_logs/*
if [ -d ./unwanted_logs/ ]; then
rm -rdf ./unwanted_logs
fi
# We want our tests to always use valgrind
#echo -e "\nStarting simple tests ...\n"
......
......@@ -9,13 +9,13 @@ FILENAME=$1
BASENAME=$(basename $FILENAME)
BSNM_PRE="${BASENAME%.*}"
BSNM_EXT="${BASENAME##*.}"
TEST_OUTPUT_FILES="unwanted_logs/simple_tests/${BSNM_PRE}"
TEST_OUTPUT_FILES="tests_logs/simple_tests/${BSNM_PRE}"
GREEN='\033[0;32m'
NC='\033[0m'
# If the directory does not exist, we create it
if [ ! -d "unwanted_logs/simple_tests/" ]; then
mkdir 'unwanted_logs/simple_tests/' 2>/dev/null
if [ ! -d "tests_logs/simple_tests/" ]; then
mkdir 'tests_logs/simple_tests/' 2>/dev/null
fi
mkdir "${TEST_OUTPUT_FILES}/" 2>/dev/null
......
Fichier déplacé
Fichier déplacé
Fichier déplacé
Fichier déplacé
Fichier déplacé
@@ Using random seed: 1650024411
@@ Using parameters:
.. port: 65134
.. forward_port: 65164
.. delay: 0
.. jitter: 0
.. err_rate: 20
.. cut_rate: 30
.. loss_rate: 25
.. seed: 1650024411
.. link_direction: Forward
@@ Remote host is ::1 [40279]
[SEQ 0] Sent packet (Forward).
[SEQ 1] Sent packet (Reverse).
[SEQ 1] Sent packet (Forward).
[SEQ 2] Sent packet (Reverse).
Hello World!
\ No newline at end of file
[DEBUG] Receiver has following arguments: stats_filename is tests_logs/advanced_tests/greeting/greeting_receiver_stats.csv, listen_ip is ::1, listen_port is 65164
[DEBUG] Successfully bound to IPv6 address : 0000:0000:0000:0000:0000:0000:0000:0001, port : 65164
[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65134
[DEBUG] Received data packet seqnum 0 with timestamp 984824098 | current_window_size : 31, current_window_start : 0
[DEBUG] Sent ACK saying we are waiting for 1, timestamp 0
[DEBUG] Received data packet seqnum 1 with timestamp 0 | current_window_size : 30, current_window_start : 0
[DEBUG] Going to consume the next 2 packets.
[DEBUG] Consuming packet : 0 | curr_recv_window = 29, recv_window_start = 0
[DEBUG] Consuming packet : 1 | curr_recv_window = 30, recv_window_start = 1
[DEBUG] Received the last packet
[DEBUG] Sent ACK saying we are waiting for 2, timestamp 0
[DEBUG] Done the transfer with done status being true
[DEBUG] Wrote the transfer statistics to tests_logs/advanced_tests/greeting/greeting_receiver_stats.csv.
[DEBUG] Sender has following arguments:
filename is ./test_files//greeting.txt,
stats_filename is tests_logs/advanced_tests/greeting/greeting_sender_stats.csv,
fec_enabled is 0,
receiver_ip is ::1,
receiver_port is 65134
[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65134
[DEBUG] The sender will send a pkt on the socket, the current sender window size is: 31 | receiver window size: 1
[DEBUG] The LAST PTYPE_DATA is being sent !
[DEBUG] Sending the pkt with seqnum: 0
[DEBUG] The sender is reading from the socket.
[DEBUG] The ACK with the seqnum: 1 has been received
[DEBUG] The sender is cumulatively acknowledging [0 : 1[ (place in the buffer) | [0, 1[ (seqnum)
[DEBUG] The sender will send a pkt on the socket, the current sender window size is: 31 | receiver window size: 30
[DEBUG] The CLOSING pkt is being sent !
[DEBUG] Sending the pkt with seqnum: 1
[DEBUG] A timer of -> 30000ms <- has started after sending the last FEC pkt !
[DEBUG] The sender is reading from the socket.
[DEBUG] The ACK with the seqnum: 2 has been received
[DEBUG] The sender is cumulatively acknowledging [1 : 2[ (place in the buffer) | [1, 2[ (seqnum)
[DEBUG] Sender disconnected
[DEBUG] Wrote the transfer statistics to tests_logs/advanced_tests/greeting/greeting_sender_stats.csv.
==14844== Memcheck, a memory error detector
==14844== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==14844== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==14844== Command: ./receiver ::1 65164 -s tests_logs/advanced_tests/greeting/greeting_receiver_stats.csv
==14844== Parent PID: 14814
==14844==
==14844==
==14844== HEAP SUMMARY:
==14844== in use at exit: 120 bytes in 1 blocks
==14844== total heap usage: 13 allocs, 12 frees, 9,826 bytes allocated
==14844==
==14844== 120 bytes in 1 blocks are definitely lost in loss record 1 of 1
==14844== at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==14844== by 0x10BD7F: state_new (in /mnt/datalinux/Documents/BAC-SINF/bac3/Q2/reseaux/projet/project_trtp/receiver)
==14844== by 0x10BEBB: receiver_read_write_loop (in /mnt/datalinux/Documents/BAC-SINF/bac3/Q2/reseaux/projet/project_trtp/receiver)
==14844== by 0x10953D: main (in /mnt/datalinux/Documents/BAC-SINF/bac3/Q2/reseaux/projet/project_trtp/receiver)
==14844==
==14844== LEAK SUMMARY:
==14844== definitely lost: 120 bytes in 1 blocks
==14844== indirectly lost: 0 bytes in 0 blocks
==14844== possibly lost: 0 bytes in 0 blocks
==14844== still reachable: 0 bytes in 0 blocks
==14844== suppressed: 0 bytes in 0 blocks
==14844==
==14844== For lists of detected and suppressed errors, rerun with: -s
==14844== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==14845== Memcheck, a memory error detector
==14845== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==14845== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==14845== Command: ./sender -f ./test_files//greeting.txt ::1 65134 -s tests_logs/advanced_tests/greeting/greeting_sender_stats.csv
==14845== Parent PID: 14814
==14845==
==14845==
==14845== HEAP SUMMARY:
==14845== in use at exit: 0 bytes in 0 blocks
==14845== total heap usage: 9 allocs, 9 frees, 3,864 bytes allocated
==14845==
==14845== All heap blocks were freed -- no leaks are possible
==14845==
==14845== For lists of detected and suppressed errors, rerun with: -s
==14845== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
data_sent:0
data_received:2
data_truncated_received:0
fec_sent:0
fec_received:0
ack_sent:2
ack_received:0
nack_received:0
packet_ignored:0
packet_duplicated:0
packet_recovered:0
data_sent:2
data_received:0
data_truncated_received:0
fec_sent:0
fec_received:0
ack_sent:0
ack_received:2
nack_received:0
packet_ignored:0
min_rtt:7
max_rtt:14
packet_retransmitted:0
@@ Using random seed: 1650024417
@@ Using parameters:
.. port: 65164
.. forward_port: 65114
.. delay: 0
.. jitter: 0
.. err_rate: 20
.. cut_rate: 30
.. loss_rate: 25
.. seed: 1650024417
.. link_direction: Forward
@@ Remote host is ::1 [53917]
[SEQ 0] Corrupting packet: inverted byte #275
[SEQ 0] Sent packet (Forward).
[SEQ 0] Sent packet (Forward).
[SEQ 1] Sent packet (Reverse).
[SEQ 1] Sent packet (Forward).
[SEQ 2] Sent packet (Reverse).
[SEQ 2] Dropping packet
[SEQ 2] Corrupting packet: inverted byte #426
[SEQ 2] Sent packet (Forward).
[SEQ 2] Sent packet (Forward).
[SEQ 3] Sent packet (Reverse).
[SEQ 3] Corrupting packet: inverted byte #1
[SEQ 3] Sent packet (Forward).
[SEQ 3] Dropping packet
[SEQ 3] Sent packet (Forward).
[SEQ 4] Sent packet (Reverse).
Hello I'm a good friend, I've seen that you are writing a protocol named TRTP.
How is it going ? Hard ? Good for you. See life is full of hard things just like your
network course. But when you manage to thrive throgh tough times then sweet things are
ahead. So good luck have a nice day of testing and remember : Tough Times Never Last.
PS: Drink a beer when you pass the test. Share your knowledge to others, computer
science isn't a field for selfishness. If you want to switch to Law, Economy, some shit
Hi Vany I love reading from you. As you know I'm working sometime a bit late in the night.
In a few hour you'll be in the famous "Salle Intel" to be really productive as you are.
Best regards,
Samuel
Sorry to be lazy but I'll past down what is above
Hello I'm a good friend, I've seen that you are writing a protocol named TRTP.
How is it going ? Hard ? Good for you. See life is full of hard things just like your
network course. But when you manage to thrive throgh tough times then sweet things are
ahead. So good luck have a nice day of testing and remember : Tough Times Never Last.
PS: Drink a beer when you pass the test. Share your knowledge to others, computer
science isn't a field for selfishness. If you want to switch to Law, Economy, some shit
Hi Vany I love reading from you. As you know I'm working sometime a bit late in the night.
In a few hour you'll be in the famous "Salle Intel" to be really productive as you are.
Best regards,
Samuel
[DEBUG] Receiver has following arguments: stats_filename is tests_logs/advanced_tests/long_message/long_message_receiver_stats.csv, listen_ip is ::1, listen_port is 65114
[DEBUG] Successfully bound to IPv6 address : 0000:0000:0000:0000:0000:0000:0000:0001, port : 65114
[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65164
[DEBUG] Received a damaged packet with 4 status. and seqnum as 0
[DEBUG] Received data packet seqnum 0 with timestamp 0 | current_window_size : 31, current_window_start : 0
[DEBUG] Sent ACK saying we are waiting for 1, timestamp 0
[DEBUG] Received data packet seqnum 1 with timestamp 0 | current_window_size : 30, current_window_start : 0
[DEBUG] Sent ACK saying we are waiting for 2, timestamp 0
[DEBUG] Received a damaged packet with 4 status. and seqnum as 0
[DEBUG] Received data packet seqnum 2 with timestamp 984824098 | current_window_size : 29, current_window_start : 0
[DEBUG] Sent ACK saying we are waiting for 3, timestamp 0
[DEBUG] Received a damaged packet with 3 status. and seqnum as 0
[DEBUG] Received data packet seqnum 3 with timestamp 0 | current_window_size : 28, current_window_start : 0
[DEBUG] Going to consume the next 4 packets.
[DEBUG] Consuming packet : 0 | curr_recv_window = 27, recv_window_start = 0
[DEBUG] Consuming packet : 1 | curr_recv_window = 28, recv_window_start = 1
[DEBUG] Consuming packet : 2 | curr_recv_window = 29, recv_window_start = 2
[DEBUG] Consuming packet : 3 | curr_recv_window = 30, recv_window_start = 3
[DEBUG] Received the last packet
[DEBUG] Sent ACK saying we are waiting for 4, timestamp 0
[DEBUG] Done the transfer with done status being true
[DEBUG] Wrote the transfer statistics to tests_logs/advanced_tests/long_message/long_message_receiver_stats.csv.
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter