summaryrefslogtreecommitdiff
path: root/test/misc/tst-nftw.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-28 20:29:21 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-28 20:31:55 +0200
commit99ef2719fb3d703fe38c4113cd7f5adec516dd3a (patch)
tree2c1f77cb41b60ccbf8faa77a3640491a3546b546 /test/misc/tst-nftw.c
parent543308f6c46cf2edf8a524bc9c631e472570fe72 (diff)
test: remove test suite
The test suite is now a developed in a separate git repository. See here: http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng-test.git The test suite should be just like every other software compiled with the cross-toolchain. In the past strange problems where found when the test suite got build in the toolchain creation step.
Diffstat (limited to 'test/misc/tst-nftw.c')
-rw-r--r--test/misc/tst-nftw.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/test/misc/tst-nftw.c b/test/misc/tst-nftw.c
deleted file mode 100644
index 76d11eb41..000000000
--- a/test/misc/tst-nftw.c
+++ /dev/null
@@ -1,57 +0,0 @@
-#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE
-#include <ftw.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-int result = 0;
-
-static int process_one_entry(const char *fpath, const struct stat *sb,
- int typeflag, struct FTW *ftwbuf)
-{
-
- struct stat buf;
- const char *rel_path = fpath+ftwbuf->base;
-
- printf("Processing %s in working dir %s\n",
- rel_path, get_current_dir_name());
- if (stat(rel_path, &buf) < 0) {
- perror("Oops...relative path does not exist in current directory");
- result = 1;
- }
-}
-
-static int
-do_test(void)
-{
- char *path = "/tmp/stest_dir";
- char *subpath = "/tmp/stest_dir/d1";
- char *filepath = "/tmp/stest_dir/f1";
- char *filesubpath = "/tmp/stest_dir/d1/f2";
-
- if ((mkdir(path, 0700)) < 0)
- perror("Creating path");
- if ((mkdir(subpath, 0700)) < 0)
- perror("Creating subpath");
- if ((open(filepath, O_CREAT)) < 0)
- perror("Opening filepath");
- if ((open(filesubpath, O_CREAT)) < 0)
- perror("Opening filesubpath");
-
- if (nftw(path, process_one_entry, 100, (FTW_CHDIR|FTW_DEPTH|FTW_PHYS)) < 0)
- perror("ntfw");
-
- unlink(filesubpath);
- unlink(filepath);
- rmdir(subpath);
- rmdir(path);
-
- return result;
-}
-
-#define TIMEOUT 5
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"