Hi Andrea,
As you are using myfunctions.sh in your script, it will simply replace
the installed myfunctions.sh in $LTP_ROOT/testcase/bin which is written
by Sudhir.
And if you will run this testcase from `./runltp` sudhir's memory
controller tetscase will refer your myfuncitons.sh script.
So i am just renaming this script to some other name and correspondingly
changing the Makefile & run_io_throttle_test.sh .
Attached is the patch. I might require your acknowledgement for this.
- Rishi
Index: ltp-full-20080930/testcases/kernel/controllers/io-throttle/Makefile
===================================================================
--- ltp-full-20080930.orig/testcases/kernel/controllers/io-throttle/Makefile 2008-09-30 18:06:43.000000000 +0530
+++ ltp-full-20080930/testcases/kernel/controllers/io-throttle/Makefile 2008-10-02 19:54:11.000000000 +0530
@@ -12,5 +12,5 @@
rm -f $(TARGETS) *.o
install:
- @set -e; for i in $(TARGETS) run_io_throttle_test.sh myfunctions.sh; do ln -f $$i ../../../bin/$$i ; chmod +x $$i ; done
+ @set -e; for i in $(TARGETS) run_io_throttle_test.sh myfunctions-io.sh; do ln -f $$i ../../../bin/$$i ; chmod +x $$i ; done
Index: ltp-full-20080930/testcases/kernel/controllers/io-throttle/myfunctions-io.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ ltp-full-20080930/testcases/kernel/controllers/io-throttle/myfunctions-io.sh 2008-10-02 19:53:03.000000000 +0530
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 021110-1307, USA.
+#
+# Copyright (C) 2008 Andrea Righi <[EMAIL PROTECTED]>
+#
+# usage . myfunctions.sh
+
+setup()
+{
+ # create testcase cgroups
+ if [ -e /dev/blockioctl ]; then
+ echo "WARN: /dev/blockioctl already exist! overwriting."
+ cleanup
+ fi
+ mkdir /dev/blockioctl
+ mount -t cgroup -o blockio cgroup /dev/blockioctl
+ if [ $? -ne 0 ]; then
+ echo "ERROR: could not mount cgroup filesystem " \
+ " on /dev/blockioctl. Exiting test."
+ cleanup
+ exit 1
+ fi
+ for i in `seq 1 3`; do
+ if [ -e /dev/blockioctl/cgroup-$i ]; then
+ rmdir /dev/blockioctl/cgroup-$i
+ echo "WARN: earlier cgroup-$i found and removed"
+ fi
+ mkdir /dev/blockioctl/cgroup-$i
+ if [ $? -ne 0 ]; then
+ echo "ERROR: could not create cgroup-$i" \
+ "Check your permissions. Exiting test."
+ cleanup
+ exit 1
+ fi
+ done
+}
+
+cleanup()
+{
+ echo "Cleanup called"
+ for i in `seq 1 3`; do
+ rmdir /dev/blockioctl/cgroup-$i
+ rm -f /tmp/cgroup-$i.out
+ done
+ umount /dev/blockioctl
+ rmdir /dev/blockioctl
+}
Index: ltp-full-20080930/testcases/kernel/controllers/io-throttle/myfunctions.sh
===================================================================
--- ltp-full-20080930.orig/testcases/kernel/controllers/io-throttle/myfunctions.sh 2008-09-30 18:06:43.000000000 +0530
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,61 +0,0 @@
-#!/bin/sh
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public
-# License along with this program; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 021110-1307, USA.
-#
-# Copyright (C) 2008 Andrea Righi <[EMAIL PROTECTED]>
-#
-# usage . myfunctions.sh
-
-setup()
-{
- # create testcase cgroups
- if [ -e /dev/blockioctl ]; then
- echo "WARN: /dev/blockioctl already exist! overwriting."
- cleanup
- fi
- mkdir /dev/blockioctl
- mount -t cgroup -o blockio cgroup /dev/blockioctl
- if [ $? -ne 0 ]; then
- echo "ERROR: could not mount cgroup filesystem " \
- " on /dev/blockioctl. Exiting test."
- cleanup
- exit 1
- fi
- for i in `seq 1 3`; do
- if [ -e /dev/blockioctl/cgroup-$i ]; then
- rmdir /dev/blockioctl/cgroup-$i
- echo "WARN: earlier cgroup-$i found and removed"
- fi
- mkdir /dev/blockioctl/cgroup-$i
- if [ $? -ne 0 ]; then
- echo "ERROR: could not create cgroup-$i" \
- "Check your permissions. Exiting test."
- cleanup
- exit 1
- fi
- done
-}
-
-cleanup()
-{
- echo "Cleanup called"
- for i in `seq 1 3`; do
- rmdir /dev/blockioctl/cgroup-$i
- rm -f /tmp/cgroup-$i.out
- done
- umount /dev/blockioctl
- rmdir /dev/blockioctl
-}
Index: ltp-full-20080930/testcases/kernel/controllers/io-throttle/run_io_throttle_test.sh
===================================================================
--- ltp-full-20080930.orig/testcases/kernel/controllers/io-throttle/run_io_throttle_test.sh 2008-09-30 18:06:43.000000000 +0530
+++ ltp-full-20080930/testcases/kernel/controllers/io-throttle/run_io_throttle_test.sh 2008-10-02 19:58:03.000000000 +0530
@@ -20,7 +20,7 @@
# Usage: ./run_io_throttle_test.sh
# Description: test block device I/O bandwidth controller functionalities
-. myfunctions.sh
+. ./myfunctions-io.sh
trap cleanup SIGINT
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list