1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge bk-internal:/home/bk/mysql-4.1-maint

into  shellback.(none):/home/msvensson/mysql/mysql-4.1-maint


mysql-test/mysql-test-run.pl:
  Auto merged
This commit is contained in:
unknown
2007-05-23 12:15:25 +02:00

View File

@ -2143,16 +2143,23 @@ sub check_running_as_root () {
close FILE; close FILE;
} }
chmod(oct("0755"), $test_file); # Some filesystems( for example CIFS) allows reading a file
unlink($test_file); # although mode was set to 0000, but in that case a stat on
# the file will not return 0000
my $file_mode= (stat($test_file))[2] & 07777;
$ENV{'MYSQL_TEST_ROOT'}= "NO"; $ENV{'MYSQL_TEST_ROOT'}= "NO";
if ($result eq "MySQL") mtr_verbose("result: $result, file_mode: $file_mode");
if ($result eq "MySQL" && $file_mode == 0)
{ {
mtr_warning("running this script as _root_ will cause some " . mtr_warning("running this script as _root_ will cause some " .
"tests to be skipped"); "tests to be skipped");
$ENV{'MYSQL_TEST_ROOT'}= "YES"; $ENV{'MYSQL_TEST_ROOT'}= "YES";
} }
chmod(oct("0755"), $test_file);
unlink($test_file);
} }