mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Santos <daniel.santos@pobox.com>
To: LKML <linux-kernel@vger.kernel.org>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Daniel Santos <daniel.santos@pobox.com>,
	David Woodhouse <David.Woodhouse@intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
	John Stultz <john.stultz@linaro.org>,
	linux-doc@vger.kernel.org, Michel Lespinasse <walken@google.com>,
	"Paul E. McKenney" <paul.mckenney@linaro.org>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	Pavel Pisa <pisa@cmp.felk.cvut.cz>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Rik van Riel <riel@redhat.com>, Rob Landley <rob@landley.net>
Subject: [PATCH v6 9/10] selftest: Add basic compiler iterator test script
Date: Fri, 28 Sep 2012 18:48:45 -0500	[thread overview]
Message-ID: <1348876126-28792-4-git-send-email-daniel.santos@pobox.com> (raw)
In-Reply-To: <1348875625-28669-1-git-send-email-daniel.santos@pobox.com>

A Gentoo-specific script (to be run by root) to iterate through all
installed compilers, execte runtest.sh script and collect the output
data.

Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
---
 tools/testing/selftests/grbtree/user/runtests.sh |   52 ++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)
 create mode 100755 tools/testing/selftests/grbtree/user/runtests.sh

diff --git a/tools/testing/selftests/grbtree/user/runtests.sh b/tools/testing/selftests/grbtree/user/runtests.sh
new file mode 100755
index 0000000..d60ec99
--- /dev/null
+++ b/tools/testing/selftests/grbtree/user/runtests.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+# This script is designed for use on Gentoo systems, using gcc-config to
+# change the compiler and must be run as root. I'm lazy, so alter to fit your
+# system.
+
+#key_type_range=$(echo {u,s}{8,16,32,64})
+key_type_range="u32 u64"
+unique_style_range="0 1 2"
+add_ons_range="0 1 2"
+
+user=daniel
+outfile=runtests.$$.out
+
+die() {
+	echo "ERROR${@:+": "}$@" 1>&2
+	exit -1
+}
+
+
+rm -f runtest.log runtest.out
+
+if [[ -e ${outfile} ]]; then
+	echo "File ${outfile} exists, please move it out of the way."
+	exit
+fi
+
+for ((gcc_inst_num = 10; gcc_inst_num > 1; --gcc_inst_num)); do
+	gcc-config $gcc_inst_num || exit
+	. /etc/profile
+
+	for key_type in ${key_type_range}; do
+	for unique_style in ${unique_style_range}; do
+	for add_ons in ${add_ons_range}; do
+
+	nice -n -3 sudo -Hu ${user}			\
+		key_type=${key_type}			\
+		payload=0				\
+		use_leftmost=$((add_ons > 0))		\
+		use_rightmost=$((add_ons == 2))		\
+		use_count=$((add_ons == 2))		\
+		unique_keys=$((unique_style > 0))	\
+		insert_replaces=$((unique_style == 2))	\
+		reps=0x20000				\
+		./runtest.sh >> ${outfile} || die
+
+	done
+	done
+	done
+done
+gcc-config 10
+. /etc/profile
-- 
1.7.3.4


  parent reply	other threads:[~2012-09-28 23:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28 23:40 [PATCH v6 0/10] Generic Red-Black Trees Daniel Santos
2012-09-28 23:40 ` [PATCH v6 1/10] rbtree.h: " Daniel Santos
2012-09-28 23:40 ` [PATCH v6 2/10] rbtree.h: include kconfig.h Daniel Santos
2012-09-28 23:40 ` [PATCH v6 3/10] Generate doc comments for rbtree.h in Kernel-API Daniel Santos
2012-09-28 23:40 ` [PATCH v6 4/10] rbtree.h: Add test & validation framework Daniel Santos
2012-09-28 23:40 ` [PATCH v6 5/10] rbtree.h: add doc comments for struct rb_node Daniel Santos
2012-09-28 23:48 ` [PATCH v6 6/10] selftest: Add generic tree self-test common code Daniel Santos
2012-09-28 23:48 ` [PATCH v6 7/10] selftest: Add userspace test program Daniel Santos
2012-09-28 23:48 ` [PATCH v6 8/10] selftest: Add script to compile & run " Daniel Santos
2012-09-28 23:48 ` Daniel Santos [this message]
2012-09-28 23:48 ` [PATCH v6 10/10] selftest: report generation script for test results Daniel Santos

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=1348876126-28792-4-git-send-email-daniel.santos@pobox.com \
    --to=daniel.santos@pobox.com \
    --cc=David.Woodhouse@intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=aarcange@redhat.com \
    --cc=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paul.gortmaker@windriver.com \
    --cc=paul.mckenney@linaro.org \
    --cc=pisa@cmp.felk.cvut.cz \
    --cc=riel@redhat.com \
    --cc=rob@landley.net \
    --cc=walken@google.com \
    /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

all inboxes | Powered by JetHome®