]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: integck: do not use tests_cat_pid
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 12 Apr 2011 11:36:57 +0000 (14:36 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 18 Apr 2011 14:44:45 +0000 (17:44 +0300)
Do not use the shared 'tests_cat_pid' function but use a simple
sprintf instead. This is another step to make integck independent
of the common code.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
tests/fs-tests/integrity/integck.c

index 546077c0f95d777085289d6e21e3a18a3f3d2af3..c21b488218a81518dd575ec5ac5b4c73faecaff1 100644 (file)
@@ -1970,14 +1970,14 @@ static void update_test_data(void)
 
 static int integck(void)
 {
-       pid_t pid;
+       unsigned int pid;
        int64_t rpt;
        char dir_name[256];
 
        /* Make our top directory */
        pid = getpid();
-       normsg("pid is %u", (unsigned) pid);
-       tests_cat_pid(dir_name, "integck_test_dir_", pid);
+       normsg("pid is %u", pid);
+       CHECK(sprintf(dir_name, "integck_test_dir_%u", pid) > 0);
        if (chdir(dir_name) != -1) {
                /* Remove it if it is already there */
                tests_clear_dir(".");