mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 22:40:05 +00:00
Update.
* posix/tst-chmod.c (do_test): Account for people running the tests as root.
This commit is contained in:
parent
44b6044680
commit
58363448b2
@ -1,5 +1,8 @@
|
||||
2000-10-26 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* posix/tst-chmod.c (do_test): Account for people running the
|
||||
tests as root.
|
||||
|
||||
* locale/langinfo.h (THOUSEP): Define this and don't duplicate
|
||||
definition of THOUSANDS_SEP.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Tests of X and POSIX locale contents.
|
||||
/* Tests of C and POSIX locale contents.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
|
||||
|
||||
@ -151,6 +151,12 @@ run_test (const char *locname)
|
||||
STRTEST (T_FMT, "%H:%M:%S");
|
||||
STRTEST (T_FMT_AMPM, "%I:%M:%S %p");
|
||||
|
||||
STRTEST (RADIXCHAR, ".");
|
||||
STRTEST (THOUSEP, "");
|
||||
|
||||
STRTEST (YESEXPR, "^[yY]");
|
||||
STRTEST (NOEXPR, "^[nN]");
|
||||
|
||||
/* Extensions. */
|
||||
WSTRTEST (_NL_WABDAY_1, L"Sun");
|
||||
WSTRTEST (_NL_WABDAY_2, L"Mon");
|
||||
@ -200,6 +206,18 @@ run_test (const char *locname)
|
||||
STRTEST (_DATE_FMT, "%a %b %e %H:%M:%S %Z %Y");
|
||||
WSTRTEST (_NL_W_DATE_FMT, L"%a %b %e %H:%M:%S %Z %Y");
|
||||
|
||||
STRTEST (INT_CURR_SYMBOL, "");
|
||||
STRTEST (CURRENCY_SYMBOL, "");
|
||||
STRTEST (MON_DECIMAL_POINT, "");
|
||||
STRTEST (MON_THOUSANDS_SEP, "");
|
||||
STRTEST (MON_GROUPING, "");
|
||||
STRTEST (POSITIVE_SIGN, "");
|
||||
STRTEST (NEGATIVE_SIGN, "");
|
||||
STRTEST (GROUPING, "");
|
||||
|
||||
STRTEST (YESSTR, "");
|
||||
STRTEST (NOSTR, "");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -145,9 +145,12 @@ do_test (int argc, char *argv[])
|
||||
|
||||
fd = creat (testfile, 0);
|
||||
if (fd != -1)
|
||||
{
|
||||
if (getuid () != 0)
|
||||
{
|
||||
puts ("managed to create test file in protected directory");
|
||||
result = 1;
|
||||
}
|
||||
close (fd);
|
||||
}
|
||||
if (errno != EACCES)
|
||||
@ -166,9 +169,12 @@ do_test (int argc, char *argv[])
|
||||
|
||||
fd = creat (testfile, 0);
|
||||
if (fd != -1)
|
||||
{
|
||||
if (getuid () != 0)
|
||||
{
|
||||
puts ("managed to create test file in no-x protected directory");
|
||||
result = 1;
|
||||
}
|
||||
close (fd);
|
||||
}
|
||||
if (errno != EACCES)
|
||||
@ -310,10 +316,13 @@ do_test (int argc, char *argv[])
|
||||
{
|
||||
snprintf (buf, buflen, "./%s/file", basename (testdir));
|
||||
if (chmod (buf, 0600) == 0)
|
||||
{
|
||||
if (getuid () != 0)
|
||||
{
|
||||
puts ("chmod(\".../file\") with no-exec directory succeeded");
|
||||
result = 1;
|
||||
}
|
||||
}
|
||||
else if (errno != EACCES)
|
||||
{
|
||||
puts ("chmod(\".../file\") with no-exec directory didn't set EACCES");
|
||||
|
Loading…
Reference in New Issue
Block a user