osp icon indicating copy to clipboard operation
osp copied to clipboard

Adding patch for running unit tests from hostap/wpa_supplicant

Open padelsbach opened this issue 7 months ago • 13 comments

OSP patch prerequisite for https://github.com/wolfSSL/wolfProvider/pull/148/checks

padelsbach avatar May 27 '25 04:05 padelsbach

How did you generate the patch?

julek-wolfssl avatar May 27 '25 15:05 julek-wolfssl

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 avatar May 27 '25 15:05 padelsbach

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 avatar May 27 '25 16:05 padelsbach

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

Done. Much smaller patch now.

padelsbach avatar May 27 '25 16:05 padelsbach

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?

julek-wolfssl avatar May 27 '25 17:05 julek-wolfssl

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?

padelsbach avatar May 27 '25 23:05 padelsbach

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

julek-wolfssl avatar May 27 '25 23:05 julek-wolfssl

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

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

padelsbach avatar May 28 '25 00:05 padelsbach

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.

julek-wolfssl avatar May 28 '25 09:05 julek-wolfssl

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

padelsbach avatar May 28 '25 16:05 padelsbach

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

@julek-wolfssl I am still working on the hwsim as a background task. In the meantime, can we move forward with this one?

padelsbach avatar Jun 09 '25 20:06 padelsbach

@julek-wolfssl I am still working on the hwsim as a background task. In the meantime, can we move forward with this one?

@julek-wolfssl, any issues with proceeding with this PR?

padelsbach avatar Jun 17 '25 17:06 padelsbach

@ColtonWilley was going to work with you regarding hostap. Pleased coordinate with him now.

julek-wolfssl avatar Jun 17 '25 18:06 julek-wolfssl