]> granicus.if.org Git - strace/commitdiff
tests/xstat.c: do not remove sample file after test
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 20 Apr 2017 01:04:50 +0000 (03:04 +0200)
committerEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 20 Apr 2017 01:20:54 +0000 (03:20 +0200)
As tests are executed in separate directories now, there is no need to
remove sample file.

* tests/xstat.c (main): Remove unlink calls.

tests/xstatx.c

index 8d486ad5656ee6916121a3cca90fa26c14cdf5c0..38f115d3c15de0efe29c967e1032a27e26c6011b 100644 (file)
@@ -278,10 +278,8 @@ main(void)
        int rc;
 
        rc = create_sample(sample, SAMPLE_SIZE);
-       if (rc) {
-               (void) unlink(sample);
+       if (rc)
                return rc;
-       }
 
 # if TEST_BOGUS_STRUCT_STAT
        STRUCT_STAT *st_cut = tail_alloc(sizeof(long) * 4);
@@ -305,7 +303,6 @@ main(void)
                if (errno != EOVERFLOW) {
                        rc = (errno == ENOSYS) ? 77 : 1;
                        perror(TEST_SYSCALL_STR);
-                       (void) unlink(sample);
                        return rc;
                }
        }
@@ -369,7 +366,6 @@ main(void)
 
 # endif /* IS_STATX */
 
-               (void) unlink(sample);
                return 1;
        }
 
@@ -437,8 +433,6 @@ main(void)
 
 # endif /* IS_STATX */
 
-       (void) unlink(sample);
-
        puts("+++ exited with 0 +++");
        return 0;
 }