The Samba-Bugzilla – Attachment 6795 Details for
Bug 8391
[PATCH] tests/*.c: Honor TESTDIR environment variable if set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] tests/*.c: Honor TESTDIR environment variable if set
samba-3.5.11-tests-in-TESTDIR.patch (text/plain), 1.97 KB, created by
SATOH Fumiyasu
on 2011-08-22 05:24:15 UTC
(
hide
)
Description:
[PATCH] tests/*.c: Honor TESTDIR environment variable if set
Filename:
MIME Type:
Creator:
SATOH Fumiyasu
Created:
2011-08-22 05:24:15 UTC
Size:
1.97 KB
patch
obsolete
>From 2c08f96775f1c0d9f21d7887582ddf280efad72f Mon Sep 17 00:00:00 2001 >From: SATOH Fumiyasu <fumiyas@osstech.co.jp> >Date: Sat, 13 Aug 2011 23:36:39 +0900 >Subject: [PATCH] tests/*.c: Honor TESTDIR environment variable if set > >--- > tests/fcntl_lock64.c | 4 ++++ > tests/ftruncate.c | 7 ++++++- > tests/readlink.c | 4 ++++ > tests/shared_mmap.c | 9 +++++++-- > 4 files changed, 21 insertions(+), 3 deletions(-) > >diff --git a/tests/fcntl_lock64.c b/tests/fcntl_lock64.c >index e5ecd88..0e881db 100644 >--- a/tests/fcntl_lock64.c >+++ b/tests/fcntl_lock64.c >@@ -35,6 +35,10 @@ int main(int argc, char *argv[]) > struct flock64 lock; > int fd, ret, status=1; > pid_t pid; >+ char *testdir = NULL; >+ >+ testdir = getenv("TESTDIR"); >+ if (testdir) chdir(testdir); > > if (!(pid=fork())) { > sleep(2); >diff --git a/tests/ftruncate.c b/tests/ftruncate.c >index d3e5de3..44f6f12 100644 >--- a/tests/ftruncate.c >+++ b/tests/ftruncate.c >@@ -14,8 +14,13 @@ > main() > { > int *buf; >- int fd = open(DATA,O_RDWR|O_CREAT|O_TRUNC,0666); >+ int fd; >+ char *testdir = NULL; > >+ testdir = getenv("TESTDIR"); >+ if (testdir) chdir(testdir); >+ >+ fd = open(DATA,O_RDWR|O_CREAT|O_TRUNC,0666); > if (fd == -1) { > exit(1); > } >diff --git a/tests/readlink.c b/tests/readlink.c >index 3784288..183ad53 100644 >--- a/tests/readlink.c >+++ b/tests/readlink.c >@@ -16,6 +16,10 @@ main() > char buf[7]; > int ret; > ssize_t rl_ret; >+ char *testdir = NULL; >+ >+ testdir = getenv("TESTDIR"); >+ if (testdir) chdir(testdir); > > unlink(FNAME); > ret = symlink(DATA, FNAME); >diff --git a/tests/shared_mmap.c b/tests/shared_mmap.c >index 40d4623..a930f65 100644 >--- a/tests/shared_mmap.c >+++ b/tests/shared_mmap.c >@@ -18,10 +18,15 @@ > main() > { > int *buf; >- int i; >- int fd = open(DATA,O_RDWR|O_CREAT|O_TRUNC,0666); >+ int i; >+ int fd; > int count=7; >+ char *testdir = NULL; > >+ testdir = getenv("TESTDIR"); >+ if (testdir) chdir(testdir); >+ >+ fd = open(DATA,O_RDWR|O_CREAT|O_TRUNC,0666); > if (fd == -1) exit(1); > > for (i=0;i<10000;i++) { >-- >1.7.5.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8391
: 6795