Skip to content
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

Apache httpd demo #6563

Merged
merged 12 commits into from
Sep 27, 2023
Merged

Apache httpd demo #6563

merged 12 commits into from
Sep 27, 2023

Conversation

lisaoverall
Copy link
Contributor

@lisaoverall lisaoverall commented Aug 18, 2023

Scripts included:

tdag_pairs.sh - takes a directory containing raw http requests, produces a directory results containing a subdirectory per request. Each subdirectory contains a compressed TDAG corresponding to the evaluation of that request by whatever instrumented parsers are in examples/httpd.
faw_tdag_pairs.sh - convenience for producing pairs of TDAGs corresponding to FAW http test cases. (Definitely understand if we don't want this under version control, but I've been using it to gather results for cluster analysis.)

Suggested testing:

cd /path/to/polytracker/examples/http/httpd
./example_httpd.sh /path/to/raw_http_request 56781

Expected result: produce raw_http_request.tdag, a TDAG corresponding to running raw_http_request through polytracker-instrumented httpd. On polytracker info --print-fd-headers raw_http_request.tdag, the socket header's server port will be 56781. (The port number is an optional argument and defaults to 80.)

cd /path/to/polytracker/examples/http
./faw_tdag_pairs.sh /path/to/FAW/test_files/http  

Expected result: produces directory results, containing subdirectories for each request in the FAW's http corpus. Each subdirectory contains two compressed TDAGs corresponding to running that request through polytracker-instrumented picohttpparser and httpd (with the server listening on port 80, and corresponding socket FD header in the TDAGs).

@lisaoverall lisaoverall marked this pull request as draft August 18, 2023 13:11
Comment on lines +17 to +18
TEST_CASE=$(basename "$file")
if [[ ! -d results/"$TEST_CASE" ]]; then
Copy link
Contributor Author

@lisaoverall lisaoverall Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I was working on the httpd harness initially, there were some test cases that didn't process correctly, and I added this to avoid having to reprocess everything. I retained this functionality here because it would be useful if one had already done an evaluation over an existing corpus, then expanded the corpus and wanted to evaluate new test cases under the existing set of parsers. However, if new parsers were added below, unless the test case subdirectory is deleted, the new parsers would not be evaluated over that test case.

@lisaoverall lisaoverall marked this pull request as ready for review September 13, 2023 21:43
@lisaoverall lisaoverall self-assigned this Sep 13, 2023
@ESultanik ESultanik merged commit 2ab952d into master Sep 27, 2023
8 checks passed
@ESultanik ESultanik deleted the loverall/httpd branch September 27, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants