Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341292

Summary: Error message when opcontrol script returns an error needs improvement
Product: z_Archived Reporter: Corey Ashford <cjashfor>
Component: LinuxToolsAssignee: OProfile Inbox <linux.oprofile-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: kksebasti, overholt
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Improves error message when opcontrol returns a non-zero status
none
Improves error message when opcontrol returns a non-zero status overholt: iplog+

Description Corey Ashford CLA 2011-03-29 18:23:47 EDT
Created attachment 192145 [details]
Improves error message when opcontrol returns a non-zero status

On systems without /usr/bin/consolehelper, you must run the install_noconsolehelper.sh which causes you to edit the /etc/sudoers file.

If this editing wasn't done correctly, or was performed by another user, opcontrol will return an error code, essentially saying that "sudo opcontrol" failed.  The error message given by the oprofile plug-in is obtuse.

I have created and attached a small patch to improve the error message.
Comment 1 Andrew Overholt CLA 2011-03-30 10:14:01 EDT
Thanks, Corey.  I'd prefer something more generic than "/opt/at4.0/bin/opcontrol", though :)  Perhaps /path/to/opcontrol?
Comment 2 Corey Ashford CLA 2011-03-30 13:14:23 EDT
Created attachment 192210 [details]
Improves error message when opcontrol returns a non-zero status
Comment 3 Corey Ashford CLA 2011-03-30 13:16:38 EDT
Thanks for catching that error. I had posted the wrong version of the patch to this bugzilla (but the right one to the mailing list).

I've posted a new version with path corrected, and obsoleted the old one.
Comment 4 Andrew Overholt CLA 2011-03-30 16:14:02 EDT
Thanks, Corey.  I've applied it and pushed.  In the future, it would be nice if your patches could be applied with EGit but I'll take quality patches over having to use 'git am' :)

Applied in 0616ff686e4dc70af38d70543b7bf98a7a3bb460.
Comment 5 Corey Ashford CLA 2011-03-30 16:54:15 EDT
I'm certainly willing to do whatever it takes to submit future patches in whatever form can be used by Egit.

For this patch, I just used the standard command line "git format-patch" command.

What do I need to change to make a patch appliable by Egit?
Comment 6 Andrew Overholt CLA 2011-03-31 09:47:20 EDT
Corey and I spoke about this on IRC, but to close the loop here on the bug:  I pointed Corey to the EGit user guide, especially this section:

http://wiki.eclipse.org/EGit/User_Guide#Creating_Patches

Although I may have been bitten by:

http://wiki.eclipse.org/EGit/User_Guide#Applying_Patches

"Currently it s not possible to apply all patches in git format. It is possible to apply patches using the standard Eclipse (unified diff) format using Team > Apply Patch.... Git patches may contain non-standard extensions for rename and binary diffs. The current version of EGit does not generate these extensions. "