Skip to contentSkip to conversation

hugemmap05: add missing temp directory creation

PATCH New CAI Qian 1 participant 1 message Dec 31, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1600876791.101387.1293792856780.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com

CAI Qian

author
#1 lore raw

PATCH 1/1 hugemmap05: add missing temp directory creation

This is in order to use *TESTDIR.

---
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c +4 -1
index 85fee4d..8768b69 100644
@@ -251,7 +251,6 @@ static void cleanup(void)
 {
 	int fd;
 
-	TEST_CLEANUP;
 	if (restore_shmmax) {
 		fd = open(PATH_SHMMAX, O_WRONLY);
 		if (fd == -1)
@@ -286,6 +285,8 @@ static void cleanup(void)
 		tst_resm(TINFO|TERRNO, "shmdt");
 		shmctl(shmid, IPC_RMID, NULL);
 	}
+	TEST_CLEANUP;
+	tst_rmdir();
 	tst_exit();
 }
 
@@ -296,6 +297,8 @@ static void setup(void)
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 	TEST_PAUSE;
+	tst_tmpdir();
+
 	if (shmid != -1) {
 		fp = fopen(PATH_SHMMAX, "r");
 		if (fp == NULL)
Signature · 1 line
1.7.3.2

From de035bb1a38af045349da32ad1558214a19f4502 Mon Sep 17 00:00:00 2001
From: CAI Qian <[email protected]>
Date: Fri, 31 Dec 2010 18:45:27 +0800
Subject: [PATCH] hugemmap05: add missing temp directory creation

This is in order to use *TESTDIR.

---
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c +4 -1
index 85fee4d..8768b69 100644
@@ -251,7 +251,6 @@ static void cleanup(void)
 {
 	int fd;
 
-	TEST_CLEANUP;
 	if (restore_shmmax) {
 		fd = open(PATH_SHMMAX, O_WRONLY);
 		if (fd == -1)
@@ -286,6 +285,8 @@ static void cleanup(void)
 		tst_resm(TINFO|TERRNO, "shmdt");
 		shmctl(shmid, IPC_RMID, NULL);
 	}
+	TEST_CLEANUP;
+	tst_rmdir();
 	tst_exit();
 }
 
@@ -296,6 +297,8 @@ static void setup(void)
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 	TEST_PAUSE;
+	tst_tmpdir();
+
 	if (shmid != -1) {
 		fp = fopen(PATH_SHMMAX, "r");
 		if (fp == NULL)
Signature · 1 line
1.7.3.2

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list