diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-09-03 17:01:32 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-09-03 17:01:32 +0200 |
commit | 50067dafdb36ac2a6cbdb0186fa22082cf424e9a (patch) | |
tree | 321dbb45c815d3ea5f4fed41c680e7b63de78e6e /tests/tar_ustar.c | |
parent | face4b1257b6f897906f51510b7f4e8793e6465a (diff) |
Cleanup: reduce tar test cases to a few generic C files
This commit removes the existing tar test cases that simply call the
generic test case function with several different paths with generic
test case source files that are parameneterized via the pro-processor.
For each tar archive, a separate test case is generated.
On the one hand, this reduces the test source code to practically
nothing. On the other hand, a test binary is generated for every
distinct test case, instead of one per group and we get more detailed
insights if something goes wrong.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/tar_ustar.c')
-rw-r--r-- | tests/tar_ustar.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/tar_ustar.c b/tests/tar_ustar.c deleted file mode 100644 index 8ca1b36..0000000 --- a/tests/tar_ustar.c +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later */ -/* - * tar_ustar.c - * - * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> - */ -#include "test_tar.h" - -static const char *filename = -"012345678901234567890123456789/012345678901234567890123456789/" -"012345678901234567890123456789/012345678901234567890123456789/" -"012345678901234567890123456789/input.txt"; - -int main(void) -{ - TEST_ASSERT(chdir(TEST_PATH) == 0); - - testcase_simple("format-acceptance/ustar.tar", 1542905892, - 1000, 1000, "input.txt"); - testcase_simple("format-acceptance/ustar-pre-posix.tar", 1542905892, - 1000, 1000, "input.txt"); - testcase_simple("format-acceptance/v7.tar", 1542905892, - 1000, 1000, "input.txt"); - testcase_simple("user-group-largenum/8-digit.tar", 1542995392, - 8388608, 8388608, "input.txt"); - testcase_simple("large-mtime/12-digit.tar", 8589934592L, - 1000, 1000, "input.txt"); - testcase_simple("long-paths/ustar.tar", 1542909670, - 1000, 1000, filename); - - test_case_file_size("file-size/12-digit.tar"); - return EXIT_SUCCESS; -} |