Util-Linux package development
 help / color / mirror / Atom feed
* Re: Bug#1138789: FTBFS on loong64: mkswap: error: swap area needs to be at least 160 KiB
       [not found] <aiCHUJ8pmy_Atx2S@per.namespace.at>
@ 2026-06-03 20:04 ` Chris Hofstaedtler
  2026-06-04 12:20   ` [PATCH] mkswap: use 64k pages in file-existing test Chris Hofstaedtler
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Hofstaedtler @ 2026-06-03 20:04 UTC (permalink / raw)
  To: util-linux; +Cc: 1138789, Johannes Wüller, debian-loongarch

Hi Johannes, Karel,

util-linux 2.42.1 apparently fails its mkswap tests on loong64. Given 
it fails in mkswap/mkswap-file-existing, I suspect this is "caused" 
by commit 775729884a3945a53df33e0d3ff2ba263b96b59e / 
6d87ff51568c017a6d08043d554bf0ea8dee5457.

Could you take a look please?

> diff-{{{
> --- /dev/null	2026-05-29 12:41:25.961759630 +0000
> +++ /build/reproducible-path/util-linux-2.42.1/tests/output/mkswap/mkswap-file-existing	2026-06-03 19:26:30.186627085 +0000
> @@ -0,0 +1,3 @@
> +mkswap failed
> +mkswap: error: swap area needs to be at least 160 KiB
> +mkswap -F failed on existing file
> }}}-diff
> 
>  FAILED (mkswap/mkswap-file-existing)
> ========= script: /build/reproducible-path/util-linux-2.42.1/tests/ts/mkswap/mkswap =================
> ================= OUTPUT =====================
>      1	mkswap failed
>      2	mkswap: error: swap area needs to be at least 160 KiB
>      3	mkswap -F failed on existing file
> 


Full build log at:

https://buildd.debian.org/status/fetch.php?pkg=util-linux&arch=loong64&ver=2.42.1-1&stamp=1780514831&file=log

Many thanks!
Chris


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] mkswap: use 64k pages in file-existing test
  2026-06-03 20:04 ` Bug#1138789: FTBFS on loong64: mkswap: error: swap area needs to be at least 160 KiB Chris Hofstaedtler
@ 2026-06-04 12:20   ` Chris Hofstaedtler
  2026-06-08 11:00     ` Karel Zak
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Hofstaedtler @ 2026-06-04 12:20 UTC (permalink / raw)
  To: util-linux, Johannes Wüller; +Cc: 1138789, debian-loongarch

Some systems run with kernels using page sizes other than 4K. The
file-existing test used a file of 10 pages at 4K. This would fail on
kernels with higher page sizes (here 16K) like this:

   mkswap: error: swap area needs to be at least 160 KiB

Use 10 * 64K pages, hopefully allowing all kernels with 4K, 16K, 64K
pages to pass the tests.

Noticed on Debian loong64 kernel 7.0.9+deb14-loong64, and on 
sparc64 and alpha. 

Bug: https://bugs.debian.org/1138789
Fixes: 775729884a3945a53df33e0d3ff2ba263b96b59e
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
---
  tests/ts/mkswap/mkswap | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/ts/mkswap/mkswap b/tests/ts/mkswap/mkswap
index 19111971c..fa7e6b462 100755
--- a/tests/ts/mkswap/mkswap
+++ b/tests/ts/mkswap/mkswap
@@ -105,11 +105,11 @@ ts_init_subtest file-existing
  outimg="$TS_OUTDIR/existing.img"
  rm -f "$outimg"
  
-"$TS_CMD_MKSWAP" -q -U "$UUID" -F -s $((4096 * 10)) "$outimg" \
+"$TS_CMD_MKSWAP" -q -U "$UUID" -F -s $((65536 * 10)) "$outimg" \
      >> "$TS_OUTPUT" 2>/dev/null \
      || ts_log "mkswap failed"
  
-"$TS_CMD_MKSWAP" -q -U "$UUID" -F -s $((4096 * 10)) "$outimg" \
+"$TS_CMD_MKSWAP" -q -U "$UUID" -F -s $((65536 * 10)) "$outimg" \
      >> "$TS_OUTPUT" 2>&1 \
      || ts_log "mkswap -F failed on existing file"
  
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mkswap: use 64k pages in file-existing test
  2026-06-04 12:20   ` [PATCH] mkswap: use 64k pages in file-existing test Chris Hofstaedtler
@ 2026-06-08 11:00     ` Karel Zak
  2026-06-08 18:44       ` Bug#1138789: " Chris Hofstaedtler
  0 siblings, 1 reply; 4+ messages in thread
From: Karel Zak @ 2026-06-08 11:00 UTC (permalink / raw)
  To: Chris Hofstaedtler
  Cc: util-linux, Johannes Wüller, 1138789, debian-loongarch

On Thu, Jun 04, 2026 at 02:20:56PM +0200, Chris Hofstaedtler wrote:
> Some systems run with kernels using page sizes other than 4K. The
> file-existing test used a file of 10 pages at 4K. This would fail on
> kernels with higher page sizes (here 16K) like this:
> 
>   mkswap: error: swap area needs to be at least 160 KiB
> 
> Use 10 * 64K pages, hopefully allowing all kernels with 4K, 16K, 64K
> pages to pass the tests.
> 
> Noticed on Debian loong64 kernel 7.0.9+deb14-loong64, and on sparc64 and
> alpha.
> 
> Bug: https://bugs.debian.org/1138789

It was already fixed by commit c5da6dcfe, which explicitly forces the
page size to 4096 rather than extending the file size.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug#1138789: [PATCH] mkswap: use 64k pages in file-existing test
  2026-06-08 11:00     ` Karel Zak
@ 2026-06-08 18:44       ` Chris Hofstaedtler
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Hofstaedtler @ 2026-06-08 18:44 UTC (permalink / raw)
  To: Karel Zak, 1138789; +Cc: util-linux, Johannes Wüller, debian-loongarch

On Mon, Jun 08, 2026 at 01:00:58PM +0200, Karel Zak wrote:
> On Thu, Jun 04, 2026 at 02:20:56PM +0200, Chris Hofstaedtler wrote:
> > Some systems run with kernels using page sizes other than 4K. The
> > file-existing test used a file of 10 pages at 4K. This would fail on
> > kernels with higher page sizes (here 16K) like this:
> > 
> >   mkswap: error: swap area needs to be at least 160 KiB
> > 
> > Use 10 * 64K pages, hopefully allowing all kernels with 4K, 16K, 64K
> > pages to pass the tests.
> > 
> > Noticed on Debian loong64 kernel 7.0.9+deb14-loong64, and on sparc64 and
> > alpha.
> > 
> > Bug: https://bugs.debian.org/1138789
> 
> It was already fixed by commit c5da6dcfe, which explicitly forces the
> page size to 4096 rather than extending the file size.

Ah, thank you! I've pulled this commit into our build.

Best,
Chris

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-08 18:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <aiCHUJ8pmy_Atx2S@per.namespace.at>
2026-06-03 20:04 ` Bug#1138789: FTBFS on loong64: mkswap: error: swap area needs to be at least 160 KiB Chris Hofstaedtler
2026-06-04 12:20   ` [PATCH] mkswap: use 64k pages in file-existing test Chris Hofstaedtler
2026-06-08 11:00     ` Karel Zak
2026-06-08 18:44       ` Bug#1138789: " Chris Hofstaedtler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox