-
Notifications
You must be signed in to change notification settings - Fork 38.1k
Experiment: test: Disable fsync in travis tests #10220
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
Install the package "eatmydata" which disables fsync and friends, and use this while running the functional tests. Not sure whether it applies to travis, but at least locally on a VM this made some of the tests run three times as fast.
.travis.yml
Outdated
| - HOST=x86_64-unknown-linux-gnu PACKAGES="bc python3-zmq eatmydata" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS=-DDEBUG_LOCKORDER" | ||
| # No wallet | ||
| - HOST=x86_64-unknown-linux-gnu PACKAGES="python3 xvfb" DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports" | ||
| - HOST=x86_64-unknown-linux-gnu PACKAGES="python3 xvfb eatmydata" DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports" |
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.
functional tests are disabled for windows and no_wallet, so I don't think we need this here.
You probably did this for consistency/simpler code.
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.
My intent was to add it for all the lines that have RUN_TESTS=true
|
As we ignore the return code of Edit: The comparison is wrong. I accidentally compared a CRON job against this pull request, where this pull runs a subset of the tests of a cron job. |
I don't think so. It does remind me that we could use the same technique (library interposing) to inject failures for testing to test how bitcoind handles i/o failures. |
|
Argh, it fails on 32-bit linux: |
Apparently on trusty there is no separate package for the library yet.
|
I can't get it to work on 32-bit: not with 32-bit and not with 64-bit The problem, I think, is that python runs as 64-bit, and bitcoind as 32-bit. So with the 64-bit Not sure what would be a good way to fix this. I suppose a hack that sets the environment variable BITCOIND so that only bitcoind is started through Edit: BITCOIND="eatmydata $PWD/src/bitcoind" doesn't work, at least. This would need an actual wrapper script. |
|
Hm another idea, instead of using the wrapper/interposer, which seems to be tricky on mixed architctures, couldn't we just link bitcoind against 16.04 (just for illustration): 14.04 (which is what travis uses): |
|
With the wrapper most works, but it still fails in Sigh... |
The only process I can think of that This causes bitcoind to launch a thread to run echo when it detects blocks signalling unknown versionbits. |
Get rid of the wrapper and link directly against the library instead.
I've tried this locally with some success, but not entirely sure how to port it to travis. Trying... |
|
Oh wow that worked. But seems @MarcoFalke 's comparison was mistaken and this doesn't actually make a difference so closing... |
|
@laanwj Sorry for my confirmation bias. On a first glance those numbers seemed perfectly plausible. |
|
Yes it would have been plausible; apparently Travis isn't using qemu/kvm or has already configured their VMs to not pass through fsync. |
Install the package "eatmydata" which disables fsync and friends, and use this while running the functional tests.
Not sure whether it applies to travis, but at least locally on a VM this made some of the tests run three times as fast.