-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Check std::system for -[alert|block|wallet]notify #15457
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
One way to test this is by following the iOs cross-compilation instructions in #12557:
Note that |
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.
Concept ACK. Could make runCommand noop instead of multiple guards?
ACK c0e9ac7 (checked that compiling without
This should be fine, since I don't expect anyone running the functional tests on ios) |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
@MarcoFalke looks like |
Concept ACK. Maybe those arguments should be added into |
|
@MarcoFalke agree |
I can imagine someone running the functional test suite on their machine against bitcoind on the sandboxed device. But that's likely going to require additional changes to the test framework, so perhaps that's a better time to design something like As for running the functional tests themselves from the device, that would also require modifications since the test framework relies on launching processes. I'm not a fan of turning |
👍 |
Concept ACK |
I can certainly see his being useful in sandboxed environments of various kinds. Vaguely remember a similar thing when trying to get bitcoind to work in CloudABI. |
3591467
to
d9255a1
Compare
Gitian builds for commit a094b54 (master):
Gitian builds for commit b2eb95b (master and this pull):
|
src/init.cpp
Outdated
@@ -576,6 +580,7 @@ std::string LicenseInfo() | |||
"\n"; | |||
} | |||
|
|||
#if defined(HAVE_STD__SYSTEM) || defined(WIN32) |
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 repeating this condition everywhere is error-prone. Can't we make sure HAVE_STD__SYSTEM
is always set when WIN32
instead?
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 changed it to check for either std::system
or ::wsystem
, so we can now use HAVE_SYSTEM
.
d9255a1
to
de0e729
Compare
d7d72a9
to
620c77e
Compare
I tested the Gitian build on Windows and I'm confused why My guess is that AppVeyor builds in a way that doesn't have ::wsystem available (e.g. Universal Windows Platform), which would cause |
@sipsorcery do you know how to run the functional tests on Windows? |
@Sjors yes I can run the functional tests on Windows. If you're alluding to why the appveyor check failed it's almost certainly due to the length of time it's taking rather than the functional test. That's assuming the test hasn't changed since I last checked it a week or so ago. Maybe AppVeyor would bump up the time limit from 60 to 90 minutes for Bitcoin Core if asked. |
Ok, it involved some manual work, but I'm able to run to functional tests now. [environment]
SRCDIR=C:\Users\sjors\bitcoin
BUILDDIR=C:\Users\sjors\bitcoin
EXEEXT=.exe
RPCAUTH=C:\Users\sjors\bitcoin\share\rpcauth\rpcauth.py
[components]
# Which components are enabled. These are commented out by `configure` if they were disabled when running config.
ENABLE_WALLET=true
ENABLE_CLI=true
ENABLE_BITCOIND=true
ENABLE_ZMQ=true� And you have copy the exe files: mv .\build_msvc\x64\Debug\*.exe .\src
By the way, it's complaining about the bitcoin unicode symbol: |
Powershell: $env:PYTHONUTF8=1 |
The test that fails is directly related to this PR and I've reproduced it on two separate AppVeyor builds (trying the 3rd one now). Bumping to 90 minutes would be great indeed, because whenever the cache is cleared, it only makes it halfway through the function tests. That happened here as well (but the error I'm seeing here was after a rebuild). |
That worked, thanks. It seems like sometimes I have to hit a key before the dots start / continue appearing for the test runner. I'm also missing some dependency for |
I managed to reproduce on my own MSVC setup; I forgot to checkout this branch :-) It turns out |
07dd553
to
77a5eb3
Compare
FWIW the disassembly of the |
Platforms such as iOs do not support launching a process through system().
77a5eb3
to
f874e14
Compare
code review ACK f874e14 |
f874e14 [build]: check std::system for -[alert|block|wallet]notify (Sjors Provoost) cc3ad56 [build] MSVC: set HAVE_SYSTEM for desktop apps (Sjors Provoost) c1c91bb [build] detect std::system or ::wsystem (Sjors Provoost) Pull request description: Platforms such as iOs and Universal Windows Platform do not support launching a process through system(). ACKs for top commit: laanwj: code review ACK f874e14 Tree-SHA512: 16bb4a8fa1896046ccb22a46c8985e1aa45f5b11ecf5539eb2299e9a58f1a5b085c0c12cb6939c7493d93abce7e84fadcbfc73374c887db63da6d00c08aa476d
During my rebase of #12557 I noticed this doesn't actually work as advertised. Created a followup #16344. I think it broke when I refactored from |
f874e14 [build]: check std::system for -[alert|block|wallet]notify (Sjors Provoost) cc3ad56 [build] MSVC: set HAVE_SYSTEM for desktop apps (Sjors Provoost) c1c91bb [build] detect std::system or ::wsystem (Sjors Provoost) Pull request description: Platforms such as iOs and Universal Windows Platform do not support launching a process through system(). ACKs for top commit: laanwj: code review ACK f874e14 Tree-SHA512: 16bb4a8fa1896046ccb22a46c8985e1aa45f5b11ecf5539eb2299e9a58f1a5b085c0c12cb6939c7493d93abce7e84fadcbfc73374c887db63da6d00c08aa476d
976b034 [build]: use #if HAVE_SYSTEM instead of defined(HAVE_SYSTEM) (Sjors Provoost) Pull request description: It seems that `AC_DEFINE([HAVE_SYSTEM], [HAVE_STD__SYSTEM || HAVE_WSYSTEM]` causes `HAVE_SYSTEM` to always be defined, so we need to use `#if HAVE_SYSTEM` instead of `#if defined(HAVE_SYSTEM)`. Followup for #15457, can be tested with #12557. ACKs for top commit: dongcarl: ACK 976b034. promag: ACK 976b034. fanquake: ACK 976b034 Tree-SHA512: b8cdd04c2ec399fd15638aef5d75ea0886ec1572d3cf4fcea27c193e1e6390344315908262cad8981a9b0a905ab9520619ce2ffe9a717f4ee6bfa8b028ebbdc6
Summary: f874e14cd3c84cd412bd3fb42b3ee1706ca6a267 [build]: check std::system for -[alert|block|wallet]notify (Sjors Provoost) cc3ad56ff2bc2583fe68c4a9e0b41072a47c0b07 [build] MSVC: set HAVE_SYSTEM for desktop apps (Sjors Provoost) c1c91bb78d7267f01ee3a3c156c218b46a92cd39 [build] detect std::system or ::wsystem (Sjors Provoost) Pull request description: Platforms such as iOs and Universal Windows Platform do not support launching a process through system(). https://github.com/bitcoin/bitcoin/pull/15457/files --- Backport of Core [[bitcoin/bitcoin#15457 | PR15457]] Test Plan: ninja check don't have a windows machine atm to test this on Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Subscribers: deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7031
f874e14 [build]: check std::system for -[alert|block|wallet]notify (Sjors Provoost) cc3ad56 [build] MSVC: set HAVE_SYSTEM for desktop apps (Sjors Provoost) c1c91bb [build] detect std::system or ::wsystem (Sjors Provoost) Pull request description: Platforms such as iOs and Universal Windows Platform do not support launching a process through system(). ACKs for top commit: laanwj: code review ACK f874e14 Tree-SHA512: 16bb4a8fa1896046ccb22a46c8985e1aa45f5b11ecf5539eb2299e9a58f1a5b085c0c12cb6939c7493d93abce7e84fadcbfc73374c887db63da6d00c08aa476d # Conflicts: # build_msvc/bitcoin_config.h # src/init.cpp # src/wallet/init.cpp
…VE_SYSTEM) 976b034 [build]: use #if HAVE_SYSTEM instead of defined(HAVE_SYSTEM) (Sjors Provoost) Pull request description: It seems that `AC_DEFINE([HAVE_SYSTEM], [HAVE_STD__SYSTEM || HAVE_WSYSTEM]` causes `HAVE_SYSTEM` to always be defined, so we need to use `#if HAVE_SYSTEM` instead of `#if defined(HAVE_SYSTEM)`. Followup for bitcoin#15457, can be tested with bitcoin#12557. ACKs for top commit: dongcarl: ACK bitcoin@976b034. promag: ACK 976b034. fanquake: ACK 976b034 Tree-SHA512: b8cdd04c2ec399fd15638aef5d75ea0886ec1572d3cf4fcea27c193e1e6390344315908262cad8981a9b0a905ab9520619ce2ffe9a717f4ee6bfa8b028ebbdc6 # Conflicts: # src/init.cpp
Platforms such as iOs and Universal Windows Platform do not support launching a process through system().