Age | Commit message (Collapse) | Author |
|
|
|
Since aa0c4b0df7cdc, erl_tar would write the local time (instead of
the POSIX time) into the tar header for the archived files. When
extracting the tar file, the extracted file could be set to a future
time (depending on the time zone).
We could do a minimal fix, but this seems to be a good time
to rewrite the time handling to use the new features that
allow file info to be read and written in the POSIX time
format.
First reported here: https://github.com/erlang/rebar3/issues/1554
|
|
|
|
|
|
Also let the test suite verify that all files that are
opened will be closed before the end of each test case.
aa0c4b0df7cdc7 introduced the file descriptor leak.
|
|
This commit introduces the following key changes:
- Support for reading tar archives in formats currently in common use,
such as v7, STAR, USTAR, PAX, and GNU tar's extensions to the
STAR/USTAR format.
- Support for writing PAX archives, only when necessary, using USTAR
when possible for greater portability.
These changes result in lifting of some prior restrictions:
- Support for reading archives produced by modern tar implementations
when other restrictions described below are present.
- Support for filenames which exceed 100 bytes in length, or paths which
exceed 255 bytes (see USTAR format specification for more details on
this restriction).
- Support for filenames of arbitrary length
- Support for unicode metadata (the previous behaviour of erl_tar was
actually violating the spec, by writing unicode-encoded data to fields
which are defined to be 7-bit ASCII, even though this technically
worked when using erl_tar at source and destination, it may not have
worked with other tar utilities, and this implementation now conforms
to the spec).
- Support for uid/gid values which cannot be converted to octal
integers.
|
|
Make sure that we always test the "+fnu" option on all
systems. It seems that it was not tested in our daily
builds, since they are run non-interactively.
Make sure that we sort the list of names in do_unicode/1.
Otherwise the test would only work in "+fnl" mode because
the list would only contain one element.
|
|
|
|
|
|
While we are it, also re-ident the files.
|
|
|
|
|
|
As a first step to removing the test_server application as
as its own separate application, change the inclusion of
test_server.hrl to an inclusion of ct.hrl and remove the
inclusion of test_server_line.hrl.
|
|
|
|
Use erlang:timestamp/0 instead now/0 when seeding the random
number generator.
|
|
The reason for this is a requirement on enabling ssh_sftp to write a tar file on the server.
This new api function is used by ssh_sftp:open_tar/3,4.
|
|
The POSIX standard for tar says that there must be at least
two 512-bytes zero blocks at the end of the tar archive file.
Our implementation would only emit a single 512-byte zero block if the
size of the last file was in the range 18*512 through 19*512-1 (modulo
20*512). GNU tar would correctly unpack such tar archive file, but
would emit a warning:
tar: A lone zero block at 20
|
|
|
|
|
|
|
|
Ever since the test suites were converted to the common_test
convention, the tests for long names started to fail on Windows. The
reason is that those test cases depend on the current working
directory, and that the current working directory in common_test test
cases is usually set to a directory with a longer pathname than in
test_server test suites.
Since neither Erlang/OTP nor common_test provides a portable way
to create a temporary directory with a short name, we will have to
abuse priv_dir by going upwards from it. For further information,
see the comment in run_in_short_tempdir/2.
|
|
Running Dialyzer on the test suites revealed a few type errors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* bg/cleanup-tests:
file_SUITE: eliminate a warning for an unused variable
kernel tests: modernize guard tests
unicode_SUITE: replace deprecated concat_binary/1 with list_to_binary/1
stdlib tests: modernize guard tests
Test suites: fix creation of Emakefiles
|
|
Don't change any guard tests in the id_transform_SUITE
module, because it intentionally use the old guard tests
to test that id_transform can handle them.
|
|
|