diff options
author | Chen Gong <gong.chen@linux.intel.com> | 2009-12-23 13:37:25 +0800 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2009-12-24 11:52:47 +0100 |
commit | e13a609c49ea5d97acb7e3dfba25a0df8df1b670 (patch) | |
tree | 2875f4f26749c54adcfe27b0448cd4662b497fce | |
parent | 13055bbd93eb179da8dda53c4dcdc632645f53be (diff) | |
download | mce-test-e13a609c49ea5d97acb7e3dfba25a0df8df1b670.tar.gz |
makefile cleanup
cleanup some confusion execution paths
Signed-off-by: Chen Gong <gong.chen@linux.intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | stress/Makefile | 1 | ||||
-rw-r--r-- | tools/Makefile | 5 | ||||
-rw-r--r-- | tsrc/Makefile | 1 | ||||
-rw-r--r-- | tsrc/tinjpage.c | 6 | ||||
-rw-r--r-- | tsrc/tsoftinj.c | 3 |
6 files changed, 12 insertions, 5 deletions
@@ -16,6 +16,7 @@ distclean: $(MAKE) -C tsrc distclean $(MAKE) -C stress distclean $(MAKE) reset + rm -rf bin/* reset: rm -rf work/* diff --git a/stress/Makefile b/stress/Makefile index 7192d6c..63fae6b 100644 --- a/stress/Makefile +++ b/stress/Makefile @@ -11,3 +11,4 @@ all: clean: $(MAKE) -C tools clean rm -rf bin log result runtest +distclean: clean diff --git a/tools/Makefile b/tools/Makefile index 00e16fb..42afa1c 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,4 +1,7 @@ all: + $(MAKE) -C simple_process + $(MAKE) -C simple_process install clean: -distclean: + $(MAKE) -C simple_process clean +distclean: clean diff --git a/tsrc/Makefile b/tsrc/Makefile index 5a9e033..8276d29 100644 --- a/tsrc/Makefile +++ b/tsrc/Makefile @@ -47,6 +47,7 @@ clean: rm -f ${EXE} ${OBJ} rm -f ${EXEKERNEL} ${OBJKERNEL} rm -f x.html unpoison-failed offlined + rm -f ~test* ~poison* distclean: clean diff --git a/tsrc/tinjpage.c b/tsrc/tinjpage.c index 4772ba5..c3f148f 100644 --- a/tsrc/tinjpage.c +++ b/tsrc/tinjpage.c @@ -220,7 +220,7 @@ int tempfd(void) { int fd; char buf[PATHBUFLEN]; - snprintf(buf, sizeof buf, TMPDIR "poison%d",tmpcount++); + snprintf(buf, sizeof buf, TMPDIR "~poison%d",tmpcount++); fd = open(buf, O_CREAT|O_RDWR, 0600); if (fd >= 0) unlink(buf); @@ -233,7 +233,7 @@ int playfile(char *buf) { int fd; if (buf[0] == 0) - snprintf(buf, PATHBUFLEN, TMPDIR "poison%d", tmpcount++); + snprintf(buf, PATHBUFLEN, TMPDIR "~poison%d", tmpcount++); fd = open(buf, O_CREAT|O_RDWR|O_TRUNC, 0600); if (fd < 0) err("opening temporary file in " TMPDIR); @@ -275,7 +275,7 @@ static void do_file_clean(int flags, char *name) { char *page; char fn[30]; - snprintf(fn, 30, TMPDIR "test%d", tmpcount++); + snprintf(fn, 30, TMPDIR "~test%d", tmpcount++); int fd = open(fn, O_RDWR|O_TRUNC|O_CREAT); if (fd < 0) err("open temp file"); diff --git a/tsrc/tsoftinj.c b/tsrc/tsoftinj.c index ee03aa0..02b0785 100644 --- a/tsrc/tsoftinj.c +++ b/tsrc/tsoftinj.c @@ -31,6 +31,7 @@ #define MADV_SOFT_OFFLINE 101 #define err(x) perror(x), exit(1) +#define TMPDIR "./" int PS; int exitcode; @@ -91,7 +92,7 @@ void offline(char *name, void *p) void disk_backed(char *name, int flags) { char fn[100]; - snprintf(fn, sizeof fn, "t%u", getpid()); + snprintf(fn, sizeof fn, TMPDIR "~test%u", getpid()); printf("shared, diskbacked\n"); int fd = open(fn, O_RDWR|O_CREAT|O_TRUNC, 0644); if (fd < 0) err("open tmpfile"); |