From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next mlxsw 0/3] selftests: forwarding: Updates to sysctl handling Date: Thu, 03 May 2018 13:37:34 -0400 (EDT) Message-ID: <20180503.133734.1839164892433201492.davem@davemloft.net> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, shuah@kernel.org To: petrm@mellanox.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:50170 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751095AbeECRhh (ORCPT ); Thu, 3 May 2018 13:37:37 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Petr Machata Date: Thu, 03 May 2018 12:36:52 +0200 > Some selftests need to adjust sysctl settings. In order to be neutral to > the system that the test is run on, it is a good practice to change back > to the original setting after the test ends. That involves some > boilerplate that can be abstracted away. > > In patch #1, introduce two functions, sysctl_set() and sysctl_restore(). > The former stores the current value of a given setting, and sets a new > value. The latter restores the setting to the previously-stored value. > > In patch #2, use these wrappers in a number of tests. > > Additionally in patch #3, fix a problem in mirror_gre_nh.sh, which > neglected to set a sysctl that's crucial for the test to work. Luckily that errant 'mlxsw' hides inside of [] so git will get rid of it :-) Series applied, thanks.