Commit Graph

291 Commits

Author SHA1 Message Date
Colin Watson f8f35acb5b syslinux: Fix syslinux_test in out-of-tree builds
syslinux_parse simplifies some filenames by removing things like ".."
segments, but the tests assumed that @abs_top_srcdir@ would be
untouched, which is not true in the case of out-of-tree builds where
@abs_top_srcdir@ may contain ".." segments.

Performing the substitution requires some awkwardness in Makefile.am due
to details of how config.status works.

Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2019-03-05 10:27:53 +01:00
Colin Watson ed087f0460 pgp: Fix emu build and tests after pgp module renaming
Commit b07feb8746 (verifiers: Rename
verify module to pgp module) renamed the "verify" module to "pgp", but
the GRUB_MOD_INIT and GRUB_MOD_FINI macros were left as "verify", which
broke the emu target build; and file_filter_test still referred to the
now non-existent "verify" module. Fix both of these.

Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2019-01-14 13:05:18 +01:00
Nick Terrell 3861286486 btrfs: Add zstd support to grub btrfs
- Adds zstd support to the btrfs module.
- Adds a test case for btrfs zstd support.
- Changes top_srcdir to srcdir in the btrfs module's lzo include
  following comments from Daniel Kiper about the zstd include.

Tested on Ubuntu-18.04 with a btrfs /boot partition with and without zstd
compression. A test case was also added to the test suite that fails before
the patch, and passes after.

Signed-off-by: Nick Terrell <terrelln@fb.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2018-11-26 23:10:11 +01:00
Colin Watson b607d2a79e tests: Fix qemu options for UHCI test
qemu 2.12 removed the -usbdevice option.  Use a more modern spelling
instead, in line with other USB-related tests.

Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2018-09-13 10:50:24 +02:00
Colin Watson 7090b77341 tests: Disable sercon in SeaBIOS
SeaBIOS 1.11.0 added support for VGA emulation over a serial port, which
interferes with grub-shell.  Turn it off.

Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2018-09-13 10:49:45 +02:00
Will Thompson 0083541593 grub-fs-tester: Fix losetup race
If something else on the system is using loopback devices, then the
device that's free at the call to `losetup -f` may not be free in the
following call to try to use it. Instead, find and use the first free
loopback device in a single call to losetup.

Signed-off-by: Will Thompson <wjt@endlessm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2018-06-23 21:39:09 +02:00
Jaegeuk Kim 71f9e4ac44 fs: Add F2FS support
"F2FS (Flash-Friendly File System) is flash-friendly file system which was merged
into Linux kernel v3.8 in 2013.

The motive for F2FS was to build a file system that from the start, takes into
account the characteristics of NAND flash memory-based storage devices (such as
solid-state disks, eMMC, and SD cards).

F2FS was designed on a basis of a log-structured file system approach, which
remedies some known issues of the older log structured file systems, such as
the snowball effect of wandering trees and high cleaning overhead. In addition,
since a NAND-based storage device shows different characteristics according to
its internal geometry or flash memory management scheme (such as the Flash
Translation Layer or FTL), it supports various parameters not only for
configuring on-disk layout, but also for selecting allocation and cleaning
algorithm.", quote by https://en.wikipedia.org/wiki/F2FS.

The source codes for F2FS are available from:

http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs.git
http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git

This patch has been integrated in OpenMandriva Lx 3.
  https://www.openmandriva.org/

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Pete Batard <pete@akeo.ie>
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2018-04-10 19:05:04 +02:00
Vladimir Serbinenko 4f31bfe1d3 grub-fs-tester: Fix bashism 2017-08-30 21:31:26 +02:00
Vladimir Serbinenko 32099228e6 printf_unit_test: Disable Wformat-truncation on GCC >= 7
We intentionally pass NULL as argument to format, hence disable the warning.
2017-08-30 16:59:25 +02:00
Eric Biggers 734668238f Allow GRUB to mount ext2/3/4 filesystems that have the encryption feature.
On such a filesystem, inodes may have EXT4_ENCRYPT_FLAG set.
For a regular file, this means its contents are encrypted; for a
directory, this means the filenames in its directory entries are
encrypted; and for a symlink, this means its target is encrypted.  Since
GRUB cannot decrypt encrypted contents or filenames, just issue an error
if it would need to do so.  This is sufficient to allow unencrypted boot
files to co-exist with encrypted files elsewhere on the filesystem.

(Note that encrypted regular files and symlinks will not normally be
encountered outside an encrypted directory; however, it's possible via
hard links, so they still need to be handled.)

Tested by booting from an ext4 /boot partition on which I had run
'tune2fs -O encrypt'.  I also verified that the expected error messages
are printed when trying to access encrypted directories, files, and
symlinks from the GRUB command line.  Also ran 'sudo ./grub-fs-tester
ext4_encrypt'; note that this requires e2fsprogs v1.43+ and Linux v4.1+.

Signed-off-by: Eric Biggers <ebiggers@google.com>
2017-06-29 13:29:53 +00:00
Vladimir Serbinenko a827807a13 Fix shebang for termux.
Termux doesn't have a /bin/sh. So we needto use $SHELL.
Keep /bin/sh as much as possible.
2017-05-03 12:49:31 +02:00
Vladimir Serbinenko 1073ddb120 Add termux path to dict. 2017-05-03 12:48:00 +02:00
Vladimir Serbinenko 6dec3a26b3 Don't retrieve fstime when it's not useful. 2017-05-03 12:23:15 +02:00
Vladimir Serbinenko b43b8cacc8 support busybox date.
Busybox date doesn't understand weekdays in -d input,
so strip them beforehand.
2017-05-03 12:22:05 +02:00
Vladimir Serbinenko 37865c2c4a fs-tester: make sh-compatible 2017-05-03 12:19:44 +02:00
Vladimir Serbinenko 5a0c548ba3 Remove bashisms from tests.
Those tests don't actually need bash. Just use common shebang.
2017-05-03 12:10:36 +02:00
Andrei Borzenkov f34ed1f53c grub-fs-tester: improve squash4 tests
1. Make sure files are not multiple of block size. This will ensure tail packing
for squash4 and may also trigger more codes paths in other filesystems.

2. Call mksquashfs with -always-use-fragments to force tail packing.
2017-02-26 14:38:04 +03:00
Vladimir Serbinenko 5412028d19 Avoid causing kernel oops in nilfs2 test.
1024-byte and 2048-byte blocks don't really work with some kernels, skip
them as we don't want any oops'es.
2017-02-03 00:34:07 +01:00
Vladimir Serbinenko c65d35b08b btrfs: Shorten label by one character.
mkfs.btrfs imposes a slightly lower limit than would be possible in btrfs.
2017-02-03 00:30:29 +01:00
Vladimir Serbinenko a5bd52990e grub-fs-tester: Fix mkudffs invocation.
With current invocation order of arguments is wrong and path is hardcoded.
2017-02-02 23:32:38 +01:00
Vladimir Serbinenko 1d4e3db907 grub-fs-tester: Fix fat test.
mkfs.vfat ignores -S when invoked on a disk, including loopback device,
so do an mkfs on underlying image.
2017-02-02 23:19:00 +01:00
Vladimir Serbinenko bec592aa87 grub-shell: skip font copying when no font is available. 2017-01-27 20:09:06 +00:00
Vladimir Serbinenko afa9dda37e grub-fs-tester: Delete directory once we're done. 2017-01-27 18:00:40 +00:00
Vladimir Serbinenko cde63a3bb0 grub-fs-tester: Accomodate for slower systems.
fstime can be more different with xz squashfs.
Allow difference up to 3 seconds.
This code is ugly now but rewriting it now is not on the
table.
2017-01-27 17:58:15 +00:00
Vladimir Serbinenko bf0e59cebf grub-fs-tester: Accomodate for testing in proot containers.
proot creates hidden files with .proot prefix and name
derived from real file name. So decrease file name length
and path depth. For some reason depth 85 also results in
undeleteable directory, so use 84 instead of 85.
2017-01-27 17:46:47 +00:00
Vladimir Serbinenko 070e190305 Use console rather than serial_efi0 on arm64-efi in tests 2016-02-27 13:35:36 +01:00
Vladimir Serbinenko feef882f98 grub-shell: Update 32-bit OVMF binary name. 2016-02-12 16:08:04 +01:00
Vladimir Serbinenko 6f4189ffc1 powerpc: Trim header in tests. 2016-02-12 12:42:04 +01:00
Vladimir Serbinenko e5c9300191 printf: Fix and test %% behaviour in presence of subsequenbt args. 2016-02-12 12:33:41 +01:00
Vladimir Serbinenko cc2ed41039 arm: Ignore qemu clock bug 2016-01-22 10:12:43 +01:00
Vladimir Serbinenko b4787552b0 Tests: Support arm-efi 2016-01-08 09:49:08 +01:00
Vladimir Serbinenko 9efd79f376 grub-shell: Support arm64-efi 2016-01-07 21:02:53 +01:00
Vladimir Serbinenko a2dcab70f8 x86_64-efi: Automatically add -bios OVMF.fd to qemu in tests. 2016-01-07 19:29:53 +01:00
Vladimir Serbinenko 62328a95c9 Allow GRUB_QEMU_OPTS to override machine. 2016-01-07 19:28:47 +01:00
Vladimir Serbinenko 6e4174f6f9 arm64: Disable tests that need native drivers. 2016-01-07 19:27:56 +01:00
Vladimir Serbinenko db5eb6225d grub-shell: Use new cbfstool syntax. 2016-01-07 15:55:45 +01:00
Vladimir Serbinenko 44876dd64e grub-shell: On i386-ieee1275 don't try to switch to console.
console goes to serial as well, so this doesn't stop garbage from going
to serial. But it creates garbage itself.
2016-01-07 15:54:42 +01:00
Vladimir Serbinenko 86e3b4ba1a hddboot_test: reenable on OVMF
OVMF now supports booting from disks.
2016-01-07 15:54:06 +01:00
Vladimir Serbinenko 9f8f9e62af minixfs_test: Check if mkfs.minixfs supports -B option. 2016-01-05 21:10:27 +01:00
Vladimir Serbinenko f86fd54cf0 Add memdisk support to grub-emu.
Use it to add custom files, so that tests which need them work.
2016-01-05 21:10:27 +01:00
Vladimir Serbinenko f2b54835f2 Disable progress indicator in grub-shell.
This disables progress indicator for tests. This in turn fixes test
flakiness as they ended up timing-dependent.
2016-01-05 21:10:10 +01:00
Vladimir Serbinenko 4656ced41c fstester: Enforce LC_ALL=C 2015-11-08 22:39:36 +01:00
Andrei Borzenkov c054020581 partmap_test: check that parted is available
Skip test if parted is unavailable instead of returning false failure.
2015-11-07 23:42:35 +03:00
Vladimir Serbinenko 333855c646 zfs_test: Skip dotdot in volume root test.
Given special semantics of ZFS it's far from clear what the expected
result is. Just skip it for now
2015-07-24 01:23:45 +02:00
Vladimir Serbinenko 900fca88ac xfs_test: Test both crc and non-crc filesystems. 2015-07-24 01:23:45 +02:00
Andrei Borzenkov 7af839a108 tests: regression tests for "." and ".." directory entries 2015-06-18 20:09:47 +03:00
Vladimir Serbinenko 237510486a fddboot_test: Add -no-pad to xorriso. 2015-03-20 12:58:08 +01:00
Andrei Borzenkov 19c4156d16 grub-fs-tester: add LVM RAID1 support
LVM miscalculates bitmap size with small extent, so start with 16K as
for other RAID types.

Until version 2.02.103 LVM counts metadata segments twice when checking
available space, reduce segment count by one to account for this bug.
2015-03-19 21:31:26 +03:00
Andrei Borzenkov 7c9309e50a grub-fs-tester: explicitly set segment type for LVM mirror
LVM mirror defaults to RAID1 today and can be different on different
systems as set in lvm.conf.
2015-03-16 21:16:19 +03:00
Andrei Borzenkov fa07d919d1 grub-fs-tester: better estimation of filesystem time for LVM/RAID
Write activity with LVM/RAID can happen after filesystem is unmounted.
In my testing modification time of loop files was 15 - 20 seconds
after unmount.  So use time as close to unmount as possible as
reference instead.
2015-03-15 21:24:09 +03:00