From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756449AbbCCOt0 (ORCPT ); Tue, 3 Mar 2015 09:49:26 -0500 Received: from arcturus.aphlor.org ([188.246.204.175]:43725 "EHLO arcturus.aphlor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753132AbbCCOtX (ORCPT ); Tue, 3 Mar 2015 09:49:23 -0500 Date: Tue, 3 Mar 2015 09:49:16 -0500 From: Dave Jones To: Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, mpe@ellerman.id.au Subject: Re: [PATCH] selftests: Add install, generate tar, and run_kselftest tools Message-ID: <20150303144916.GA24111@codemonkey.org.uk> Mail-Followup-To: Dave Jones , Shuah Khan , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, mpe@ellerman.id.au References: <1425358088-9667-1-git-send-email-shuahkh@osg.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425358088-9667-1-git-send-email-shuahkh@osg.samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Report: Spam report generated by SpamAssassin on "arcturus.aphlor.org" Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Authenticated-User: davej@codemonkey.org.uk Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 02, 2015 at 09:48:08PM -0700, Shuah Khan wrote: > kselftest_install.sh tool adds support for installing selftests > at user specified location/kselftest. By default this tool > will install selftests in the selftests/kselftest directory. > For example, kselftest_install /tmp will install tests under > /tmp/kselftest How is this an improvement over having each test install method isolated to its own Makefile ? > +# Installs normal tests and skips special tests and kselftest tools > +# gen_kselftesr_tar.sh and kselftes_install.sh > +# Also skips problematic xxxx* file that gets created when execveat > +# test is built. The file name is too long and resulting in error > +# messages. > + find `pwd`/* -type d -name rcutorture -prune -o -type f \ > + -executable -print | grep -v 'tar\|install\|xxxx' | \ > + xargs install -t $install_dir > +# Install shell scripts that aren't executables > + find `pwd`/* -type d -name rcutorture -prune -o -name "*.sh" -print | \ > + grep -v 'tar\|install\|run\|on-off' | \ > + xargs install -t $install_dir > +# Special handling for cpu-hotplug and memory-hotplug .sh with the same name > + install `pwd`/cpu-hotplug/on-off-test.sh \ > + $install_dir/cpu-on-off-test.sh > + install `pwd`/memory-hotplug/on-off-test.sh \ > + $install_dir/mem-on-off-test.sh > +# Special handling for scripts without .sh extension > + install `pwd`/vm/run_vmtests $install_dir > + install `pwd`/net/run_netsocktests $install_dir > + install `pwd`/net/run_afpackettests $install_dir > + install `pwd`/sysctl/common_tests $install_dir > +# Install dependent directories for ftrace and exec tests > + cp -r `pwd`/ftrace/test.d $install_dir > + install `pwd`/exec/execveat.denatured $install_dir > + cp -r `pwd`/exec/subdir $install_dir This already makes my eyes hurt, and is only going to grow as more tests get added. Additionally when two people are trying to add tests at the same time, you're guaranteeing future merge conflicts here. Dave