-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Try to get firebird working on linux x32 CI #16113
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
Conversation
@SakiTakamachi I'm trying to get 32-bit Linux CI to run Firebird. I added a service container and the necessary configuration, but the tests fail with |
Maybe @KentarouTakeda can help? |
.github/workflows/push.yml
Outdated
@@ -146,6 +146,10 @@ jobs: | |||
MYSQL_TEST_HOST: mysql | |||
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test | |||
PDO_MYSQL_TEST_HOST: mysql | |||
PDO_FIREBIRD_TEST_DATABASE: test.fdb | |||
PDO_FIREBIRD_TEST_DSN: firebird:dbname=localhost:test.fdb |
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.
@nielsdos
maybe
PDO_FIREBIRD_TEST_DSN: firebird:dbname=localhost:test.fdb | |
PDO_FIREBIRD_TEST_DSN: firebird:dbname=firebird:test.fdb |
edit:
Looking at the mysql DSN above, it appears that the 32-bit CI specifies the service name rather than "localhost".
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.
I think @SakiTakamachi is right. It's because of this line.
php-src/.github/workflows/push.yml
Lines 143 to 144 in d8cee06
container: | |
image: ubuntu:20.04 |
- x64: Tests are run directly on the host specified in
runs-on
- x32: A
ubuntu:20.04
container is created inside theruns-on
host, and tests are run inside it.
I tried to run x32 tests directly in the runs-on container, but it seems very difficult.
So it seems best to fix it the way Saki says. In that case, please note that actions/test-linux and x64 tests will also need some adjustments.
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.
Most of the tests passed in my fork.
However, some tests failed because they were written to reference ::1
. I don't know how to fix these yet. I created a pull request to fix this: #16115
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.
Good finds! I missed this nuance completely, I'll import your commit. Thanks a lot @KentarouTakeda and @SakiTakamachi
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.
Looks good to me
Ah, sorry, I mistook it for another PR.
da6745f
to
6930a36
Compare
All but two tests succeeded:
|
Regarding the first test: First, the data type is different because it's probably a bigint type.
Since can't represent a 64 bit number in 32 bits, it will probably be a character. Also, null is passed to the not null column, but in this test, a sequence is prepared for when null is passed to the id, so no error occurs and the id is completed. The same is true for mysql's autoincrement, but there is a function that automatically completes by passing null to a not null column, so it is not necessarily impossible to pass null to a not null column. |
@SakiTakamachi I see, thanks for clarifying and I'll also change the test code to use "int" instead of "bigint". |
I can basically reproduce this on Windows x86 ZTS. After a minute, the test times out, reporting:
The warning is due to I'll look into this. Oh, actually, the test apparently always fails for me (x64, NTS, too). |
Well, should not build against v4 and run against v3. Anyhow, it looks like the test does not test what it is supposed to, as of PHP 8.4 or when pdo_firebird is built against the v4 API. While it reaches php-src/ext/pdo_firebird/firebird_driver.c Line 1253 in d7a37cc
the callback is never called (albeit the test might succeed): php-src/ext/pdo_firebird/firebird_driver.c Lines 1198 to 1208 in d7a37cc
So the test is badly written, since it should not succeed if it doesn't test what it is supposed to test, and it should be more malleable (like the new MySQL Fake Server). but given that the documentation about the Firebird wire protocol is apparently sparse, one would need to read the implementation, sniff the network and what not. Especially for this test it might not be worth the trouble (the bug was about using |
f6df37a
to
352249c
Compare
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
PR broke, it's stuck on "updating". |
Replacement: #17045 |
I'll clean up the history upon merging.