public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* unresolved type-semantic error
@ 2009-12-07 15:36 naresh kamboju
  2009-12-08  9:53 ` naresh kamboju
  0 siblings, 1 reply; 3+ messages in thread
From: naresh kamboju @ 2009-12-07 15:36 UTC (permalink / raw)
  To: systemtap
  Cc: Frank Ch. Eigler, Masami Hiramatsu, David Smith, Dave Brolley,
	David Howells, ananth

Hi,

I have come across with semantic errors in the SystemTap testsuite
while building test cases.
/*************************************************************/
File: tapset/signal.stp
/*************************************************************/
probe signal.handle = kernel.function("handle_signal")
{
    sig = $sig
    sig_name = _signal_name($sig)
    .
    .
    // Check whether the signal is a User Mode or Kernel mode Signal.

    if (sinfo == 0 && sig_code <= 0)
        sig_mode = "User Mode Signal"
    else if (sinfo >=  1)
        sig_mode = "Kernel Mode Signal"
}

probe signal.handle.return = kernel.function("handle_signal").return ?
{
    retstr = returnstr(1)
}
/*************************************************************/
build log
/*************************************************************/
semantic error: failed to retrieve return value location for
copy_process(kernel/fork.c): identifier '$return' at
/usr/local/arm/devel/share/systemtap/tapset/kprocess.stp:28:12
        source:     task = $return
                           ^
semantic error: failed to retrieve return value location for
do_execve(fs/exec.c): identifier '$return' at :78:13
        source:     errno = $return
                            ^
semantic error: not accessible at this address (0x80025c5c):
identifier '$sig' at
/usr/local/arm/devel/share/systemtap/tapset/signal.stp:526:11
        source:     sig = $sig
                          ^
semantic error: not accessible at this address (0x80025c5c):
identifier '$sig' at :527:29
        source:     sig_name = _signal_name($sig)
                                            ^
semantic error: probe_1813 with unresolved type: identifier 'sig' at
/usr/local/arm/devel/share/systemtap/tapset/signal.stp:526:5
        source:     sig = $sig
                    ^
semantic error: probe_1813 with unresolved type: identifier 'sig' at
process_test.stp:43:14
        source:   log(sprint(sig))
                             ^
semantic error: probe_1813 with unresolved type: identifier 'sprint' at :43:7
        source:   log(sprint(sig))
                      ^
semantic error: probe_1813 with unresolved type: identifier 'log' at :43:3
        source:   log(sprint(sig))
                  ^
Pass 2: analyzed script: 11 probe(s), 16 function(s), 16 embed(s), 0
global(s) in 230usr/50sys/289real ms.
Pass 2: analysis failed.  Try again with another '--vp 01' option.
Keeping temporary directory "/tmp/stapFqPOLz"
/*************************************************************/
This symbol is not present in the Kernel
#nm vmlinux | grep "handle_signal"
<< nothing related to handle_signal >>
/*************************************************************/
I have made the following changes to Kernel make test work

make global and Export:
------------------------------------------------------------------------------------
 Index: b/arch/arm/kernel/signal.c
===================================================================
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -584,8 +584,14 @@ struct arm_abi arm_abi = {
        .restart        = __NR_restart_syscall
 };

+#if 0
 static int handle_signal(unsigned long sig, siginfo_t *info,
        struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
+#else
+#include <linux/module.h>
+int handle_signal(unsigned long sig, siginfo_t *info,
+       struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
+#endif
 {
        int ret;

@@ -621,6 +627,7 @@ static int handle_signal(unsigned long s

        return ret;
 }
+EXPORT_SYMBOL(handle_signal);

 static void do_signal(struct pt_regs *regs)
 {

/*************************************************************/
I can say that the above method is not the best way to fix the issues.

I have notices much these kinds of issues almost 70+ test cases.
I have tested with systemtap-0.9.5 … systemtap-1.0.

All these are expected failures?
If not,
Do we need to fix these issues at SystemTap or Kernel side?

Best regards
Naresh Kamboju

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

* Re: unresolved type-semantic error
  2009-12-07 15:36 unresolved type-semantic error naresh kamboju
@ 2009-12-08  9:53 ` naresh kamboju
  2009-12-17 17:28   ` Frank Ch. Eigler
  0 siblings, 1 reply; 3+ messages in thread
From: naresh kamboju @ 2009-12-08  9:53 UTC (permalink / raw)
  To: systemtap
  Cc: Frank Ch. Eigler, Masami Hiramatsu, David Smith, Dave Brolley,
	David Howells, ananth

Hi,

As per my analysis, these below tapsets are presented from
>=systemtap-v.0.6 and also which are known failures.

 /********************************************************************/
File1: testsuite/systemtap.pass1-4/buildok.exp:

------------------------------------------------------------

set self buildok

foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] {

    set test $self/[file tail $file]

    verbose -log "Running $file"

    set rc [stap_run_batch $file]

    # some tests are known to fail.

    switch $test {

        buildok/perfmon01.stp {setup_kfail 909 *-*-*}

        buildok/twentyseven.stp {setup_kfail 4166 *-*-*}

        buildok/sched_test.stp {setup_kfail 1155 *-*-*}

        buildok/process_test.stp {setup_kfail 1155 *-*-*}

        buildok/rpc-all-probes.stp {setup_kfail 4413 *-*-*}

        buildok/nfs-all-probes.stp {setup_kfail 4413 *-*-*}

        buildok/per-process-syscall.stp {if {![utrace_p]} {
setup_kfail 9999 *-*-*} }

    }

    if {$rc == 0} { pass $test } else { fail $test }

}

/********************************************************************/

please provide your comments.

Best regards
Naresh Kamboju

On Mon, Dec 7, 2009 at 9:06 PM, naresh kamboju <naresh.kernel@gmail.com> wrote:
> Hi,
>
> I have come across with semantic errors in the SystemTap testsuite
> while building test cases.
> /*************************************************************/
> File: tapset/signal.stp
> /*************************************************************/
> probe signal.handle = kernel.function("handle_signal")
> {
>    sig = $sig
>    sig_name = _signal_name($sig)
>    .
>    .
>    // Check whether the signal is a User Mode or Kernel mode Signal.
>
>    if (sinfo == 0 && sig_code <= 0)
>        sig_mode = "User Mode Signal"
>    else if (sinfo >=  1)
>        sig_mode = "Kernel Mode Signal"
> }
>
> probe signal.handle.return = kernel.function("handle_signal").return ?
> {
>    retstr = returnstr(1)
> }
> /*************************************************************/
> build log
> /*************************************************************/
> semantic error: failed to retrieve return value location for
> copy_process(kernel/fork.c): identifier '$return' at
> /usr/local/arm/devel/share/systemtap/tapset/kprocess.stp:28:12
>        source:     task = $return
>                           ^
> semantic error: failed to retrieve return value location for
> do_execve(fs/exec.c): identifier '$return' at :78:13
>        source:     errno = $return
>                            ^
> semantic error: not accessible at this address (0x80025c5c):
> identifier '$sig' at
> /usr/local/arm/devel/share/systemtap/tapset/signal.stp:526:11
>        source:     sig = $sig
>                          ^
> semantic error: not accessible at this address (0x80025c5c):
> identifier '$sig' at :527:29
>        source:     sig_name = _signal_name($sig)
>                                            ^
> semantic error: probe_1813 with unresolved type: identifier 'sig' at
> /usr/local/arm/devel/share/systemtap/tapset/signal.stp:526:5
>        source:     sig = $sig
>                    ^
> semantic error: probe_1813 with unresolved type: identifier 'sig' at
> process_test.stp:43:14
>        source:   log(sprint(sig))
>                             ^
> semantic error: probe_1813 with unresolved type: identifier 'sprint' at :43:7
>        source:   log(sprint(sig))
>                      ^
> semantic error: probe_1813 with unresolved type: identifier 'log' at :43:3
>        source:   log(sprint(sig))
>                  ^
> Pass 2: analyzed script: 11 probe(s), 16 function(s), 16 embed(s), 0
> global(s) in 230usr/50sys/289real ms.
> Pass 2: analysis failed.  Try again with another '--vp 01' option.
> Keeping temporary directory "/tmp/stapFqPOLz"
> /*************************************************************/
> This symbol is not present in the Kernel
> #nm vmlinux | grep "handle_signal"
> << nothing related to handle_signal >>
> /*************************************************************/
> I have made the following changes to Kernel make test work
>
> make global and Export:
> ------------------------------------------------------------------------------------
>  Index: b/arch/arm/kernel/signal.c
> ===================================================================
> --- a/arch/arm/kernel/signal.c
> +++ b/arch/arm/kernel/signal.c
> @@ -584,8 +584,14 @@ struct arm_abi arm_abi = {
>        .restart        = __NR_restart_syscall
>  };
>
> +#if 0
>  static int handle_signal(unsigned long sig, siginfo_t *info,
>        struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
> +#else
> +#include <linux/module.h>
> +int handle_signal(unsigned long sig, siginfo_t *info,
> +       struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
> +#endif
>  {
>        int ret;
>
> @@ -621,6 +627,7 @@ static int handle_signal(unsigned long s
>
>        return ret;
>  }
> +EXPORT_SYMBOL(handle_signal);
>
>  static void do_signal(struct pt_regs *regs)
>  {
>
> /*************************************************************/
> I can say that the above method is not the best way to fix the issues.
>
> I have notices much these kinds of issues almost 70+ test cases.
> I have tested with systemtap-0.9.5 … systemtap-1.0.
>
> All these are expected failures?
> If not,
> Do we need to fix these issues at SystemTap or Kernel side?
>
> Best regards
> Naresh Kamboju
>

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

* Re: unresolved type-semantic error
  2009-12-08  9:53 ` naresh kamboju
@ 2009-12-17 17:28   ` Frank Ch. Eigler
  0 siblings, 0 replies; 3+ messages in thread
From: Frank Ch. Eigler @ 2009-12-17 17:28 UTC (permalink / raw)
  To: naresh kamboju; +Cc: systemtap

Hi -

> As per my analysis, these below tapsets are presented from
> systemtap-v.0.6 and also which are known failures.
> [...]

The transcript indicates a couple of different types of problems.  It
may be necessary to amend the testsuite or tapsets with clauses like
%( arch == "arm" %? ... %: ... %) to get at differently named
functions or parameters.  It's hard to help except by individual error
messages and lots of source excerpts, or access to a suitable build
environment for local problem reproduction.

- FChE

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

end of thread, other threads:[~2009-12-17 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-07 15:36 unresolved type-semantic error naresh kamboju
2009-12-08  9:53 ` naresh kamboju
2009-12-17 17:28   ` Frank Ch. Eigler

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).