diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-08-08 10:37:58 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-08-08 12:04:39 +0100 |
| commit | dc3e34b3a63a5e3374305586eb507ade4d477ec2 (patch) | |
| tree | ee8592135b401a4da01090c91a6370eb859bce35 /meta/recipes-core/coreutils | |
| parent | 51192a79f1717786dda42776f916c3d97ada7971 (diff) | |
| download | poky-dc3e34b3a63a5e3374305586eb507ade4d477ec2.tar.gz | |
coreutils: Fix intermittent ptest issue
The test writes to the disk and means the space used changes. If this
crosses a number boundary, the heading spacing can change causing a test
failure. This was triggered by a recent gcc upgrade.
Add a fix for this which has been shared with upstream.
(From OE-Core rev: ca6f0d81fc7d5e53d216e5131724e826369fd4ae)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/coreutils')
| -rw-r--r-- | meta/recipes-core/coreutils/coreutils/intermittent-testfailure.patch | 29 | ||||
| -rw-r--r-- | meta/recipes-core/coreutils/coreutils_9.5.bb | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-core/coreutils/coreutils/intermittent-testfailure.patch b/meta/recipes-core/coreutils/coreutils/intermittent-testfailure.patch new file mode 100644 index 0000000000..dc1e1592e1 --- /dev/null +++ b/meta/recipes-core/coreutils/coreutils/intermittent-testfailure.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | tests/df: Fix intermittent test failure | ||
| 2 | |||
| 3 | The test writes to the disk and means the space used changes. If this | ||
| 4 | crosses a number boundary, the heading spacing can change: | ||
| 5 | |||
| 6 | -Filesystem 1024-blocks Used Available Capacity Mounted on | ||
| 7 | +Filesystem 1024-blocks Used Available Capacity Mounted on | ||
| 8 | |||
| 9 | The test is to make sure the 1024 blocks element remains the same and | ||
| 10 | the spacing doesn't matter. Therefore strip any duplicate spaces using tr. | ||
| 11 | |||
| 12 | Upstream-Status: Submitted [https://github.com/coreutils/coreutils/pull/88] | ||
| 13 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
| 14 | |||
| 15 | Index: coreutils-9.5/tests/df/df-P.sh | ||
| 16 | =================================================================== | ||
| 17 | --- coreutils-9.5.orig/tests/df/df-P.sh | ||
| 18 | +++ coreutils-9.5/tests/df/df-P.sh | ||
| 19 | @@ -20,8 +20,8 @@ | ||
| 20 | print_ver_ df | ||
| 21 | |||
| 22 | |||
| 23 | - df -P . > t1 || fail=1 | ||
| 24 | -BLOCK_SIZE=1M df -P . > t2 || fail=1 | ||
| 25 | + df -P . | tr -s ' ' > t1 || fail=1 | ||
| 26 | +BLOCK_SIZE=1M df -P . | tr -s ' ' > t2 || fail=1 | ||
| 27 | |||
| 28 | # Since file system utilization may be changing, compare only df's header line. | ||
| 29 | # That records the block size. E.g., for "1M", it would be: | ||
diff --git a/meta/recipes-core/coreutils/coreutils_9.5.bb b/meta/recipes-core/coreutils/coreutils_9.5.bb index 178dadc3c5..af0fcdcc4c 100644 --- a/meta/recipes-core/coreutils/coreutils_9.5.bb +++ b/meta/recipes-core/coreutils/coreutils_9.5.bb | |||
| @@ -16,6 +16,7 @@ inherit autotools gettext texinfo | |||
| 16 | SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ | 16 | SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ |
| 17 | file://remove-usr-local-lib-from-m4.patch \ | 17 | file://remove-usr-local-lib-from-m4.patch \ |
| 18 | file://0001-local.mk-fix-cross-compiling-problem.patch \ | 18 | file://0001-local.mk-fix-cross-compiling-problem.patch \ |
| 19 | file://intermittent-testfailure.patch \ | ||
| 19 | file://run-ptest \ | 20 | file://run-ptest \ |
| 20 | " | 21 | " |
| 21 | SRC_URI[sha256sum] = "cd328edeac92f6a665de9f323c93b712af1858bc2e0d88f3f7100469470a1b8a" | 22 | SRC_URI[sha256sum] = "cd328edeac92f6a665de9f323c93b712af1858bc2e0d88f3f7100469470a1b8a" |
