Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Paul Gilliam <pgilliam@us.ibm.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] test for altivec h/w on PowerPC
Date: Thu, 03 Mar 2005 17:27:00 -0000	[thread overview]
Message-ID: <20050303172642.GB18681@nevyn.them.org> (raw)
In-Reply-To: <200503021346.35253.pgilliam@us.ibm.com>

On Wed, Mar 02, 2005 at 01:46:35PM -0800, Paul Gilliam wrote:
> +2004-03-01  Paul Gilliam  <pgilliam@us.ibm.com>
> +
> +        * lib/gdb.exp: added 'skip_altivec_tests', a modification of
> +        Janis Johnson's 'check_vmx_hw_available' from GCC testsuite
> +        * lib/gdb.arch/altivec-abi.exp: use new 'skip_altivec_tests'
> +        * lib/gdb.arch/altivec-regs.exp: Likewise
> +

First, please don't include changelogs as diffs.  And be careful of
tabs.

Secondly, this should be:
	* lib/gdb.exp (skip_altivec_tests): New function, based on
	check_vmx_hw_available from the GCC testsuite.
	* lib/gdb.arch/altivec-abi.exp: Use skip_altivec_tests.
	* lib/gdb.arch/altivec-regs.exp: Likewise.

Caps, final periods.

>  2004-02-24  Joel Brobecker  <brobecker@adacore.com>
>  
>  	* gdb.ada/fixed_points.exp: Create compilation object directory
> diff -Naur testsuite.old/gdb.arch/altivec-abi.exp testsuite/gdb.arch/altivec-abi.exp
> --- testsuite.old/gdb.arch/altivec-abi.exp	2005-03-01 14:56:21.484222560 -0800
> +++ testsuite/gdb.arch/altivec-abi.exp	2005-03-01 15:01:49.451289288 -0800
> @@ -32,7 +32,7 @@
>  set prms_id 0
>  set bug_id 0
>  
> -if ![istarget "powerpc-*altivec"] then {
> +if [skip_altivec_tests] {

How about ![istarget "powerpc*-*-*"] || [skip_altivec_tests]?  No point
compiling the test on i386!

> +    # Some simulators are known to not support VMX instructions.
> +    if { [istarget powerpc-*-eabi] || [istarget powerpc*-*-eabispe] } {
> +        verbose "check_hw_available  returning 0" 2

Please either update the error message, or leave the function named
check_vmx_hw_available :-)

> +    verbose "skip_altivec_testing  compiling testfile $src" 1
> +    set lines [gdb_compile $src $exe executable {debug additional_flags=-maltivec}]
> +    file delete $src

This is a GCC-only option.  Will the tests ever be useful with a
non-GCC compiler?  If not, please make them fail gracefully before they
try to invoke another compiler with -maltivec.  See test_compiler_info.

> +
> +    if ![string match "" $lines] then {
> +        verbose "check_vmx_hw_availalble testfile compilation failed" 2
> +        return [set skip_vmx_tests_saved 1]
> +    }
> +
> +    # No error message, compilation succeeded so now run it.
> +
> +    set exec_result [remote_exec target "./$exe"]
> +    remote_file build delete "$exe"

You just compiled a binary on the build machine and tried to use
remote_exec on a target... you're probably not in the same current
directory.  Have you tried just doing it the same way the GCC testsuite
does, using ${tool}_load?

-- 
Daniel Jacobowitz
CodeSourcery, LLC


  reply	other threads:[~2005-03-03 17:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-01 23:23 Paul Gilliam
2005-03-01 23:28 ` Daniel Jacobowitz
2005-03-02  0:36   ` Paul Gilliam
2005-03-02  1:56     ` Daniel Jacobowitz
2005-03-02 18:14       ` Paul Gilliam
2005-03-02 21:50         ` Paul Gilliam
2005-03-03 17:27           ` Daniel Jacobowitz [this message]
2005-03-10  0:43             ` Paul Gilliam
2005-03-28 23:45               ` Paul Gilliam
2005-03-29 20:43               ` Daniel Jacobowitz
2005-04-30 19:47                 ` Daniel Jacobowitz
2005-05-03  0:48                   ` [commit] " Paul Gilliam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050303172642.GB18681@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=pgilliam@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox