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

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