-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
tests: ensure libcurl.def
contains all exports
#11570
Conversation
10d2134
to
58d5a67
Compare
I'd preferred using |
That seems reasonable. |
Updated the Perl script to use raw symbol names, added websockets functions, then reused it from the GHA task. |
Hm, on second thoughts. Couldn't perhaps test 1135 get extended to do this check as well or something? It would be nice if we could detect this problem locally already when working on a new thing. |
Forgot about the local aspect, but indeed, this would be useful. I just have idea how to implement it there. Would need to sort results, insert |
Gave it a try, terrible Perl practices beware. Having symbols sorted isn't strictly necessary (and might even be a bad thing if DLL users rely on export ordinals, though I don't think anyone would do that on Windows specifically). With UPDATE: I've updated the logic to omit sorting, this allowed to integrate the
|
5755fea
to
58493df
Compare
libcurl.def
matches exports from headerslibcurl.def
contains all exports
On a related note, could this be used in a similar way to ensure the OS/400
curl.inc.in file isn't missing anything? Maybe not *anything* but at least the
public functions?
|
@dfandrich Seems doable, it'd need a parser that extracts those extern symbols from There is also a |
`CURL_EXTERN` extractor code copied from curl-for-win. https://github.com/curl/curl-for-win/blob/3071676b3ea0847aa4f3e8f8a8801432aaab023d/curl-gnumake.sh#L89-L102 Follow-up to 2ebc74c Closes #xxxxx
As a consequence, change libcurl.def to use a non-sorted list of exports. It's less tidy, but more compatible and attempts to keep the original intent of this test to keep VMS and OS/400 happy by not changing symbol order and always append new items. I'm not quite sure how this works in practice, as the order of the headers checked is fixed, so say a new easy API cannot be added to the end of the whole list. I might be missing something. We may or may not want to move this comment from test1135 to libcurl.def itself: ``` ; The VMS and OS/400 builds extract the CURL_EXTERN protos and use in ; the build. We break binary compatibility by changing order. Only add ; new entries last or bump the SONAME. ```
This fixes finding the external file.
86dffaf
to
1571af7
Compare
Settling on a version that keeps The next issue is that |
70e1a4e
to
b39b290
Compare
@@ -608,7 +608,7 @@ have a text/binary difference. | |||
If `nonewline` is set, we will cut off the trailing newline of this given data | |||
before comparing with the one actually received by the client | |||
|
|||
### `<stdout [mode="text"] [nonewline="yes"] [crlf="yes"]>` | |||
### `<stdout [mode="text"] [nonewline="yes"] [crlf="yes"] [loadfile="filename"]>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this was a cool idea. Me like!
Add `test1279` to verify that `libcurl.def` lists all exported API functions found in libcurl headers. Also: - extend test suite XML `stdout` tag with the `loadfile` attribute. - fix `tests/extern-scan.pl` and `test1135` to include websocket API. - use all headers (sorted) in `test1135` instead of a manual list. - add options `--sort`, `--heading=` to `tests/extern-scan.pl`. - add `libcurl.def` to the auto-labeler GHA task. Follow-up to 2ebc74c Closes curl#11570
Add
test1279
to verify thatlibcurl.def
lists all exported APIfunctions found in libcurl headers.
Also:
extend test suite XML
stdout
tag with theloadfile
attribute.fix
tests/extern-scan.pl
andtest1135
to include websocket API.use all headers (sorted) in
test1135
instead of a manual list.add options
--sort
,--heading=
totests/extern-scan.pl
.add
libcurl.def
to the auto-labeler GHA task.Follow-up to 2ebc74c
Closes #11570