public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug jit/64752] New: Eliminate use of "file" from the jit testsuite
@ 2015-01-23 14:46 dmalcolm at gcc dot gnu.org
  2015-01-23 15:33 ` [Bug jit/64752] " dmalcolm at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-01-23 14:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64752

            Bug ID: 64752
           Summary: Eliminate use of "file" from the jit testsuite
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: jit
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org

Currently jit.exp invokes "file" as a smoketest for the output of
gcc_context_compile_to_file, to try to verify that assembler/objects/shared
library/executables were emitted, trying to match the output of "file" against
regexes.

Some hosts won't have "file" installed, and the output of "file" seems to vary
enough from host to host that this test can never be made sane.

So we should drop this use of "file", in favor of sanity-checking the output
more directly: e.g. trying to run the assembler on the .s file, etc.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug jit/64752] Eliminate use of "file" from the jit testsuite
  2015-01-23 14:46 [Bug jit/64752] New: Eliminate use of "file" from the jit testsuite dmalcolm at gcc dot gnu.org
@ 2015-01-23 15:33 ` dmalcolm at gcc dot gnu.org
  2015-02-06 23:20 ` dmalcolm at gcc dot gnu.org
  2015-02-06 23:22 ` dmalcolm at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-01-23 15:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64752

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #0)
> Some hosts won't have "file" installed, and the output of "file" seems to
> vary enough from host to host that this test can never be made sane.

For example, on i686 Fedora I get:
FAIL: 'file' output on output-of-test-compile-to-assembler.c.s did not match:
assembler source text

since the output was:
  output-of-test-compile-to-assembler.c.s: assembler source, ASCII text
but I've seen output (on ppc iirc) that read just "ASCII text"


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug jit/64752] Eliminate use of "file" from the jit testsuite
  2015-01-23 14:46 [Bug jit/64752] New: Eliminate use of "file" from the jit testsuite dmalcolm at gcc dot gnu.org
  2015-01-23 15:33 ` [Bug jit/64752] " dmalcolm at gcc dot gnu.org
@ 2015-02-06 23:20 ` dmalcolm at gcc dot gnu.org
  2015-02-06 23:22 ` dmalcolm at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-02-06 23:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64752

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Fri Feb  6 23:19:32 2015
New Revision: 220494

URL: https://gcc.gnu.org/viewcvs?rev=220494&root=gcc&view=rev
Log:
PR jit/64752 - Rewrite jit testsuite to eliminate use of "file"

gcc/testsuite/ChangeLog:
    PR jit/64752
    * jit.dg/create-code-for-hello-world-executable.h: New file, taken
    from jit.dg/test-compile-to-executable.c's create_code, with a
    clarification of the output message.
    * jit.dg/harness.h (CHECK_NO_ERRORS): Add test and __func__ to the
    pass/fail message.
    (test_jit): Use CHECK_NO_ERRORS when calling
    gcc_jit_context_compile_to_file.
    * jit.dg/jit.exp (jit-dg-test): Update grep for rename of
    jit-verify-compile-to-file to jit-verify-output-file-was-created.
    (jit-setup-compile-to-file): Likewise.  Add a verbose comment
    about deletions that are attempted.
    (jit-verify-compile-to-file): Rename to...
    (jit-verify-output-file-was-created): ...this, and drop the
    attempt to run "file" and verify the output.
    (jit-verify-assembler): New function.
    (jit-verify-object): New function.
    (jit-verify-dynamic-library): New function.
    * jit.dg/test-compile-to-assembler.c (create_code): Eliminate in
    favor of an implementation from new file
    create-code-for-hello-world-executable.h, which also adds a
    "main".
    (dg-final): Replace jit-verify-compile-to-file with
    jit-verify-output-file-was-created, and invoke new function
    jit-verify-assembler.
    * jit.dg/test-compile-to-dynamic-library.c (create_code): Clarify
    the output message.
    (dg-final): Replace jit-verify-compile-to-file with
    jit-verify-output-file-was-created, and invoke new function
    jit-verify-dynamic-library.
    * jit.dg/test-compile-to-executable.c (create_code): Eliminate in
    favor of an implementation from new file
    create-code-for-hello-world-executable.h, which also adds a
    "main".
    (dg-final): Replace jit-verify-compile-to-file with
    jit-verify-output-file-was-created.  Strengthen the expected stdout
    from the built executable.
    * jit.dg/test-compile-to-object.c (create_code): Eliminate in
    favor of an implementation from new file
    create-code-for-hello-world-executable.h, which also adds a
    "main".
    (dg-final): Replace jit-verify-compile-to-file with
    jit-verify-output-file-was-created, and invoke new function
    jit-verify-object.
    * jit.dg/verify-dynamic-library.c: New source file.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/jit.dg/harness.h
    trunk/gcc/testsuite/jit.dg/jit.exp
    trunk/gcc/testsuite/jit.dg/test-compile-to-assembler.c
    trunk/gcc/testsuite/jit.dg/test-compile-to-dynamic-library.c
    trunk/gcc/testsuite/jit.dg/test-compile-to-executable.c
    trunk/gcc/testsuite/jit.dg/test-compile-to-object.c


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug jit/64752] Eliminate use of "file" from the jit testsuite
  2015-01-23 14:46 [Bug jit/64752] New: Eliminate use of "file" from the jit testsuite dmalcolm at gcc dot gnu.org
  2015-01-23 15:33 ` [Bug jit/64752] " dmalcolm at gcc dot gnu.org
  2015-02-06 23:20 ` dmalcolm at gcc dot gnu.org
@ 2015-02-06 23:22 ` dmalcolm at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-02-06 23:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64752

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed in r220494; see:
https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00439.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-06 23:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23 14:46 [Bug jit/64752] New: Eliminate use of "file" from the jit testsuite dmalcolm at gcc dot gnu.org
2015-01-23 15:33 ` [Bug jit/64752] " dmalcolm at gcc dot gnu.org
2015-02-06 23:20 ` dmalcolm at gcc dot gnu.org
2015-02-06 23:22 ` dmalcolm at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).