Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Issue 12594036: Add a scons pnacl finalize step for pnacl_generate_pexe tests. (Closed)

Created:
7 years, 9 months ago by jvoung (off chromium)
Modified:
7 years, 8 months ago
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Add a scons pnacl finalize step for pnacl_generate_pexe tests. Most of the ABI stability steps run as part of pnacl-ld. However, some steps such as stripping nonstable debug metadata can make debugging hard. Thus, we add one more step to finalize the ABI. A new scons Bit 'nonstable_bitcode' can be set by individual tests to opt out of this prep step if the metadata is needed (e.g., gdb tests). The test will still run. Add a commandline flag 'skip_nonstable_bitcode' if it is required to skip building and running such tests. An alternative way to opt out is to make the test part of the nonpexe_test suite. We need to roll the archived frontend rev too, since finalize is run during the build portion to properly work with triggered bots such as the ARM hw bot. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3348 TEST= trybots + buildbot/buildbot_pnacl_toolchain_tests.sh archived-frontend-test x86-64 Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=11090

Patch Set 1 #

Patch Set 2 : Roll revs #

Total comments: 11

Patch Set 3 : merge steps #

Total comments: 8

Patch Set 4 : Use StripSuffix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -62 lines) Patch
M SConstruct View 1 2 3 6 chunks +61 lines, -23 lines 0 comments Download
M buildbot/buildbot_pnacl_toolchain_tests.sh View 1 2 chunks +3 lines, -2 lines 0 comments Download
M site_scons/site_tools/component_setup.py View 1 1 chunk +1 line, -0 lines 0 comments Download
M site_scons/site_tools/naclsdk.py View 1 2 5 chunks +8 lines, -2 lines 0 comments Download
M tests/barebones/nacl.scons View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M tests/custom_desc/nacl.scons View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M tests/gdb/nacl.scons View 1 2 3 chunks +7 lines, -4 lines 0 comments Download
M tests/minnacl/nacl.scons View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M tests/multiple_sandboxes/nacl.scons View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M tests/subprocess/nacl.scons View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M tests/toolchain/nacl.scons View 1 1 chunk +23 lines, -18 lines 0 comments Download
M tests/trusted_crash/crash_in_syscall/nacl.scons View 1 2 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
jvoung (off chromium)
I could separate the roll, but that is how I tested it =)
7 years, 9 months ago (2013-03-28 00:08:46 UTC) #1
Mark Seaborn
> I could separate the roll, but that is how I tested it =) Fine ...
7 years, 9 months ago (2013-03-28 01:31:33 UTC) #2
eliben
> https://codereview.chromium.org/12594036/diff/15001/SConstruct#newcode1607 > SConstruct:1607: final_name = pexe_name[:pexe_name.index('.pexe')] + > '.final.pexe' > You should assert that ...
7 years, 9 months ago (2013-03-28 02:55:38 UTC) #3
jvoung - send to chromium...
just responding to some comments, will send out a revised CL later https://codereview.chromium.org/12594036/diff/15001/SConstruct File SConstruct ...
7 years, 8 months ago (2013-03-28 15:50:29 UTC) #4
Derek Schuff
> +1. *If* we plan to have separate extension names, the final one should just ...
7 years, 8 months ago (2013-03-28 16:37:18 UTC) #5
Mark Seaborn
https://codereview.chromium.org/12594036/diff/15001/tests/barebones/nacl.scons File tests/barebones/nacl.scons (right): https://codereview.chromium.org/12594036/diff/15001/tests/barebones/nacl.scons#newcode26 tests/barebones/nacl.scons:26: # a stub function for something that normally comes ...
7 years, 8 months ago (2013-03-28 16:44:32 UTC) #6
jvoung - send to chromium...
On 2013/03/28 16:37:18, Derek Schuff wrote: > > +1. *If* we plan to have separate ...
7 years, 8 months ago (2013-03-28 17:12:12 UTC) #7
eliben
On 2013/03/28 17:12:12, jvoung wrote: > On 2013/03/28 16:37:18, Derek Schuff wrote: > > > ...
7 years, 8 months ago (2013-03-28 17:16:29 UTC) #8
jvoung (off chromium)
https://codereview.chromium.org/12594036/diff/15001/tests/barebones/nacl.scons File tests/barebones/nacl.scons (right): https://codereview.chromium.org/12594036/diff/15001/tests/barebones/nacl.scons#newcode26 tests/barebones/nacl.scons:26: # a stub function for something that normally comes ...
7 years, 8 months ago (2013-03-28 17:54:50 UTC) #9
jvoung (off chromium)
On 2013/03/28 17:16:29, eliben wrote: > On 2013/03/28 17:12:12, jvoung wrote: > > On 2013/03/28 ...
7 years, 8 months ago (2013-03-28 18:27:38 UTC) #10
Mark Seaborn
LGTM with changes below https://codereview.chromium.org/12594036/diff/46001/SConstruct File SConstruct (right): https://codereview.chromium.org/12594036/diff/46001/SConstruct#newcode1569 SConstruct:1569: def GetFinalizedPexe(env, pexe): Nit: 2 ...
7 years, 8 months ago (2013-03-28 18:44:17 UTC) #11
jvoung (off chromium)
https://codereview.chromium.org/12594036/diff/46001/SConstruct File SConstruct (right): https://codereview.chromium.org/12594036/diff/46001/SConstruct#newcode1569 SConstruct:1569: def GetFinalizedPexe(env, pexe): On 2013/03/28 18:44:17, Mark Seaborn wrote: ...
7 years, 8 months ago (2013-03-28 19:45:31 UTC) #12
Derek Schuff
lgtm
7 years, 8 months ago (2013-03-28 19:52:07 UTC) #13
jvoung (off chromium)
Committed patchset #4 manually as r11090 (presubmit successful).
7 years, 8 months ago (2013-03-28 21:11:15 UTC) #14
Mark Seaborn
This appears to break the PNaCl tests in nacl_integration when rolled into Chromium: scons-out/nacl-x86-32-pnacl-pexe-clang/obj/tests/breakpad_crash_test/breakpad_untrusted_crash_test.out.tmp/crash_test.nmf failed: ...
7 years, 8 months ago (2013-03-29 15:05:34 UTC) #15
jvoung (off chromium)
Yes, the renaming will break things. I'll try to do ta chrome-roll + fix. On ...
7 years, 8 months ago (2013-03-29 15:09:29 UTC) #16
jvoung (off chromium)
7 years, 8 months ago (2013-03-29 22:13:52 UTC) #17
Message was sent while issue was closed.
Hmm the problem is that the nacl_integration tests (indirectly) refer to
published files in the STAGING directory.  So, if we wanted to run the
integration tests over the .final.pexe, we would need to (a) generate those from
the .nonfinal.pexe and (b) publish those.


It looks to that env.Publish() for the pexe/nexes happen as part of
env.ComponentProgram().


So, one idea was to inject a "GetFinalizedPexe()" inside env.ComponentProgram(),
but that seems to break complaining about the same target being created by
multiple environments ("Two different environments were specified for
target...")


We could get GetFinalizedPexe() to env.Publish() the result, but:

(a) We'll need to be sure that it publishes under the same key as the key used
by env.ComponentProgram() in the first place.

(b) We'll need to add calls to env.GetFinalizedPexe() for the browser test
pexes, somewhere, since those tests use PPAPIBrowsererTester().  We have to be
careful where that is called, otherwise we also get the error "Two different
environments were specified for target..."

I'm not sure where is a good place to do that, since some of the browser tests
in chrome borrow a pexe built from nacl, and assume it was published to the
staging directory.  Even if it wasn't cross repo, it's possible that the same
pexe can be used for two different tests.


Temporary fix is: https://codereview.chromium.org/13136004/, which just tests
the .nonfinal.pexe.  


====

What do you guys think about rolling this back, avoiding having both
.nonfinal.pexe vs .final.pexe, and doing something like the other proposal:


"""
Just throwing this out there... but we could also add a flag (-finalize) to
pnacl-ld by default (part of default scons LINKFLAGS) that
would run the finalizer during linking, and if you needed the non-final file,
you would run with -save-temps to keep that file, much like how you would use
-save-temps to keep the unoptimized file or the pre-expand files.

That would be the inverse of the -g proposal earlier.
"""


Otherwise, I'll think more about what else we can do.


On 2013/03/29 15:09:29, jvoung (cr) wrote:
> Yes, the renaming will break things.  I'll try to do ta chrome-roll + fix.
> 
> 
> On Fri, Mar 29, 2013 at 8:05 AM, <mailto:mseaborn@chromium.org> wrote:
> 
> > This appears to break the PNaCl tests in nacl_integration when rolled into
> > Chromium:
> >
> > scons-out/nacl-x86-32-pnacl-**pexe-clang/obj/tests/breakpad_**
> > crash_test/breakpad_untrusted_**crash_test.out.tmp/crash_test.**nmf
> > failed: Source `scons-out/nacl-x86-32-pnacl-**
> > pexe-clang/staging/crash_test.**pexe'
> > not found, needed by target
> > `scons-out/nacl-x86-32-pnacl-**pexe-clang/obj/tests/breakpad_**
> > crash_test/breakpad_untrusted_**crash_test.out.tmp/crash_test.**nmf'.
> >
> > scons-out/nacl-x86-32-pnacl-**pexe-clang/obj/tests/breakpad_**
> > crash_test/breakpad_crash_in_**syscall_test.out.tmp/crash_in_**syscall.nmf
> > failed: Source
> > `scons-out/nacl-x86-32-pnacl-**pexe-clang/staging/crash_in_**syscall.pexe'
> > not
> > found, needed by target
> > `scons-out/nacl-x86-32-pnacl-**pexe-clang/obj/tests/breakpad_**
> > crash_test/breakpad_crash_in_**syscall_test.out.tmp/crash_in_**
> > syscall.nmf'.
> > ...
> >
> > See
> > http://build.chromium.org/p/**tryserver.chromium/builders/**
> >
>
win_rel_naclmore/builds/511<http://build.chromium.org/p/tryserver.chromium/builders/win_rel_naclmore/builds/511>
> >
>
https://codereview.chromium.**org/13236006/%3Chttps://codereview.chromium.org...>
> >
> > Do you want to do a Chromium-side roll + fix?
> >
> >
>
https://codereview.chromium.**org/12594036/%3Chttps://codereview.chromium.org...>
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Reviews" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email
> to mailto:native-client-reviews+unsubscribe@googlegroups.com.
> To post to this group, send email to
mailto:native-client-reviews@googlegroups.com.
> Visit this group at
http://groups.google.com/group/native-client-reviews?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
>

Powered by Google App Engine
This is Rietveld 408576698