Bug 8288 - XDG_UTILS_DEBUG_LEVEL not set correctly after su -
Summary: XDG_UTILS_DEBUG_LEVEL not set correctly after su -
Status: RESOLVED FIXED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: beta4
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-15 12:48 UTC by Scott Bambrough
Modified: 2006-09-15 15:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Proposed patch to propagate XDG_UTILS_DEBUG_LEVEL. (766 bytes, patch)
2006-09-15 12:49 UTC, Scott Bambrough
Details | Splinter Review

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.