History log of /freebsd/usr.bin/xinstall/tests/install_test.sh (Results 1 – 15 of 15)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.2.0, release/13.4.0
# e8d027be 14-Aug-2024 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

install: print directory name instead of file name if mkstemp fails

Printing the file name doesn't make sense since mkstemp failing means
that the file wasn't created.

Also add a test case for this

install: print directory name instead of file name if mkstemp fails

Printing the file name doesn't make sense since mkstemp failing means
that the file wasn't created.

Also add a test case for this.

Co-authored-by: Jose Luis Duran <jlduran@gmail.com>
Reviewed by: imp,jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1383

show more ...


Revision tags: release/14.1.0
# 17dc7017 12-Apr-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

install: Simplify path construction.

There's no need to copy the path twice to split it into base and dir.
We simply call `basename()` first, then handle the two trivial cases in
which it isn't safe

install: Simplify path construction.

There's no need to copy the path twice to split it into base and dir.
We simply call `basename()` first, then handle the two trivial cases in
which it isn't safe to call `dirname()`.

While here, add an early check that the destination is not an empty
string. This would always fail eventually, so it may as well fail
right away. Also add a test case for this shortcut.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44743

show more ...


Revision tags: release/13.3.0, release/14.0.0
# 767c97c5 19-Oct-2023 Kyle Evans <kevans@FreeBSD.org>

install: handle -m +X more accurately

As described by chmod(1), +X in the mode may be used to optionally set
the +x bit if the file is a directory if any of the execute/search bits
are set in the or

install: handle -m +X more accurately

As described by chmod(1), +X in the mode may be used to optionally set
the +x bit if the file is a directory if any of the execute/search bits
are set in the original mode. The latter is not applicable because we
assume -m is a fresh mask, but a functional +X could be useful in the
former case if we're passing along a common INSTALL_MODE that's designed
to install either 0644 or 0755 depending simply on whether it's a
directory or not.

Reviewed by: des
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D42273

show more ...


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


Revision tags: release/13.2.0, release/12.4.0
# 36d67475 03-Aug-2022 Dag-Erling Smørgrav <des@FreeBSD.org>

xinstall: fix dounpriv logic, add tests

Sponsored by: Klara, Inc.
MFC after: 1 week


Revision tags: release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0
# a0b083fb 11-Jul-2020 Eugene Grosbein <eugen@FreeBSD.org>

Fix the tests for install(1): add support for STRIPBIN's -o option.

Reported by: lwhsu
MFC after: 1 week


Revision tags: release/11.4.0, release/12.1.0, release/11.3.0
# c2c227a5 03-Feb-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r343571 through r343711.


# 6cbda6d9 31-Jan-2019 Kyle Evans <kevans@FreeBSD.org>

install(1): Fix relative path calculation with partial common dest/src

For example, from the referenced PR [1]:

$ mkdir /tmp/lib/ /tmp/libexec
$ touch /tmp/lib/foo.so
$ install -lrs /tmp/lib/foo.so

install(1): Fix relative path calculation with partial common dest/src

For example, from the referenced PR [1]:

$ mkdir /tmp/lib/ /tmp/libexec
$ touch /tmp/lib/foo.so
$ install -lrs /tmp/lib/foo.so /tmp/libexec/

The common path identification bits terminate src at /tmp/lib/ and the
destination at /tmp/libe. The subsequent backtracking is then incorrect, as
it traverses the destination and backtraces exactly one level while eating
the 'libexec' because it was previously (falsely) identified as common with
'lib'.

The obvious fix would be to make sure we've actually terminated just after
directory separators and rewind a character if we haven't. In the above
example, we would end up rewinding to /tmp/ and subsequently doing the right
thing.

Test case added.

PR: 235330 [1]
MFC after: 1 week

show more ...


Revision tags: release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0
# 3947900c 12-Mar-2017 Enji Cooper <ngie@FreeBSD.org>

Restore some of the error message text accidentally removed in r315098

"unexpected symlink contents" is more pedantically correct than
"unexpected symlink".

MFC after: 1 week
X-MFC with: r315098
Sp

Restore some of the error message text accidentally removed in r315098

"unexpected symlink contents" is more pedantically correct than
"unexpected symlink".

MFC after: 1 week
X-MFC with: r315098
Sponsored by: Dell EMC Isilon

show more ...


# ec0ada9d 12-Mar-2017 Enji Cooper <ngie@FreeBSD.org>

Add 3 more testcases demonstrating how install -l sr works

The additional testcases use absolute paths for sources and targets,
as the other testcase which tested `-l sr` used flat relative paths in

Add 3 more testcases demonstrating how install -l sr works

The additional testcases use absolute paths for sources and targets,
as the other testcase which tested `-l sr` used flat relative paths in
the same directory.

Please note that these testcases do not test `-l a` -- that's already
addressed in the battery of tests.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

show more ...


# ef74be51 12-Mar-2017 Enji Cooper <ngie@FreeBSD.org>

Clarify src vs dest path mismatch in :symbolic_link_{absolute,relative}_body

Unfortunately kyua does not omit the path mismatch on failure, so it must be coded
into the error message.

Cache the val

Clarify src vs dest path mismatch in :symbolic_link_{absolute,relative}_body

Unfortunately kyua does not omit the path mismatch on failure, so it must be coded
into the error message.

Cache the values, run the test(1) call, then print out the values in an atf_fail
call to emit the required diagnostics to debug why things are failing.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

show more ...


Revision tags: release/11.0.1, release/11.0.0
# 649a3a56 09-Jun-2016 Jilles Tjoelker <jilles@FreeBSD.org>

install: When preserving timestamps, also copy the nanoseconds part.

Now that we have utimensat in -legacy, install(1) can use it.

This is a revert of r299942 which is itself a revert of r299850.


# dd537357 16-May-2016 Jilles Tjoelker <jilles@FreeBSD.org>

install: Revert utimensat usage (r299850).

This should fix the build on older stable/10, since install is a bootstrap
tool.

Pending a decision how to fix this properly, revert utimensat usage. Copi

install: Revert utimensat usage (r299850).

This should fix the build on older stable/10, since install is a bootstrap
tool.

Pending a decision how to fix this properly, revert utimensat usage. Copies
with the -p option will again appear older than the original almost always,
but -p is not commonly used.

show more ...


# ecaa1101 15-May-2016 Jilles Tjoelker <jilles@FreeBSD.org>

install: When preserving timestamps, also copy the nanoseconds part.


# 1f9b8f8e 08-May-2016 Jilles Tjoelker <jilles@FreeBSD.org>

install: Add some tests.