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

Fix fragility issues in all.sh #2031

Merged

Conversation

gilles-peskine-arm
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm commented Sep 26, 2018

Fix some issues that don't break all.sh on a pristine checkout, but make it fragile in a tree where you've been doing development.

  • Fix make WINDOWS_BUILD=1 clean on non-Windows hosts.
  • In keep-going mode, don't hard-fail on some auxiliary script or test.
  • Fix Coverity branches fail Travis tests with check-files.py #1691 fix check-files.py: don't recurse into .git #1713: check-files.py complaining about files in .git or in third-party subtrees.
  • Fix make apidoc looking for files in unintended subdirectories.
  • Don't fail on a spurious error if ASLR can't be disabled (not an issue on developer machines, but this would let us remove the don't-enforce-ASLR configuration from some CI jobs).

Backports: #2032 for 2.7, #2033 for 2.1.

Precursor to PSA.

The clean rule was not using the correct names for the compiled
executable files.
Add record_status in front of the invocation of several scripts where
it was missing.
@gilles-peskine-arm gilles-peskine-arm added bug mbed TLS team needs-review Every commit must be reviewed by at least two team members, needs-backports Backports are missing or are pending review and approval. component-platform Portability layer and build scripts labels Sep 26, 2018
@gilles-peskine-arm
Copy link
Contributor Author

gilles-peskine-arm commented Sep 26, 2018

all.sh run on CI: https://jenkins-internal.mbed.com/job/mbedtls-release/717/ → pass

simonbutcher
simonbutcher previously approved these changes Sep 26, 2018
Copy link
Contributor

@simonbutcher simonbutcher left a comment

Choose a reason for hiding this comment

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

LGTM

Patater
Patater previously approved these changes Sep 26, 2018
Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

LGTM

Should all commits be backported? Which ones depend on #930 being backported first?

@simonbutcher simonbutcher removed the needs-review Every commit must be reviewed by at least two team members, label Sep 26, 2018
@gilles-peskine-arm
Copy link
Contributor Author

@Patater The WINDOWS_BUILD fix is for an issue introduced by #930. The others are unrelated, but “don't hard-fail on some auxiliary script” modifies one line that was introduced in #930.

@gilles-peskine-arm gilles-peskine-arm added the needs-review Every commit must be reviewed by at least two team members, label Sep 27, 2018
@gilles-peskine-arm
Copy link
Contributor Author

I added one commit for another related issue that I noticed while doing the backports. I'll start CI runs of all.sh this evening.

@gilles-peskine-arm
Copy link
Contributor Author

I made another commit that will allow us to run the CI with ASLR enforced.

Patater
Patater previously approved these changes Sep 27, 2018
simonbutcher
simonbutcher previously approved these changes Sep 28, 2018
@simonbutcher simonbutcher added approved Design and code approved - may be waiting for CI or backports and removed needs-backports Backports are missing or are pending review and approval. needs-review Every commit must be reviewed by at least two team members, labels Sep 28, 2018
Generate the documentation from include and doxygen/input only. Don't
get snared by files containing Doxygen comments that lie in other
directories such as tests, yotta, crypto/include, ...

The only difference this makes in a fresh checkout is that the
documentation no longer lists target_config.h. This file is from
yotta, does not contain any Doxygen comment, and its inclusion in the
rendered documentation was clearly an oversight.
Add if_build_succeeded in front of the invocation of some test runs
where it was missing.
test -s can't fail if the subsequent grep succeeds.
We don't need to disable ASLR, so don't try. If gdb tries but fails,
the test runs normally, but all.sh then trips up because it sees
`warning: Error disabling address space randomization: Operation not permitted`
and interprets it as an error that indicates a test failure.
@gilles-peskine-arm gilles-peskine-arm added needs-review Every commit must be reviewed by at least two team members, needs-backports Backports are missing or are pending review and approval. and removed approved Design and code approved - may be waiting for CI or backports labels Sep 28, 2018
@gilles-peskine-arm
Copy link
Contributor Author

@Patater @sbutcher-arm I rewrote the commit that modifies check-files.py to exclude other directories, including a fix for #1691. The original history is in https://github.com/gilles-peskine-arm/mbedtls/tree/all.sh-fragility-201809-1. Please re-review.

@gilles-peskine-arm
Copy link
Contributor Author

gilles-peskine-arm commented Sep 28, 2018

New run of all.sh at https://jenkins-internal.mbed.com/job/mbedtls-release/727/pass

self.excluded_paths = list(map(os.path.normpath, [
'cov-int',
'examples',
'yotta/module'
Copy link
Contributor

Choose a reason for hiding this comment

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

The commit message said yotta/modules. Should this be module or modules? Update here or the commit message to be correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's module. I amended the last commit to fix the commit message.

Copy link
Contributor

Choose a reason for hiding this comment

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

The PR to remove yotta support will be merged before this one. I don't think you need that line.

Copy link
Contributor

Choose a reason for hiding this comment

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

And as an aside - there's no need to block it because check-files.py passes that directory in our repo anyway.

Exclude ".git" directories anywhere. This avoids spurious errors in git
checkouts that contain branch names that look like a file
check-files.py would check. Fix Mbed-TLS#1713

Exclude "mbed-os" anywhere and "examples" from the root. Switch to the
new mechanism to exclude "yotta/module". These are directories where
we store third-party files that do not need to match our preferences.

Exclude "cov-int" from the root. Fix Mbed-TLS#1691
Patater
Patater previously approved these changes Oct 2, 2018
@mpg
Copy link
Contributor

mpg commented Oct 16, 2018

I took the liberty of editing the PR description by adding "fix" in front of an issue number so that github picks it up as fixed by this PR.

simonbutcher
simonbutcher previously approved these changes Oct 16, 2018
Copy link
Contributor

@simonbutcher simonbutcher left a comment

Choose a reason for hiding this comment

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

I think you should remove yotta support, but it's not a blocker.

self.excluded_paths = list(map(os.path.normpath, [
'cov-int',
'examples',
'yotta/module'
Copy link
Contributor

Choose a reason for hiding this comment

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

The PR to remove yotta support will be merged before this one. I don't think you need that line.

Complements "Remove Yotta support from the docs, tests and build scripts".
@gilles-peskine-arm
Copy link
Contributor Author

@sbutcher-arm Thanks for reviewing. I removed the yotta line from check-files.py.

Copy link
Contributor

@dgreen-arm dgreen-arm left a comment

Choose a reason for hiding this comment

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

LGTM

@simonbutcher simonbutcher removed the needs-review Every commit must be reviewed by at least two team members, label Oct 22, 2018
@mpg
Copy link
Contributor

mpg commented Oct 24, 2018

retest

1 similar comment
@simonbutcher
Copy link
Contributor

retest

@simonbutcher
Copy link
Contributor

Jenkins failed on the BSD timing test, which is a known issue and as good as a pass. Therefore marking as 'ready for merge'.

@simonbutcher simonbutcher added approved Design and code approved - may be waiting for CI or backports and removed needs-backports Backports are missing or are pending review and approval. labels Oct 25, 2018
@simonbutcher simonbutcher merged commit 96f3b4e into Mbed-TLS:development Oct 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports bug component-platform Portability layer and build scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

check-files.py: don't recurse into .git Coverity branches fail Travis tests with check-files.py
5 participants