Bug 8288

Summary: XDG_UTILS_DEBUG_LEVEL not set correctly after su -
Product: Portland Reporter: Scott Bambrough <scottb>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: beta4   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Proposed patch to propagate XDG_UTILS_DEBUG_LEVEL.

Description Scott Bambrough 2006-09-15 12:48:02 UTC
Run the following as a normal user:
XDG_UTILS_DEBUG_LEVEL=100 ./testrun

testrun will su to root, but the debug level is not progated to root's
environment, so no debug messages are available for the tests run as root.
Comment 1 Scott Bambrough 2006-09-15 12:49:14 UTC
Created attachment 6995 [details] [review]
Proposed patch to propagate XDG_UTILS_DEBUG_LEVEL.
Comment 2 Scott Bambrough 2006-09-15 12:54:15 UTC
The following code snippet is from assert_interactive() in testassertions.sh.

if [ "$TEST_STATUS" = 'FAIL' -a -z "$XDG_UTILS_DEBUG_LEVEL" -a "$expect" != C ]
; then
   ## Don't waste user's time if test has already failed.
   test_infoline "Test has already failed. Not bothering to ask '$query'"
   return
fi

When the tests are run with XDG_UTILS_DEBUG_LEVEL set, assert_interactive will
continue the test even if it has already failed.  Is there a reason why this is
done?
Comment 3 Waldo Bastian 2006-09-15 15:40:17 UTC
Thanks, seems XDG_UTILS_DEBUG_LEVEL wasn't handled very well in the test. debug
output is now collected in the log file iff the test fails.

Also fixed the scripts themselves to handle the case when XDG_UTILS_DEBUG_LEVEL
is set but empty.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.