This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via aaab37cb397b77fa83eccd338da7b5ebab2dc49d (commit)
from ad2f07f5bef8a891ddc54c5d9e98d2aca0deffde (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit aaab37cb397b77fa83eccd338da7b5ebab2dc49d
Author: Waldemar Brodkorb <wbx(a)openadk.org>
Date: Sun Aug 30 06:50:59 2015 +0200
tst-mkostemps: fix test case on read-only root filesystem
Better use /tmp as embedded systems might have a read-only root.
Fix two wrong asserts.
-----------------------------------------------------------------------
Summary of changes:
test/misc/tst-mkostemps.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/test/misc/tst-mkostemps.c b/test/misc/tst-mkostemps.c
index 2f45bfd..272e747 100644
--- a/test/misc/tst-mkostemps.c
+++ b/test/misc/tst-mkostemps.c
@@ -33,7 +33,7 @@ main (int argc, char *argv[])
struct stat sb_f2;
/* mkstemp test */
- sprintf(name, "%s-uClibc-test.XXXXXX", __FILE__);
+ sprintf(name, "/tmp/%s-uClibc-test.XXXXXX", __FILE__);
fd = mkstemp(name);
@@ -49,7 +49,7 @@ main (int argc, char *argv[])
unlink (name);
/* mkstemps test */
- sprintf(name_suffix, "%s-uClibc-test.XXXXXX.txt", __FILE__);
+ sprintf(name_suffix, "/tmp/%s-uClibc-test.XXXXXX.txt", __FILE__);
fd = mkstemps(name_suffix, 4);
@@ -65,7 +65,7 @@ main (int argc, char *argv[])
unlink (name_suffix);
/* mkostemp test */
- sprintf(name, "%s-uClibc-test.XXXXXX", __FILE__);
+ sprintf(name, "/tmp/%s-uClibc-test.XXXXXX", __FILE__);
fd = mkostemp(name, flags);
@@ -82,14 +82,14 @@ main (int argc, char *argv[])
unlink (name);
/* mkostemps test */
- sprintf(name_suffix, "%s-uClibc-test.XXXXXX.txt", __FILE__);
+ sprintf(name_suffix, "/tmp/%s-uClibc-test.XXXXXX.txt", __FILE__);
fd = mkostemps(name_suffix, 4, flags);
fstat(fd, &sb_f1);
assert ((sb_f1.st_mode & S_IFMT) == S_IFREG)
- stat(name, &sb_f2);
+ stat(name_suffix, &sb_f2);
assert ((sb_f2.st_mode & S_IFMT) == S_IFREG)
assert (sb_f1.st_ino == sb_f2.st_ino)
@@ -99,14 +99,14 @@ main (int argc, char *argv[])
unlink (name_suffix);
/* suffixlen = 0 */
- sprintf(name_suffix, "%s-uClibc-test.XXXXXX", __FILE__);
+ sprintf(name_suffix, "/tmp/%s-uClibc-test.XXXXXX", __FILE__);
fd = mkostemps(name_suffix, 0, flags);
fstat(fd, &sb_f1);
assert ((sb_f1.st_mode & S_IFMT) == S_IFREG)
- stat(name, &sb_f2);
+ stat(name_suffix, &sb_f2);
assert ((sb_f2.st_mode & S_IFMT) == S_IFREG)
assert (sb_f1.st_ino == sb_f2.st_ino)
@@ -126,7 +126,7 @@ main (int argc, char *argv[])
assert(errno == EINVAL);
/* suffixlen < 0 */
- sprintf(name_suffix, "%s-uClibc-test.XXXXXX.txt", __FILE__);
+ sprintf(name_suffix, "/tmp/%s-uClibc-test.XXXXXX.txt", __FILE__);
fd = mkostemps(name_suffix, -1, flags);
@@ -134,7 +134,7 @@ main (int argc, char *argv[])
assert(errno == EINVAL);
/* Missing one X */
- sprintf(name_suffix, "%s-uClibc-test.XXXXX.txt", __FILE__);
+ sprintf(name_suffix, "/tmp/%s-uClibc-test.XXXXX.txt", __FILE__);
fd = mkostemps(name_suffix, 4, flags);
@@ -142,7 +142,7 @@ main (int argc, char *argv[])
assert(errno == EINVAL);
/* wrong suffixlen */
- sprintf(name_suffix, "%s-uClibc-test.XXXXXX.txt", __FILE__);
+ sprintf(name_suffix, "/tmp/%s-uClibc-test.XXXXXX.txt", __FILE__);
fd = mkostemps(name_suffix, 2, flags);
hooks/post-receive
--
uClibc-ng - small C library for embedded systems