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: Wed, 22 Mar 2023 17:20:46 +0100 [thread overview]
Message-ID: <20230322162046.GA369840@pevik> (raw)
In-Reply-To: <ZBr9v2cz6/gmksAW@yuki>
Hi Cyril,
...
> > + if [ $? -ne 0 ]; then
> > + TST_NET_IPV6_ENABLED=0
> > + tst_res_ TINFO "IPv6 disabled on $type via ipv6.disable=1"
> Doesn't this happen also in the unlikely case that CONFIG_IPV6 is not
> set?
> So maybe "IPv6 disabled on kernel commandline or not compiled in"
Indeed, You're right, I'll use (to show where it was disabled):
tst_res_ TINFO "IPv6 disabled on $type via kernel command line or not compiled in"
> > + return
> > + fi
> > +
> > + cmd='sysctl -n net.ipv6.conf.all.disable_ipv6'
> I'm not sure why we should use sysctl when this the same as doing
> cat /proc/sys/net/ipv6/conf/all/disable_ipv6
> Or is there any added value from the sysctl command?
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?
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-03-22 16:21 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 [this message]
2023-03-22 16:35 ` Petr Vorel
2023-03-22 16:35 ` Cyril Hrubis
2023-03-23 5:17 ` Petr Vorel
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=20230322162046.GA369840@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox