Bug 3648 - Translator should warn users executing tapsets with a clear message
Summary: Translator should warn users executing tapsets with a clear message
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
: 3661 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-04 21:51 UTC by Vara Prasad
Modified: 2007-05-08 18:54 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vara Prasad 2006-12-04 21:51:34 UTC
In systemtap tapsets and enduser scripts are written in the same language hence
it is very easy for an user to execute tapsets directly. Currently translator
doesn't give a clear error message to warn users of such wrong usage. Translator
should give a clear message to the user explaining why this is a illegal
operation and what they should do to correct it.
Comment 1 Frank Ch. Eigler 2006-12-04 22:07:34 UTC
Have you checked out this change?

2006-11-19  Frank Ch. Eigler  <fche@elastic.org>

        * main.cxx (main): Signal parse error if a tapset script
        is given as the user script.

Comment 2 Vara Prasad 2006-12-05 18:54:09 UTC
*** Bug 3661 has been marked as a duplicate of this bug. ***
Comment 3 Vara Prasad 2006-12-05 19:07:20 UTC
(In reply to comment #1)
> Have you checked out this change?
> 
> 2006-11-19  Frank Ch. Eigler  <fche@elastic.org>
> 
>         * main.cxx (main): Signal parse error if a tapset script
>         is given as the user script.
> 
> 

I did look at your change it gives bit following better error message than the past
parse error: tapset file '/usr/local/share/systemtap/tapset/tcp.stp' is already
processed as the user script.
Pass 1: parse failed. Try again with more '-v' (verbose) options.

But it is still not at all clear in my opinion to someone who is not initimately
familiar with the project and implementation. I would prefer to see a message
some what like 
"tapset files can not be run directly. Please run a user script that uses the
required tapset."
Comment 4 Frank Ch. Eigler 2006-12-06 17:14:31 UTC
A tweak to the error message was committed.
Comment 5 Frank Ch. Eigler 2007-05-08 19:54:22 UTC
improved