tests: ensure libcurl.def contains all exports#11570
tests: ensure libcurl.def contains all exports#11570vszakats wants to merge 15 commits intocurl:masterfrom
libcurl.def contains all exports#11570Conversation
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
| 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.
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
test1279to verify thatlibcurl.deflists all exported APIfunctions found in libcurl headers.
Also:
extend test suite XML
stdouttag with theloadfileattribute.fix
tests/extern-scan.plandtest1135to include websocket API.use all headers (sorted) in
test1135instead of a manual list.add options
--sort,--heading=totests/extern-scan.pl.add
libcurl.defto the auto-labeler GHA task.Follow-up to 2ebc74c
Closes #11570