[elbe-devel] [PATCH v2 5/9] tests efilesystem: Test for multiple symlinks for copy_filelist
Torben Hohn
torben.hohn at linutronix.de
Wed May 13 14:09:16 CEST 2020
On Mon, May 04, 2020 at 02:00:08PM -0400, Olivier Dion wrote:
> This test for cases when multiple symlinks are found in a path. For
> example, we might have /usr/local/bin -> /bin and /bin -> /usr/bin
>
> Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> ---
> elbepack/tests/test_efilesystem.py | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/elbepack/tests/test_efilesystem.py b/elbepack/tests/test_efilesystem.py
> index 54b014fc..2a6427d2 100644
> --- a/elbepack/tests/test_efilesystem.py
> +++ b/elbepack/tests/test_efilesystem.py
> @@ -60,3 +60,21 @@ class TestCopyFilelist(unittest.TestCase):
> # /DST/a/b/c/bla
> self.assertEqual(self.src.read_file('/a/b/c//bla'),
> self.dst.read_file('/a/b/c/bla'))
> +
> + def test_multilinks(self):
> +
> + self.src.mkdir_p('/a')
> +
> + # a <- b
> + # ../b <- /a/c
> + self.src.symlink('a', '/b')
> + self.src.symlink('../b', '/a/c')
> +
> + # This write into /a/bla
> + self.src.write_file('a/c/bla', 0o644, 'bla')
> +
> + copy_filelist(self.src, ['/a/c/bla'], self.dst)
> +
> + # We should now have the content from /SRC/a/bla in /DST/a/bla
> + self.assertEqual(self.src.read_file('/a/bla'),
> + self.dst.read_file('/a/bla'))
> --
> 2.26.2
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/kontakt/Datenschutz.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
More information about the elbe-devel
mailing list