aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-10-27 02:55:22 +0000
committerUlrich Drepper <drepper@redhat.com>2000-10-27 02:55:22 +0000
commit58363448b2cb724459f83723b02d99eb5bd8aed0 (patch)
treeffa85a16eca0d66e1efe55faf23fd3a331cbdfec
parent44b60446803538e3d6f573f6a321b07e8c712212 (diff)
downloadglibc-58363448b2cb724459f83723b02d99eb5bd8aed0.tar
glibc-58363448b2cb724459f83723b02d99eb5bd8aed0.tar.gz
glibc-58363448b2cb724459f83723b02d99eb5bd8aed0.tar.bz2
glibc-58363448b2cb724459f83723b02d99eb5bd8aed0.zip
Update.
* posix/tst-chmod.c (do_test): Account for people running the tests as root.
-rw-r--r--ChangeLog3
-rw-r--r--locale/tst-C-locale.c20
-rw-r--r--posix/tst-chmod.c21
3 files changed, 37 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 458cf8e20f..60bc0dbc74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/locale/tst-C-locale.c b/locale/tst-C-locale.c
index dc6a162e8b..e14806f578 100644
--- a/locale/tst-C-locale.c
+++ b/locale/tst-C-locale.c
@@ -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;
}
diff --git a/posix/tst-chmod.c b/posix/tst-chmod.c
index f7a37fa3a3..b031fbe6f4 100644
--- a/posix/tst-chmod.c
+++ b/posix/tst-chmod.c
@@ -146,8 +146,11 @@ do_test (int argc, char *argv[])
fd = creat (testfile, 0);
if (fd != -1)
{
- puts ("managed to create test file in protected directory");
- result = 1;
+ if (getuid () != 0)
+ {
+ puts ("managed to create test file in protected directory");
+ result = 1;
+ }
close (fd);
}
if (errno != EACCES)
@@ -167,8 +170,11 @@ do_test (int argc, char *argv[])
fd = creat (testfile, 0);
if (fd != -1)
{
- puts ("managed to create test file in no-x protected directory");
- result = 1;
+ if (getuid () != 0)
+ {
+ puts ("managed to create test file in no-x protected directory");
+ result = 1;
+ }
close (fd);
}
if (errno != EACCES)
@@ -311,8 +317,11 @@ do_test (int argc, char *argv[])
snprintf (buf, buflen, "./%s/file", basename (testdir));
if (chmod (buf, 0600) == 0)
{
- puts ("chmod(\".../file\") with no-exec directory succeeded");
- result = 1;
+ if (getuid () != 0)
+ {
+ puts ("chmod(\".../file\") with no-exec directory succeeded");
+ result = 1;
+ }
}
else if (errno != EACCES)
{