1 # SPDX-License-Identifier: GPL-2.0
2 # Copyright (C) 2020 Bootlin
3 # Author: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
7 from sqfs_common import *
9 @pytest.mark.boardspec('sandbox')
10 @pytest.mark.buildconfigspec('cmd_fs_generic')
11 @pytest.mark.buildconfigspec('cmd_squashfs')
12 @pytest.mark.buildconfigspec('fs_squashfs')
13 @pytest.mark.requiredtool('mksquashfs')
14 def test_sqfs_ls(u_boot_console):
16 path = "test/py/tests/test_fs/test_squashfs/sqfs"
18 output = u_boot_console.run_command("host bind 0 " + path)
19 output = u_boot_console.run_command("sqfsls host 0")
20 assert "4 file(s), 0 dir(s)" in output
21 assert "<SYM> sym" in output
22 output = u_boot_console.run_command("sqfsls host 0 xxx")
23 assert "** Cannot find directory. **" in output