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

Update TimeFileMaker.py to correctly sort timing diffs #6149

Merged
merged 2 commits into from
Nov 27, 2017

Conversation

JasonGross
Copy link
Member

Previously, it was reverse-ordering timing diffs.

Also add some tests on precomputed logs (from fiat-crypto) as a human-readable sanity-check.

@JasonGross JasonGross added kind: fix This fixes a bug or incorrect documentation. kind: infrastructure CI, build tools, development tools. labels Nov 13, 2017
@JasonGross JasonGross added this to the 8.7.1 milestone Nov 13, 2017
@JasonGross JasonGross force-pushed the fix-timing-sorting-order branch 2 times, most recently from 09a4b85 to ffa60a7 Compare November 13, 2017 19:30
@Zimmi48 Zimmi48 added this to Request 8.7 inclusion in Coq 8.7 via automation Nov 14, 2017
@maximedenes
Copy link
Member

The test suite fails.

@maximedenes maximedenes added the needs: fixing The proposed code change is broken. label Nov 16, 2017
@JasonGross
Copy link
Member Author

Okay, hopefully it'll work now.

@JasonGross JasonGross force-pushed the fix-timing-sorting-order branch 2 times, most recently from c6bca0a to 9b51cb2 Compare November 17, 2017 02:01
@JasonGross
Copy link
Member Author

Test-suite now builds on my machine

@JasonGross JasonGross removed the needs: fixing The proposed code change is broken. label Nov 17, 2017
@Zimmi48
Copy link
Member

Zimmi48 commented Nov 17, 2017

I haven't really looked at the timing tests that were there before nor those that are added by this PR but I'm a bit worried about the potential for non-deterministic results, given our past experience with these.

@JasonGross
Copy link
Member Author

@Zimmi48 The ones that were there before are unchanged. The ones I added do not invoke the time command. I checked in the output of make TIMED=1 on a particular build, and the new tests ensure that the python scripts process these in a sane way. If the python scripts themselves are non deterministic given fixed input, that is a bug in the python scripts.

@maximedenes
Copy link
Member

Strange failure on AppVeyor. Rebuilding.

@@ -0,0 +1,4 @@
set -e
set -o pipefail
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need both set invocations?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually this is dead code, I'll remove the file.

@Zimmi48
Copy link
Member

Zimmi48 commented Nov 22, 2017

I think the strange AppVeyor failure still occurred. The linter also reports some problems.

@Zimmi48 Zimmi48 added the needs: fixing The proposed code change is broken. label Nov 22, 2017
@Zimmi48
Copy link
Member

Zimmi48 commented Nov 22, 2017

But the linter error should probably be ignored because they probably concern only test-suite output files. If these files had a .out suffix and #6189 was merged, then there probably wouldn't be any problems with the linter.

@JasonGross
Copy link
Member Author

Argh, the AppVeyor failure is because, on Windows, we're compiling a version of Coq that's incompatible with command-line tools, such as pwd.

@JasonGross
Copy link
Member Author

@Zimmi48 What should I do about the linter? They concern test-suite output files, but naming them .out is wrong, because they're closer to reference files.

@Zimmi48
Copy link
Member

Zimmi48 commented Nov 22, 2017

You may adapt the AppVeyor script to install more commands, @maximedenes may help here.

You can just ignore the linter or ask @SkySkimmer his advice.

@SkySkimmer
Copy link
Contributor

You could have a .gitattributes in a subdirectory with only the output files, containing * -whitespace (or a finer glob if you want to have linted files in the same directory). This would disable the linter for the whole subdirectory.

@JasonGross
Copy link
Member Author

@Zimmi48 Huh? The issue is that pwd spits out cygwin paths (/cygdrive/...), and coqc, even built from cygwin, is apparently incapable of parsing such paths.

JasonGross added a commit to JasonGross/coq that referenced this pull request Nov 22, 2017
@JasonGross
Copy link
Member Author

@SkySkimmer like ff03258 ?

*.log.in -whitespace
*.log.expected -whitespace

(to capture all .log.in and .log.expected files in subdirectories of the directory I stuck .gitattributes in)

@Zimmi48
Copy link
Member

Zimmi48 commented Nov 22, 2017

Hum OK I hadn't correctly understood the issue.

@SkySkimmer
Copy link
Contributor

@SkySkimmer like ff03258 ?

Yes, but you need to rebase it to the beginning of your branch so that your commits happen with it already existing.

Previously, it was reverse-ordering timing diffs.
These work on precomputed build logs (in this case, from a recent
partial build of fiat-crypto).

They are meant to serve as human-readable sanity checks of output
format.

Separate out the sane bits of template/init.sh from the ones messing
with directory structure (which are fragile and make assumptions about
where the calling script is sourcing it from).

N.B. The test-suite removes all *.log files, so we use *.log.in.

N.B. We set COQLIB in precomputed-time-tests/run.sh, not the Makefile,
because coqc, on Windows, doesn't handle cygwin paths passed via
-coqlib, and `pwd` gives cygwin paths.

N.B. We have .gitattributes to satisfy the linter (as per
coq#6149 (comment))
@JasonGross
Copy link
Member Author

Rebased and squashed

@SkySkimmer SkySkimmer added kind: tests kind: infrastructure CI, build tools, development tools. and removed kind: infrastructure CI, build tools, development tools. kind: tests labels Nov 23, 2017
@ejgallego
Copy link
Member

This seems Ok [travis failed on vst timeout]

@Zimmi48 Zimmi48 removed the needs: fixing The proposed code change is broken. label Nov 25, 2017
@maximedenes maximedenes merged commit e87c3f9 into coq:master Nov 27, 2017
Coq 8.7 automation moved this from Request 8.7 inclusion to Waiting to be backported Nov 27, 2017
@JasonGross JasonGross deleted the fix-timing-sorting-order branch November 27, 2017 17:01
Zimmi48 pushed a commit to Zimmi48/coq that referenced this pull request Nov 27, 2017
These work on precomputed build logs (in this case, from a recent
partial build of fiat-crypto).

They are meant to serve as human-readable sanity checks of output
format.

Separate out the sane bits of template/init.sh from the ones messing
with directory structure (which are fragile and make assumptions about
where the calling script is sourcing it from).

N.B. The test-suite removes all *.log files, so we use *.log.in.

N.B. We set COQLIB in precomputed-time-tests/run.sh, not the Makefile,
because coqc, on Windows, doesn't handle cygwin paths passed via
-coqlib, and `pwd` gives cygwin paths.

N.B. We have .gitattributes to satisfy the linter (as per
coq#6149 (comment))

(cherry picked from commit e87c3f9)
Zimmi48 added a commit to Zimmi48/coq that referenced this pull request Nov 27, 2017
@Zimmi48 Zimmi48 moved this from Waiting to be backported to Waiting for CI in Coq 8.7 Nov 27, 2017
@Zimmi48 Zimmi48 moved this from Waiting for CI to Shipped in 8.7.1 in Coq 8.7 Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: fix This fixes a bug or incorrect documentation. kind: infrastructure CI, build tools, development tools.
Projects
No open projects
Coq 8.7
  
Shipped in 8.7.1
Development

Successfully merging this pull request may close these issues.

None yet

5 participants