All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 1/2] tst_net.sh: Detect IPv6 disabled via sysct
Date: Thu, 23 Mar 2023 06:17:35 +0100	[thread overview]
Message-ID: <20230323051735.GA381848@pevik> (raw)
In-Reply-To: <ZBsuYsWXtnmw83cV@yuki>

Hi Cyril,

> Hi!
> > No, but we already use sysctl in tst_init_iface():
> > sysctl -qw net.ipv6.conf.$iface.accept_dad=0 || return $?
> > tst_rhost_run -c "sysctl -qw net.ipv6.conf.$iface.accept_dad=0" || return $?

> > and we don't check for sysctl (expecting is everywhere). I'd also allow using
> > sysctl (and then add a check via tst_require_cmds) or change also these with
> > cat for reading and echo ... > for writing. WDYT?

> I would say that sysctl is useful when you have a config file with a
> bunch of values to be changed, but I would avoid using it in scripts,
> because all it does in that cases to perepend the proc part of the path
> and converts dots into slashes. And sometimes, when a path component
> contains a dot, it fails to replace the right dots into slashes too:

> http://lists.busybox.net/pipermail/busybox-cvs/2008-October/028382.html

Well, bug from 2008 (fixed in svn, probably that year). But I agree that
it's better to get rid of sysctl. I'll use cat here and prepare fix for the rest
of tst_net.sh sysctl usage.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2023-03-23  5:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 15:10 [LTP] [PATCH v2 0/2] tst_net.sh IPv6 sysctl fixes Petr Vorel
2023-02-17 15:10 ` [LTP] [PATCH v2 1/2] tst_net.sh: Detect IPv6 disabled via sysct Petr Vorel
2023-03-07 12:59   ` Richard Palethorpe
2023-03-22 13:08   ` Cyril Hrubis
2023-03-22 16:20     ` Petr Vorel
2023-03-22 16:35       ` Petr Vorel
2023-03-22 16:35       ` Cyril Hrubis
2023-03-23  5:17         ` Petr Vorel [this message]
2023-02-17 15:10 ` [LTP] [PATCH v2 2/2] tst_net.sh: Detect IPv6 disabled on interface via sysctl Petr Vorel
2023-03-07 13:01   ` Richard Palethorpe
2023-03-22 13:10   ` Cyril Hrubis

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=20230323051735.GA381848@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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.