* Use 'tst_tmpdir' and 'tst_rmdir'.
* Add 'static' for the cleanup.

Signed-off-by: Zeng Linggang <zenglg...@cn.fujitsu.com>
---
 testcases/network/lib6/asapi_07.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/testcases/network/lib6/asapi_07.c 
b/testcases/network/lib6/asapi_07.c
index 826cea6..97221f7 100644
--- a/testcases/network/lib6/asapi_07.c
+++ b/testcases/network/lib6/asapi_07.c
@@ -86,6 +86,7 @@ static struct etent {
 };
 
 static void setup(void);
+static void cleanup(void);
 static void adatet(const struct etent *etptr);
 
 char *TCID = "asapi_07";
@@ -106,12 +107,20 @@ int main(int argc, char *argv[])
                        adatet(&etab[i]);
        }
 
+       cleanup();
        tst_exit();
 }
 
 void setup(void)
 {
        TEST_PAUSE;
+
+       tst_tmpdir();
+}
+
+static void cleanup(void)
+{
+       tst_rmdir();
 }
 
 /*  existence tests */
-- 
1.9.3


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to