All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Maiolino <cmaiolino@redhat.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH 1/2] common/rc: Enable _format_swapfile to return the swap size
Date: Thu, 4 Nov 2021 14:01:40 +0100	[thread overview]
Message-ID: <20211104130140.mkeqrlhcqlwbbewq@andromeda.lan> (raw)
In-Reply-To: <20211104125226.7kozp45e2ifvmiyw@work>

> > +	# return created swap size
> > +	echo $swap_log | grep -oP '(?<=size = )\w+'
> 
> I think you need take into account the fact that the units of the mkswap
> output will change depedning on the actual size. It might be better to
> grab the size in bytes which is in the output as well.

Sounds fair. I'll wait a bit more to see if some more people comment it, and
I'll update it.

> 
> -Lukas
> 
> >  }
> >  
> >  _swapon_file() {
> > @@ -2628,7 +2632,7 @@ _require_scratch_swapfile()
> >  	_scratch_mount
> >  
> >  	# Minimum size for mkswap is 10 pages
> > -	_format_swapfile "$SCRATCH_MNT/swap" $(($(get_page_size) * 10))
> > +	_format_swapfile "$SCRATCH_MNT/swap" $(($(get_page_size) * 10)) > /dev/null
> >  
> >  	# ext* has supported all variants of swap files since their
> >  	# introduction, so swapon should not fail.
> > -- 
> > 2.31.1
> > 
> 

-- 
Carlos


  reply	other threads:[~2021-11-04 13:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 15:28 [PATCH 0/2] xfstests: Fix generic/643 on ext2 and ext3 Carlos Maiolino
2021-11-02 15:28 ` [PATCH 1/2] common/rc: Enable _format_swapfile to return the swap size Carlos Maiolino
2021-11-04 12:52   ` Lukas Czerner
2021-11-04 13:01     ` Carlos Maiolino [this message]
2021-11-07 13:14   ` Eryu Guan
2021-11-09  9:02     ` Carlos Maiolino
2021-11-08  4:26   ` Zorro Lang
2021-11-09  8:59     ` Carlos Maiolino
2021-11-02 15:28 ` [PATCH 2/2] generic/643: Fix for 1k block sizes for ext2 and ext3 Carlos Maiolino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211104130140.mkeqrlhcqlwbbewq@andromeda.lan \
    --to=cmaiolino@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=lczerner@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.