Bug #51271 | Compiling MySQL 5.1.43 make test "information_schema_chmod" failed as root | ||
---|---|---|---|
Submitted: | 18 Feb 2010 7:01 | Modified: | 5 May 2011 9:47 |
Reporter: | Boa Thor | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Tests: Server | Severity: | S3 (Non-critical) |
Version: | 5.1.43, 5.1.45-bzr | OS: | Any |
Assigned to: | Joerg Bruehe | CPU Architecture: | Any |
Tags: | information_schema_chmod, Result length mismatch, root |
[18 Feb 2010 7:01]
Boa Thor
[19 Feb 2010 11:03]
Valeriy Kravchuk
I've easily reproduced this bug. Actually, one should NEVER compile or run make or make test as root, only make install (after all tests passed). But as this is NOT clearly documented at http://dev.mysql.com/doc/refman/5.1/en/mysql-test-suite.html and mtr does NOT complain clearly (it says only about security implications of running mysqld as root), I'd still say that there is something to fix here. Either test should be skipped or it should work correctly.
[5 May 2011 9:47]
Joerg Bruehe
Sorry, I cannot reproduce this: When running the test using root privileges, it is skipped. This is what it looks like for me: ===== PROMPT> sudo ./mysql-test-run.pl information_schema_chmod Logging: ./mysql-test-run.pl information_schema_chmod 110505 11:21:55 [Note] Plugin 'FEDERATED' is disabled. 110505 11:21:55 [Note] Plugin 'ndbcluster' is disabled. MySQL Version 5.1.58 Checking supported features... - skipping ndbcluster - SSL connections supported Collecting tests... vardir: /MySQL/REPO/V51/work-5.1/mysql-test/var Checking leftover processes... Removing old var directory... Creating var directory '/MySQL/REPO/V51/work-5.1/mysql-test/var'... Installing system database... Using server port 41596 worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009 ============================================================================== TEST RESULT TIME (ms) ------------------------------------------------------------ worker[1] mysql-test-run: WARNING: running this script as _root_ will cause some tests to be skipped main.information_schema_chmod [ skipped ] Not as root ------------------------------------------------------------ The servers were restarted 0 times Spent 0.000 of 6 seconds executing testcases Completed: All 0 tests were successful. ===== Checking the test source, it looks ok: ===== PROMPT> cat t/information_schema_chmod.test # # Due to "Bug#18474 Unlistable directories yield no info from ... # This test uses chmod, can't be run with root permissions -- source include/not_as_root.inc ... ===== Checking the test history using BZR, I see that this protection was added to the test in early 2006, still in MySQL 5.0, so it should have been present in all 5.1 versions. The included file implementing the check, "include/not_as_root.inc", is unchanged since August, 2008. The necessary infrastructure for this check, function "check_running_as_root()" in the Perl script "mysql-test-run.pl", is unchanged even since May, 2006. So I don't see how this test could (in recent years) have been attempted when the suite is being run with root privileges. I set this report to "Cannot repeat", and there is no need to document a non-change. That said, all the usual warnings about (not) doing normal work when having root privileges apply to building, testing, and running MySQL like they do for any other work. I do not consider it necessary to add a specific warning against this to the manual, it should be evident for every developer or tester. In the specific case of building RPMs, for me it works well to set up my environment such that I can do the build (and the test) using ordinary user privileges, and I strongly recommend to the bug reporter to do the same. The RPM documentation has information how to do that.