All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH 1/3] add a new option "testonly"
Date: Wed, 15 Jan 2014 15:16:08 -0500	[thread overview]
Message-ID: <20140115201608.GA13541@redhat.com> (raw)
In-Reply-To: <1389790430-17808-1-git-send-email-bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Bao,

This is harald's call but personally to me this testonly options look
little odd.

I am looking at old discussion here.

http://thread.gmane.org/gmane.linux.kernel.initramfs/3370

So harald's suggestion of using systemd looks fine. It is just a matter of
figuring out who should load watchdog modules in initramfs.

I personally feel it should be watchdog module but if harald does not
like it, we can atleast for the time being keep that logic in kdump
module. But trying to create this testonly mode feels odd to me.

Harald, can you please let us know your preference on this. Modify
04watchdog module to include relevant drivers in hostonly mode or
push this logic into kdump module for now.

Thanks
Vivek

On Wed, Jan 15, 2014 at 08:53:48PM +0800, Baoquan He wrote:
> Since 04watchdog is used only for test cases. If watchdog want to
> be handled, the relevant operation need be differentiated. In this
> patch add a new option "testonly" to set. User can set
> "--testonly" or "--no-testonly" to decide current execution is for
> test cases running or building normal initram.
> ---
>  dracut-bash-completion.sh |  3 ++-
>  dracut.8.asc              |  7 +++++++
>  dracut.conf               |  4 ++++
>  dracut.conf.5.asc         |  3 +++
>  dracut.sh                 | 10 +++++++++-
>  5 files changed, 25 insertions(+), 2 deletions(-)
> 
> diff --git a/dracut-bash-completion.sh b/dracut-bash-completion.sh
> index 9f359c6..b713b14 100644
> --- a/dracut-bash-completion.sh
> +++ b/dracut-bash-completion.sh
> @@ -34,7 +34,8 @@ _dracut() {
>                                --local --hostonly --no-hostonly --fstab --help --bzip2 --lzma
>                                --xz --no-compress --gzip --list-modules --show-modules --keep
>                                --printsize --regenerate-all --noimageifnotneeded --early-microcode
> -                              --no-early-microcode --print-cmdline --prelink --noprelink'
> +                              --no-early-microcode --print-cmdline --prelink --noprelink
> +                              --testonly --no-testonly'
>  
>                         [ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers
>                                --omit-drivers --modules --omit --drivers --filesystems --install
> diff --git a/dracut.8.asc b/dracut.8.asc
> index d381dcf..1115f69 100644
> --- a/dracut.8.asc
> +++ b/dracut.8.asc
> @@ -203,6 +203,13 @@ example:
>  **--nolvmconf**::
>      do not include local _/etc/lvm/lvm.conf_
>  
> +
> +**--testonly**::
> +    execute to run test cases
> +
> +**--no-testonly**::
> +    execute to build normal initram
> +
>  **--fscks** [LIST]::
>      add a space-separated list of fsck tools, in addition to _dracut.conf_'s
>      specification; the installation is opportunistic (non-existing tools are
> diff --git a/dracut.conf b/dracut.conf
> index 8533f99..d18d185 100644
> --- a/dracut.conf
> +++ b/dracut.conf
> @@ -33,6 +33,10 @@
>  
>  # install local /etc/lvm/lvm.conf
>  #lvmconf="no"
> +#
> +
> +#execute to build normal initram, not for test cases running 
> +#testonly="no"
>  
>  # A list of fsck tools to install. If it's not specified, module's hardcoded
>  # default is used, currently: "umount mount /sbin/fsck* xfs_db xfs_check
> diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc
> index 30b7e03..3921f61 100644
> --- a/dracut.conf.5.asc
> +++ b/dracut.conf.5.asc
> @@ -104,6 +104,9 @@ If chrooted to another root other than the real root device, use --fstab and pro
>  *lvmconf=*"__{yes|no}__"::
>      Include local _/etc/lvm/lvm.conf_ (default=yes)
>  
> +*testonly=*"__{yes|no}__"::
> +    execute to run test cases only (default=no)
> +
>  *fscks=*" __<fsck tools>__ "::
>      Add a space-separated list of fsck tools. If nothing is specified, the
>      default is: "umount mount /sbin/fsck* xfs_db xfs_check xfs_repair e2fsck
> diff --git a/dracut.sh b/dracut.sh
> index 11dcd0e..88920b3 100755
> --- a/dracut.sh
> +++ b/dracut.sh
> @@ -107,6 +107,8 @@ Creates initial ramdisk images for preloading modules
>    --nomdadmconf         Do not include local /etc/mdadm.conf
>    --lvmconf             Include local /etc/lvm/lvm.conf
>    --nolvmconf           Do not include local /etc/lvm/lvm.conf
> +  --testonly            Execute to run test cases
> +  --no-testonly         Execute for real initram building 
>    --fscks [LIST]        Add a space-separated list of fsck helpers.
>    --nofscks             Inhibit installation of any fsck helpers.
>    --ro-mnt              Mount / and /usr read-only by default.
> @@ -333,6 +335,8 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \
>      --long nomdadmconf \
>      --long lvmconf \
>      --long nolvmconf \
> +    --long testonly \
> +    --long no-testonly \
>      --long debug \
>      --long profile \
>      --long sshkey: \
> @@ -417,6 +421,8 @@ while :; do
>          --nomdadmconf) mdadmconf_l="no";;
>          --lvmconf)     lvmconf_l="yes";;
>          --nolvmconf)   lvmconf_l="no";;
> +        --testonly)    testonly_l="yes";;
> +        --no-testonly) testonly_l="no";;
>          --debug)       debug="yes";;
>          --profile)     profile="yes";;
>          --sshkey)      sshkey="$2"; shift;;
> @@ -682,6 +688,8 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
>  [[ $use_fstab_l ]] && use_fstab=$use_fstab_l
>  [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l
>  [[ $lvmconf_l ]] && lvmconf=$lvmconf_l
> +[[ $testonly_l ]] && testonly=$testonly_l
> +[[ $testonly ]] || testonly=no
>  [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut
>  [[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware"
>  [[ $tmpdir_l ]] && tmpdir="$tmpdir_l"
> @@ -1062,7 +1070,7 @@ export initdir dracutbasedir dracutmodules \
>      debug host_fs_types host_devs sshkey add_fstab \
>      DRACUT_VERSION udevdir prefix filesystems drivers \
>      systemdutildir systemdsystemunitdir systemdsystemconfdir \
> -    host_modalias host_modules
> +    host_modalias host_modules testonly
>  
>  mods_to_load=""
>  # check all our modules to see if they should be sourced.
> -- 
> 1.8.3.1

  parent reply	other threads:[~2014-01-15 20:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 12:53 [PATCH 1/3] add a new option "testonly" Baoquan He
     [not found] ` <1389790430-17808-1-git-send-email-bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-15 12:53   ` [PATCH 2/3] set testonly for the relevant test cases Baoquan He
2014-01-15 12:53   ` [PATCH 3/3] insert wdt kernel modules when watchdog is active Baoquan He
2014-01-15 20:16   ` Vivek Goyal [this message]
     [not found]     ` <20140115201608.GA13541-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-16  2:06       ` [PATCH 1/3] add a new option "testonly" Dave Young
     [not found]         ` <20140116020647.GD3807-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2014-01-16  2:12           ` Dave Young
2014-01-20  2:28       ` Baoquan He
     [not found]         ` <20140120022848.GA18942-je1gSBvt1TeLcxizHhUEZR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2014-01-20 18:51           ` Vivek Goyal

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=20140115201608.GA13541@redhat.com \
    --to=vgoyal-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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.