Skip to content

Adding patch for running unit tests from hostap/wpa_supplicant #245

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

padelsbach
Copy link

@padelsbach padelsbach commented May 27, 2025

@julek-wolfssl
Copy link
Member

How did you generate the patch?

@padelsbach
Copy link
Author

How did you generate the patch?

I made edits to the hostap project to get the tests to run, then captured it with git diff.

@padelsbach
Copy link
Author

padelsbach commented May 27, 2025

How did you generate the patch?

I made edits to the hostap project to get the tests to run, then captured it with git diff.

The patch contains large test vectors from this repo: https://github.com/pyca/cryptography.git

I could probably move those to the CI flow to reduce the size of the patch.

@padelsbach
Copy link
Author

I could probably move those to the CI flow to reduce the size of the patch.

Done. Much smaller patch now.

@julek-wolfssl
Copy link
Member

A lot of this looks like it would be solved with defining CONFIG_TLS=openssl in the hostapd configuration. Can you post the .config file?

@padelsbach
Copy link
Author

A lot of this looks like it would be solved with defining CONFIG_TLS=openssl in the hostapd configuration. Can you post the .config file?

The unit tests builds the internal hostapd crypto code as a library and then calls into it. So the top level builds which use the .config file are not used for the unit tests. My solution was to rip out anything that conflicted/duplicated openssl functions.

Maybe there is a cleaner way?

@julek-wolfssl
Copy link
Member

Please specify which unit tests exactly you're talking about.

@padelsbach
Copy link
Author

Please specify which unit tests exactly you're talking about.

They are under hostap/tests. I run them with make run-tests.

@julek-wolfssl
Copy link
Member

I see it. Unfortunately, those tests barely test anything. The directory tests/hwsim contain much better tests that test the entire stack. Message me if you need help setting that up.

@padelsbach
Copy link
Author

I see it. Unfortunately, those tests barely test anything. The directory tests/hwsim contain much better tests that test the entire stack. Message me if you need help setting that up.

Ok, I will take a look

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