* [PATCH 0/5] Testing improvements
@ 2020-12-19 10:14 Glenn Washburn
2020-12-19 10:14 ` [PATCH 1/5] tests: Exit with skipped exit code when test not performed Glenn Washburn
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Glenn Washburn @ 2020-12-19 10:14 UTC (permalink / raw)
To: grub-devel; +Cc: Daniel Kiper, Glenn Washburn
I've been working on getting continuous integration working in gitlab where
testing is being done in an Ubuntu image. This patch series improves various
tests. I've ordered the patches starting with the least controversial patches.
The last two patches I suspect may have some deserve some attention.
Patch 4 allows the partmap_test to pass. I'm not sure why the number of the
device has changed from the setup this test was previously working on. I
suspect it could be either because I'm using a newer qemu or because I'm using
a new firmware/bios.
Patch 5 disables functional tests that have been failing for a long time, by
commenting them out. When someone gets around to fixing them, they can be
uncommented. But as it is, they've been failing for some time and people ignore
those failures. This isn't so nice with a continuous integration system that
largely expects tests to be passing, so it can detect when there are new
failures.
Glenn
Glenn Washburn (5):
tests: Exit with skipped exit code when test not performed
tests: Make sure LANG is set properly for iso9660_test
tests: Make setup errors in grub-fs-tester hard errors
tests: Fix partmap_test for arm*-efi, disk numbering has changed
tests: Comment failing functional tests until we can get them working
again
grub-core/tests/lib/functional_test.c | 6 +++---
tests/core_compress_test.in | 2 +-
tests/iso9660_test.in | 6 ++++++
tests/partmap_test.in | 2 +-
tests/pseries_test.in | 2 +-
tests/util/grub-fs-tester.in | 11 ++++++-----
6 files changed, 18 insertions(+), 11 deletions(-)
--
2.27.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/5] tests: Exit with skipped exit code when test not performed
2020-12-19 10:14 [PATCH 0/5] Testing improvements Glenn Washburn
@ 2020-12-19 10:14 ` Glenn Washburn
2020-12-19 10:14 ` [PATCH 2/5] tests: Make sure LANG is set properly for iso9660_test Glenn Washburn
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Glenn Washburn @ 2020-12-19 10:14 UTC (permalink / raw)
To: grub-devel; +Cc: Daniel Kiper, Glenn Washburn
These tests were not performed and therefore did not pass, nor fail. This
fixes odd behavior where the pseries_test will pass on i386-pc.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
tests/core_compress_test.in | 2 +-
tests/pseries_test.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/core_compress_test.in b/tests/core_compress_test.in
index 9d216ebcf..2fd0a571c 100644
--- a/tests/core_compress_test.in
+++ b/tests/core_compress_test.in
@@ -22,7 +22,7 @@ grubshell=@builddir@/grub-shell
case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
# FIXME: Only mips currently supports configurable core compression
*-emu | i386-* | x86_64-* | sparc64-* | ia64-*)
- exit 0
+ exit 77
;;
esac
diff --git a/tests/pseries_test.in b/tests/pseries_test.in
index 655eb4f3a..9b4090cf5 100644
--- a/tests/pseries_test.in
+++ b/tests/pseries_test.in
@@ -20,7 +20,7 @@ grubshell=@builddir@/grub-shell
. "@builddir@/grub-core/modinfo.sh"
if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" != powerpc-ieee1275 ]; then
- exit 0
+ exit 77
fi
if [ "$(echo hello | "${grubshell}" --pseries --timeout=180 --boot=cd)" != "Hello World" ]; then
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/5] tests: Make sure LANG is set properly for iso9660_test
2020-12-19 10:14 [PATCH 0/5] Testing improvements Glenn Washburn
2020-12-19 10:14 ` [PATCH 1/5] tests: Exit with skipped exit code when test not performed Glenn Washburn
@ 2020-12-19 10:14 ` Glenn Washburn
2020-12-19 10:14 ` [PATCH 3/5] tests: Make setup errors in grub-fs-tester hard errors Glenn Washburn
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Glenn Washburn @ 2020-12-19 10:14 UTC (permalink / raw)
To: grub-devel; +Cc: Daniel Kiper, Glenn Washburn
LANG must be set to something that supports international characters,
otherwise xorriso will refuse to include the file with name having
international characters, causing the test to fail. So if LANG is not set,
set it to en_US.UTF-8, a very common UTF-8 locale. And if it is set, but
does not look like a UTF-8 locale, print a warning so the user will have a
clue as to why the iso9660_test might be failing.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
tests/iso9660_test.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/iso9660_test.in b/tests/iso9660_test.in
index 571b938d7..37b1d30af 100644
--- a/tests/iso9660_test.in
+++ b/tests/iso9660_test.in
@@ -7,6 +7,12 @@ if ! which xorriso >/dev/null 2>&1; then
exit 77
fi
+if [ -z "$LANG" ]; then
+ export LANG=en_US.UTF-8
+elif [ -n "${LANG##*UTF*}" ]; then
+ echo "WARNING: LANG=$LANG appears to not be unicode, international file test may fail."
+fi
+
"@builddir@/grub-fs-tester" joliet
"@builddir@/grub-fs-tester" rockridge
"@builddir@/grub-fs-tester" rockridge_joliet
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/5] tests: Make setup errors in grub-fs-tester hard errors
2020-12-19 10:14 [PATCH 0/5] Testing improvements Glenn Washburn
2020-12-19 10:14 ` [PATCH 1/5] tests: Exit with skipped exit code when test not performed Glenn Washburn
2020-12-19 10:14 ` [PATCH 2/5] tests: Make sure LANG is set properly for iso9660_test Glenn Washburn
@ 2020-12-19 10:14 ` Glenn Washburn
2020-12-19 10:14 ` [PATCH 4/5] tests: Fix partmap_test for arm*-efi, disk numbering has changed Glenn Washburn
2020-12-19 10:14 ` [PATCH 5/5] tests: Comment failing functional tests until we can get them working again Glenn Washburn
4 siblings, 0 replies; 6+ messages in thread
From: Glenn Washburn @ 2020-12-19 10:14 UTC (permalink / raw)
To: grub-devel; +Cc: Daniel Kiper, Glenn Washburn
When a test program fails because it failed to setup the test properly, this
does not indicate a failure in what is attempting to be tested because the
test is never run. So exit with a hard error exit status to note this
difference. This will allow easier detection of tests that are not actually
being run and those that are really failing.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
tests/util/grub-fs-tester.in | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
index bfc425e1f..c7137eb80 100644
--- a/tests/util/grub-fs-tester.in
+++ b/tests/util/grub-fs-tester.in
@@ -6,7 +6,8 @@ fs="$1"
GRUBFSTEST="@builddir@/grub-fstest"
-tempdir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
+tempdir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` ||
+{ echo "Failed to make temporary directory"; exit 99; }
# This wrapper is to ease insertion of valgrind or time statistics
run_it () {
@@ -273,7 +274,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
done
if test "$CFILESRC" = "" ; then
echo "Couldn't find compressible file" >&2
- exit 1
+ exit 99
fi
case x"$fs" in
# FS LIMITATION: 8.3 names
@@ -616,7 +617,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
mkdir -p "$MNTPOINTRO"
for i in $(range 0 $((NDEVICES-1)) 1); do
dd if=/dev/zero of="$FSIMAGEP${i}.img" count=1 bs=1 seek=$((DISKSIZE-1)) &> /dev/null
- LODEVICE=$(losetup --find --show "$FSIMAGEP${i}.img")
+ LODEVICE=$(losetup --find --show "$FSIMAGEP${i}.img") || exit 99
LODEVICES="$LODEVICES $LODEVICE"
if test "$i" = 0; then
MOUNTDEVICE="$LODEVICE"
@@ -820,7 +821,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
"mkfs.xfs" -m crc=1 -b size=$BLKSIZE -s size=$SECSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" ;;
*)
echo "Add appropriate mkfs command here"
- exit 1
+ exit 99
;;
esac
BASEFILE="1.img"
@@ -926,7 +927,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
for i in $(range 0 $((NDEVICES-1)) 1); do
rm "$FSIMAGEP${i}.img"
done
- exit 1;
+ exit 99;
fi
;;
esac
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/5] tests: Fix partmap_test for arm*-efi, disk numbering has changed
2020-12-19 10:14 [PATCH 0/5] Testing improvements Glenn Washburn
` (2 preceding siblings ...)
2020-12-19 10:14 ` [PATCH 3/5] tests: Make setup errors in grub-fs-tester hard errors Glenn Washburn
@ 2020-12-19 10:14 ` Glenn Washburn
2020-12-19 10:14 ` [PATCH 5/5] tests: Comment failing functional tests until we can get them working again Glenn Washburn
4 siblings, 0 replies; 6+ messages in thread
From: Glenn Washburn @ 2020-12-19 10:14 UTC (permalink / raw)
To: grub-devel; +Cc: Daniel Kiper, Glenn Washburn
Perhaps using a newer UEFI firmware is the reason for the created test disk
showing up as hd2 instead of hd3.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
tests/partmap_test.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/partmap_test.in b/tests/partmap_test.in
index 6ef518b0a..7353dc70e 100644
--- a/tests/partmap_test.in
+++ b/tests/partmap_test.in
@@ -89,7 +89,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
disk=arc/scsi0/disk0/rdisk0
;;
arm*-efi)
- disk=hd3
+ disk=hd2
;;
*)
disk=hd0
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 5/5] tests: Comment failing functional tests until we can get them working again
2020-12-19 10:14 [PATCH 0/5] Testing improvements Glenn Washburn
` (3 preceding siblings ...)
2020-12-19 10:14 ` [PATCH 4/5] tests: Fix partmap_test for arm*-efi, disk numbering has changed Glenn Washburn
@ 2020-12-19 10:14 ` Glenn Washburn
4 siblings, 0 replies; 6+ messages in thread
From: Glenn Washburn @ 2020-12-19 10:14 UTC (permalink / raw)
To: grub-devel; +Cc: Daniel Kiper, Glenn Washburn
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
grub-core/tests/lib/functional_test.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/grub-core/tests/lib/functional_test.c b/grub-core/tests/lib/functional_test.c
index 96781fb39..16de3d275 100644
--- a/grub-core/tests/lib/functional_test.c
+++ b/grub-core/tests/lib/functional_test.c
@@ -65,10 +65,10 @@ grub_functional_all_tests (grub_extcmd_context_t ctxt __attribute__ ((unused)),
grub_dl_load ("legacy_password_test");
grub_errno = GRUB_ERR_NONE;
grub_dl_load ("exfctest");
- grub_dl_load ("videotest_checksum");
- grub_dl_load ("gfxterm_menu");
+ /* grub_dl_load ("videotest_checksum"); */
+ /* grub_dl_load ("gfxterm_menu"); */
grub_dl_load ("setjmp_test");
- grub_dl_load ("cmdline_cat_test");
+ /* grub_dl_load ("cmdline_cat_test"); */
grub_dl_load ("div_test");
grub_dl_load ("xnu_uuid_test");
grub_dl_load ("pbkdf2_test");
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-12-19 10:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-19 10:14 [PATCH 0/5] Testing improvements Glenn Washburn
2020-12-19 10:14 ` [PATCH 1/5] tests: Exit with skipped exit code when test not performed Glenn Washburn
2020-12-19 10:14 ` [PATCH 2/5] tests: Make sure LANG is set properly for iso9660_test Glenn Washburn
2020-12-19 10:14 ` [PATCH 3/5] tests: Make setup errors in grub-fs-tester hard errors Glenn Washburn
2020-12-19 10:14 ` [PATCH 4/5] tests: Fix partmap_test for arm*-efi, disk numbering has changed Glenn Washburn
2020-12-19 10:14 ` [PATCH 5/5] tests: Comment failing functional tests until we can get them working again Glenn Washburn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.