Skip to content
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

Add a disabled builder for aarch64 emulated tests #43226

Merged
merged 1 commit into from
Jul 26, 2017

Conversation

alexcrichton
Copy link
Member

This commit adds a disabled builder which will run all tests for the standard
library for aarch64 in a QEMU instance. Once we get enough capacity to run this
on Travis this can be used to boost our platform coverage of AArch64

@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

src/ci/shared.sh Outdated
@@ -15,6 +15,12 @@

# See http://unix.stackexchange.com/questions/82598
function retry {
# Only do retries on CI, locally they shouldn't really be necessary
if [ -z "$TRAVIS$APPVEYOR" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis complains about AppVeyor here 😄

[00:00:00] /home/travis/build/rust-lang/rust/src/ci/shared.sh: line 19: APPVEYOR: unbound variable

You should be able to just check $CI, this is defined on both Travis and AppVeyor. This might need to be manually passed to the Docker instances though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternate to avoid unbound variable issues: "${TRAVIS:-}${APPVEYOR:-}", though it's possible using $CI would be cleaner.

.arg("-kernel").arg("/tmp/zImage")
.arg("-initrd").arg(&rootfs_img)
.arg("-dtb").arg("/tmp/vexpress-v2p-ca15-tc1.dtb")
.arg("-append").arg("console=ttyAMA0 root=/dev/ram rdinit=/sbin/init init=/sbin/init")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tidy check (x86_64-unknown-linux-gnu)
[00:03:20] tidy error: /checkout/src/tools/remote-test-client/src/main.rs:157: line longer than 100 chars
[00:03:20] tidy error: /checkout/src/tools/remote-test-client/src/main.rs:169: line longer than 100 chars
[00:03:21] some tidy checks failed

@shepmaster shepmaster added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 14, 2017
src/ci/shared.sh Outdated
"$@"
return
fi

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, the $CI environment variable is not exported inside docker (https://github.com/rust-lang/rust/blob/4bd27fc/src/ci/docker/run.sh#L70-L87) so this will disable retries for any docker builds.

That aside, I'm reluctant to give users a different experience to what we work with in CI.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to expand on my reluctance - one reason we do CI is so we know other people can build it correctly. I can imagine myself getting frustrated by an intermittent failure, just to realise that rust uses a magic variable to dodge it.

Is there a particular reason for changing it as part of this PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops sorry I meant to respond to this earlier! I changed this here because it's a pretty bad experience when working on the docker files. Every failure turns into a "retry" so if you've got a normal failure in the docker image it just gives it to you 5 times which often makes it hard to find the error.

This seems contentious though so I'll just back it out.

@bors
Copy link
Contributor

bors commented Jul 19, 2017

☔ The latest upstream changes (presumably #43316) made this pull request unmergeable. Please resolve the merge conflicts.

@aturon
Copy link
Member

aturon commented Jul 19, 2017

cc @rust-lang/infra, anybody up for giving this an official review?

@alexcrichton alexcrichton force-pushed the aarch64-ci branch 2 times, most recently from 0f43c8c to 0282dfe Compare July 19, 2017 14:16
@aidanhs aidanhs assigned aidanhs and unassigned aturon Jul 19, 2017
@aidanhs
Copy link
Member

aidanhs commented Jul 19, 2017

I'll go through it this weekend (unless someone jumps in first).

Copy link
Member

@aidanhs aidanhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is disabled I don't particularly mind r+ing this mostly as-is, but the CI variable stuff needs tweaking in some way (either passing it down to docker, or removing the retry disabling) or I think we're going to start seeing spurious failures again.

cd /build/linux-4.4.42 && \
cp /build/.config . && \
make -j$(nproc) all && \
cp arch/arm64/boot/Image /tmp && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we use zImage for armhf, it'd probably be nice if we did the same here just for consistency.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would yeah, but the normal build process didn't create that, so we didn't have it to use it :(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should mention that I know nothing about kernel build processes, I just found that this particular configuration didn't create a zImage

RUN chmod +x rootfs/etc/init.d/rcS

# Helper to quickly fill the entropy pool in the kernel.
COPY armhf-gnu/addentropy.c /tmp/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and rcS above are being pulled out of the armhf-gnu folder - maybe a qemu-common folder?

src/ci/shared.sh Outdated
"$@"
return
fi

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to expand on my reluctance - one reason we do CI is so we know other people can build it correctly. I can imagine myself getting frustrated by an intermittent failure, just to realise that rust uses a magic variable to dodge it.

Is there a particular reason for changing it as part of this PR?

@alexcrichton alexcrichton force-pushed the aarch64-ci branch 2 times, most recently from 1fe1437 to eb6f996 Compare July 24, 2017 21:31
@alexcrichton
Copy link
Member Author

Updated!

RUN chmod +x rootfs/etc/init.d/rcS

# Helper to quickly fill the entropy pool in the kernel.
COPY armhf-gnu/addentropy.c /tmp/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another one for scripts/?

@@ -636,6 +636,12 @@ impl Config {
let target = self.target_config.entry(target).or_insert(Target::default());
target.qemu_rootfs = Some(parse_configure_path(value));
}
"CFG_QEMU_AARCH64_ROOTFS" if value.len() > 0 => {
let target = "aarch64-unknown-linux-gnu".to_string();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to use the interner in the new rustbuild, see the ARMHF line above. Looks like it changed underneath you!

@aidanhs
Copy link
Member

aidanhs commented Jul 24, 2017

r=me with the interning fix to get the PR build passing and the move of addentropy.c

This commit adds a disabled builder which will run all tests for the standard
library for aarch64 in a QEMU instance. Once we get enough capacity to run this
on Travis this can be used to boost our platform coverage of AArch64
@alexcrichton
Copy link
Member Author

@bors: r=aidanhs

@bors
Copy link
Contributor

bors commented Jul 24, 2017

📌 Commit 8ef3f69 has been approved by aidanhs

@bors
Copy link
Contributor

bors commented Jul 25, 2017

⌛ Testing commit 8ef3f69 with merge 1399c0d92e42e5510d784e3015e87c3c2eef7481...

@bors
Copy link
Contributor

bors commented Jul 25, 2017

💔 Test failed - status-travis

@Mark-Simulacrum
Copy link
Member

LLVM just stopped building... presumably sccache related? Not sure. cc @alexcrichton

@bors retry

[00:04:14] [ 18%] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Raw/RawError.cpp.o
[00:04:14] [ 18%] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Raw/RawSession.cpp.o
[00:04:14] [ 18%] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Raw/SymbolStream.cpp.o
[00:04:14] [ 18%] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Raw/TpiHashing.cpp.o
[00:04:14] [ 18%] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Raw/TpiStream.cpp.o
[00:04:14] [ 19%] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Raw/TpiStreamBuilder.cpp.o
[00:04:15] [ 19%] Linking CXX static library ../../libLLVMDebugInfoPDB.a
[00:04:15] [ 19%] Built target LLVMDebugInfoPDB


No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

The build has been terminated

@bors
Copy link
Contributor

bors commented Jul 25, 2017

⌛ Testing commit 8ef3f69 with merge e0d7d4672073054e89eeebfc2287427305cb6301...

@bors
Copy link
Contributor

bors commented Jul 25, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member Author

@bors: retry

Let's see if it's #40474

@bors
Copy link
Contributor

bors commented Jul 25, 2017

⌛ Testing commit 8ef3f69 with merge e68b13ae6fab2d475a3d831257d85932867be3fe...

@bors
Copy link
Contributor

bors commented Jul 25, 2017

💔 Test failed - status-travis

@kennytm
Copy link
Member

kennytm commented Jul 25, 2017

Same error, should be legit.

@aidanhs
Copy link
Member

aidanhs commented Jul 25, 2017

Third time in a row for that hang while building LLVM, but I can't figure out what's causing it given that virtually nothing has changed about armhf. My best guess is something to do with the docker build not being cached any more so some steps are re-run, but the only one that looks like it could change is the acquisition of vexpress-v2p-ca15-tc1.dtb...but a) I don't think that gets used during llvm compilation and b) I doubt there's a "loop forever" option in it.

@alexcrichton any thoughts?

@alexcrichton
Copy link
Member Author

I have no idea how this PR could be related to that error. I'm running tests locally to try to replicate, I doubt I will be successful.

@alexcrichton
Copy link
Member Author

@bors: retry

Continue to be no failures locally, and I can't fathom how this is related to that...

@bors
Copy link
Contributor

bors commented Jul 26, 2017

⌛ Testing commit 8ef3f69 with merge bad58f2...

bors added a commit that referenced this pull request Jul 26, 2017
Add a disabled builder for aarch64 emulated tests

This commit adds a disabled builder which will run all tests for the standard
library for aarch64 in a QEMU instance. Once we get enough capacity to run this
on Travis this can be used to boost our platform coverage of AArch64
@bors
Copy link
Contributor

bors commented Jul 26, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: aidanhs
Pushing bad58f2 to master...

@bors bors merged commit 8ef3f69 into rust-lang:master Jul 26, 2017
@alexcrichton alexcrichton deleted the aarch64-ci branch August 22, 2017 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants