summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-05-08 11:31:34 -0700
committerJeremy Allison <jra@samba.org>2009-05-08 11:39:05 -0700
commit3d6f4a7af7b91d9f9ac9fd0b00af63bb23e371f7 (patch)
tree3f5c0bc15c8c95eff144cc0c3bf3279becd417f7 /tests
parentf47b220ce1bd8632205679bbba8f679f4470360b (diff)
downloadsamba-3d6f4a7af7b91d9f9ac9fd0b00af63bb23e371f7.tar.gz
samba-3d6f4a7af7b91d9f9ac9fd0b00af63bb23e371f7.tar.bz2
samba-3d6f4a7af7b91d9f9ac9fd0b00af63bb23e371f7.zip
Fix bug #6330 - DFS doesn't work on AIX. Jeremy.
Diffstat (limited to 'tests')
-rw-r--r--tests/readlink.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/readlink.c b/tests/readlink.c
new file mode 100644
index 0000000000..a07e62aa75
--- /dev/null
+++ b/tests/readlink.c
@@ -0,0 +1,33 @@
+/* test whether readlink returns a short buffer correctly. */
+
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#define DATA "readlink.test"
+#define FNAME "rdlnk.file"
+
+main()
+{
+ int buf[7];
+ int ret;
+ ssize_t rl_ret;
+
+ unlink(FNAME);
+ ret = symlink(DATA, FNAME);
+ if (ret == -1) {
+ exit(1);
+ }
+
+ rl_ret = readlink(FNAME, buf, sizeof(buf));
+ if (rl_ret == -1) {
+ unlink(FNAME);
+ exit(1);
+ }
+ unlink(FNAME);
+ exit(0);
+}