Commit Graph

47 Commits

Author SHA1 Message Date
Joel Sherrill
52a67757ef testsuites/libtests/[m-z]*: Change license to BSD-2
Updates #3053.
2022-04-12 13:35:39 -05:00
Joel Sherrill
acceb478ec testsuites/libtests/[p-z]*: Change license to BSD-2
Updates #3053.
2022-04-07 08:38:56 -05:00
Christian Mauderer
ffc57e3cf3 untar: Make behavior similar to GNU or BSD tar
RTEMS untar implementation had problems with overwriting or integrating
archives into existing directory structures. This patch adapts the
behavior to mimic that of a GNU tar or BSD tar and extends the tar01
test to check for the behavior. That is:

* If a directory structure exists, the files from the archive will be
  integrated. Existing files are overwritten.

* If a file exists and the archive contains a directory with the same
  name, the file is removed and a directory is created. In the above
  example: if l1/l2 is a file it will be overwritten with a new
  directory.

* If a directory exists and the archive contains a file with the same
  name, the directory will be replaced if it is empty. If it contains
  files, the result is an error.

* An archive also can contain only a file without the parent
  directories. If in that case one of the parent directories exists as a
  file extracting the archive results in an error. In the example: if
  l1/l2 is a file and the archive doesn't contain the directories but
  only the file l1/l2/x.txt that would be an error.

* In case of an error, it is possible that the archive has been
  partially extracted.

Closes #4568
2021-12-09 08:23:47 +01:00
Sebastian Huber
ea2d9237fc libtests/tar01: Remove files of tar01.tar archive
Update #3968.
2020-05-08 15:12:40 +02:00
Sebastian Huber
ef9517b7d5 libtests/tar0[12]: Add tar archive
Do not generate the test tar archive on the host computer since not all
file systems support symbolic links.

Close #3968.
2020-05-07 12:31:56 +02:00
Sebastian Huber
3cec2dfbc4 config: CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
Rename CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS into
CONFIGURE_MAXIMUM_FILE_DESCRIPTORS.

Update #3753.
2019-12-19 08:53:03 +01:00
Sebastian Huber
4551f5f0db untar: Properly make parent path
Close #3823.
2019-11-26 08:10:27 +01:00
Sebastian Huber
5c2e7104e7 libtests: Use '-' for TAR file names
Use uniform pattern for all TAR file names.  Use the dl* tests as a
template.

Update #3818.
2019-11-25 13:01:54 +01:00
Sebastian Huber
273e8b72c8 libtests/tar0[12]:: Use static archive content
This simplifies the build process.  Do not generate the archive content
through the build system.  Let the version control system deal with
symbolic links.

Update #3818.
2019-11-25 11:32:19 +01:00
Chris Johns
5c65b9881b testsuite/libtests: Merged nested Makefile.am files into one Makefile.am
This change is part of the testsuite Makefile.am reorganization.

Update #3382
2018-04-10 08:24:54 +10:00
Sebastian Huber
c4b8b147dd tests: Use simple console driver
Update #3170.
Update #3199.
2017-11-06 07:26:42 +01:00
Sebastian Huber
af4355459e tests: Remove TEST_INIT
The TEST_EXTERN is a used only by the system.h style tests and they use
CONFIGURE_INIT appropriately.

Update #3170.
Update #3199.
2017-10-28 13:33:56 +02:00
Sebastian Huber
73d892d8a8 tests: Use rtems_test_printer
Update #3170.
Update #3199.
2017-10-28 13:33:55 +02:00
Chris Johns
98c6d50145 testsuite: Use printk for all test output where possible.
- Remove the printf support leaving the direct printk support configured
  with TESTS_USE_PRINTK and all other output goes via a buffered vsniprintf
  call to printk.
- Control the test's single init for functions and global data with
  TEST_INIT and not CONFIGURE_INIT. They are now separate.

Updates #3170.
2017-10-23 16:25:45 +11:00
Sebastian Huber
a05861d471 libtests/tar01: Fix build dependencies 2017-10-21 12:17:23 +02:00
Sebastian Huber
07e178005a tests: Use floating point task
These tests directly or indirectly use fprintf(), etc. which may use the
floating point unit.

Update #3076.
2017-07-18 14:14:34 +02:00
Sebastian Huber
4000836c03 tests: Fix build dependencies
See also:

https://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html
2017-06-13 13:01:03 +02:00
Chris Johns
6130a47e72 testsuites: Fix build dependences for generated files. 2017-05-11 08:09:43 +10:00
Chris Johns
826f3afaf3 libmisc/xz: Add xz decompression.
Add support to untar XZ compressed files.
2016-10-13 13:11:40 +11:00
Chris Johns
b0f08c83e2 libmisc/untar: Set the perms to the value in the tar file.
This patch parses the mode field in the tar header and sets the
directory or file to the mode value in the header.

Closes #2768.
2016-08-09 17:22:26 +10:00
Alexander Krutwig
6a174c024a Add Untar_FromGzChunk_Print() + Test 2016-07-26 10:00:04 +02:00
Alexander Krutwig
1a8fe67acf Add Untar_FromChunk_Print() + Test 2016-07-26 10:00:04 +02:00
Chris Johns
d84e346b26 libmisc/untar: Support directory create and overwrites. Share the common code.
Support creating directories for files with a path depth greater than 1. Some
tar files can have files with a path depth greater than 1 and no directory
entry in the tar file to create a directory.

Support overwriting existing files and directories failing in a similar
way to tar on common hosts. If a file is replaced with a file delete the
file and create a new file. If a directory replaces a file remove the file
and create the directory. If a file replaces a directory remove the directory,
and if the directory is not empty and cannot be removed report an error. If a
directory alreday exists do nothing leaving the contents untouched.

The untar code now shares the common header parsing and initial processing
with the actual writes still separate. No changes to the IMFS have been made.

Updates #2415.
Closes #2207.
2016-06-03 18:14:20 +10:00
Sebastian Huber
a0b1b5edb8 Delete CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
This define was superfluous, undocumented and used inconsistently.
2014-12-16 11:34:38 +01:00
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Sebastian Huber
f8b2eb03f7 tests/libtests: Use <rtems/test.h> 2014-03-20 09:10:26 +01:00
Joel Sherrill
4c86e3d8be libtmtests - Eliminate missing prototype warnings 2012-05-11 12:20:47 -05:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines
  next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
  contain CVS Ids
+ If the processing left a blank line at the top of
  a file, it was removed.
2012-05-11 08:44:13 -05:00
Joel Sherrill
33a105fb69 Revert: Remove CVS Ids
See http://www.rtems.org/pipermail/rtems-devel/2012-May/001006.html
for details.
2012-05-07 11:08:48 -05:00
Ralf Corsépius
820d82ed8a Remove CVS-Ids. 2012-05-04 09:36:24 +02:00
Joel Sherrill
61250b4ce9 Remove all .cvsignore files. 2012-02-01 10:59:44 -06:00
Joel Sherrill
6f9ce8f4c6 2011-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1589/build
	* block01/Makefile.am, block02/Makefile.am, block03/Makefile.am,
	block04/Makefile.am, block05/Makefile.am, block06/Makefile.am,
	block07/Makefile.am, block08/Makefile.am, block09/Makefile.am,
	block10/Makefile.am, bspcmdline01/Makefile.am, cpuuse/Makefile.am,
	devfs01/Makefile.am, devfs02/Makefile.am, devfs03/Makefile.am,
	devfs04/Makefile.am, deviceio01/Makefile.am,
	devnullfatal01/Makefile.am, dumpbuf01/Makefile.am, ftp01/Makefile.am,
	gxx01/Makefile.am, heapwalk/Makefile.am, malloc02/Makefile.am,
	malloc03/Makefile.am, malloc04/Makefile.am, malloc05/Makefile.am,
	malloctest/Makefile.am, monitor/Makefile.am, monitor02/Makefile.am,
	mouse01/Makefile.am, putenvtest/Makefile.am, rtems++/Makefile.am,
	rtmonuse/Makefile.am, stackchk/Makefile.am, stackchk01/Makefile.am,
	stringto01/Makefile.am, tar01/Makefile.am, tar02/Makefile.am,
	tar03/Makefile.am, termios/Makefile.am, termios01/Makefile.am,
	termios02/Makefile.am, termios03/Makefile.am, termios04/Makefile.am,
	termios05/Makefile.am, termios06/Makefile.am, termios07/Makefile.am,
	termios08/Makefile.am, tztest/Makefile.am: Remove obsolete optional
	manager capability.
2011-12-08 21:38:12 +00:00
Ralf Corsepius
e8899de3fa 2011-06-20 Ralf Corsépius <ralf.corsepius@rtems.org>
* devfs04/Makefile.am, deviceio01/Makefile.am,
	monitor02/Makefile.am, stackchk01/Makefile.am,
	stringto01/Makefile.am, tar01/Makefile.am,
	tar02/Makefile.am, termios01/Makefile.am,
	termios03/Makefile.am, termios04/Makefile.am
	tztest/Makefile.am: Add missing files.
2011-06-20 08:53:03 +00:00
Sebastian Huber
5bd6123f77 2011-04-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
* tar01/init.c: Fixed integer types.
2011-04-05 09:19:53 +00:00
Ralf Corsepius
7d3f9c646a Add HAVE_CONFIG_H. 2011-02-22 07:37:03 +00:00
Ralf Corsepius
cc43b36400 2010-07-31 Ralf Corsépius <ralf.corsepius@rtems.org>
* tar01/Makefile.am, tar02/Makefile.am: Apply clean-local to remove
	intital_fs directory.
2010-07-31 03:07:34 +00:00
Ralf Corsepius
e1b8e8e732 2010-07-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* tar01/Makefile.am, tar02/Makefile.am: Apply TARTESTS.
2010-07-30 08:56:09 +00:00
Ralf Corsepius
9b52f0ef04 Fix typo. 2010-07-30 08:53:58 +00:00
Ralf Corsepius
a7b7386772 2010-07-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* tar01/Makefile.am:
	Apply $LN_S, $PAX. Use subshell for tarball creation.
	Don't add initial_fs to CLEANFILES.
	* tar02/Makefile.am:
	Apply $LN_S, $PAX. Use subshell for tarball creation.
2010-07-30 08:46:13 +00:00
Ralf Corsepius
b3c6b5e867 2010-07-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* tar01/Makefile.am, tar02/Makefile.am:
	Eliminate stamp-filesystem.
2010-07-30 06:13:06 +00:00
Ralf Corsepius
1061b9df74 2010-07-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* tar01/Makefile.am, tar02/Makefile.am:
	Add BUILT_SOURCES.
2010-07-30 05:51:07 +00:00
Ralf Corsepius
b013e6d323 2010-06-23 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: autoconf >= 2.65, automake >= 1.11.
2010-07-30 04:00:20 +00:00
Joel Sherrill
8091f2466f 2010-07-29 Joel Sherrill <joel.sherrilL@OARcorp.com>
* tar01/Makefile.am, tar02/Makefile.am: Fix dependencies for parallel
	build.
2010-07-29 20:56:02 +00:00
Ralf Corsepius
1813048180 2010-07-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* tar01/Makefile.am, tar02/Makefile.am: Replace mkdir cascade
	with $(MKDIR_P).
2010-07-29 16:20:36 +00:00
Ralf Corsepius
48b2c10e49 2010-07-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* tar01/Makefile.am, tar02/Makefile.am: Misc. fixes.
2010-07-29 16:17:15 +00:00
Ralf Corsepius
57c841e909 Remove MANAGERS. 2010-07-29 16:13:36 +00:00
Joel Sherrill
270434cc4a 2010-07-27 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1532/testing
	* Makefile.am, configure.ac: Add initial tests for untar capabilities.
	* tar01/.cvsignore, tar01/Makefile.am, tar01/init.c, tar01/tar01.doc,
	tar01/tar01.scn, tar02/.cvsignore, tar02/Makefile.am, tar02/init.c,
	tar02/tar02.doc, tar02/tar02.scn: New files.
2010-07-27 18:16:50 +00:00