Send Multiple Packets per Connection for testing A5#25
Send Multiple Packets per Connection for testing A5#25DeekshithPatil wants to merge 6 commits intomasterfrom
Conversation
test/assignment5/sockettest.sh
Outdated
| # @param1 : The string to send | ||
| # @param2 : The previous compare file | ||
| # Returns if the test passes, exits with error if the test fails. | ||
| function test_send_multiple_packets |
There was a problem hiding this comment.
@DeekshithPatil I'd like to avoid duplicating logic here. Can we modify the send string function to support sending more than one string if it doesn't support this already? I think you might be able to just specify newlines in the argument. Did you try this?
| @@ -0,0 +1,4 @@ | |||
| first packet | |||
| 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 | |||
| third packet | |||
There was a problem hiding this comment.
@DeekshithPatil I'd like to avoid adding another file... either just use newline in the string you send (ideally) or a heredoc in the shell script.
test/assignment5/sockettest.sh
Outdated
|
|
||
| sendstring=`cat multiple_packets.txt` | ||
|
|
||
| test_send_multiple_packets "${sendstring}" "${comparefile}" |
There was a problem hiding this comment.
@DeekshithPatil probably have a rogue /t tab character here. Try deleting to the beginning of the line and replacing with spaces instead of tabs.
| fi | ||
|
|
||
| if [ "$multi_line_string_test" = true ]; then | ||
| echo "Sending Multiple packets from multiple_packets.txt file" |
There was a problem hiding this comment.
@DeekshithPatil I think this should no longer reference multiple_packets.txt file?
| if [ "$multi_line_string_test" = true ]; then | ||
| echo "Sending Multiple packets from multiple_packets.txt file" | ||
|
|
||
| sendstring=$multi_line_string |
There was a problem hiding this comment.
@DeekshithPatil I think you can drop this line and just pass multi_line_string as the first argument in the next line.
No description provided.