aboutsummaryrefslogtreecommitdiff
path: root/testscripts
diff options
context:
space:
mode:
Diffstat (limited to 'testscripts')
-rwxr-xr-xtestscripts/autofs1.sh273
-rwxr-xr-xtestscripts/autofs4.sh259
-rwxr-xr-xtestscripts/load_stress_all_kernel_modules.sh35
-rwxr-xr-xtestscripts/ltp-scsi_debug.sh218
-rwxr-xr-xtestscripts/ltpdmmapper.sh204
-rwxr-xr-xtestscripts/sysfs.sh121
6 files changed, 0 insertions, 1110 deletions
diff --git a/testscripts/autofs1.sh b/testscripts/autofs1.sh
deleted file mode 100755
index 324c4db93..000000000
--- a/testscripts/autofs1.sh
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/bin/bash
-
-
-##############################################################
-#
-# Copyright (c) International Business Machines Corp., 2003
-#
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#
-# FILE : autofs1.sh
-# USAGE : autofs1.sh <disk_partition>
-#
-# DESCRIPTION : A script that will test autofs on Linux system.
-# REQUIREMENTS:
-# 1) System with a floppy device with a floppy disk in it.
-# 2) A spare (scratch) disk partition of 100MB or larger.
-#
-# HISTORY :
-# 06/11/2003 Prakash Narayana (prakashn@us.ibm.com)
-# 08/01/2005 Michael Reed (mreed10@us.ibm.com)
-# - Added an check to see if a directory exists
-# - This prevents unnessary failures
-# - Correction to an echo statement
-# - Added an additional error message if a floppy disk is not present
-#
-# CODE COVERAGE:
-# 41.46% - fs/autofs/dirhash.c
-# 33.33% - fs/autofs/init.c
-# 27.70% - fs/autofs/inode.c
-# 38.16% - fs/autofs/root.c
-# 0.00% - fs/autofs/symlink.c
-# 43.40% - fs/autofs/waitq.c
-#
-##############################################################
-
-
-##############################################################
-#
-# Make sure that uid=root is running this script.
-# Validate the command line argument as a block special device.
-# Make sure that autofs package has been installed.
-# Make sure that autofs module is built into the kernel or loaded.
-#
-##############################################################
-
-if [ $UID != 0 ]
-then
- echo "FAILED: Must have root access to execute this script"
- exit 1
-fi
-
-if [ $# != 1 ]
-then
- echo "FAILED: Usage $0 <disk_partition>"
- echo "Example: $0 /dev/hdc1"
- exit 1
-else
- disk_partition=$1
- if [ ! -b $disk_partition ]
- then
- echo "FAILED: Usage $0 <block special disk_partition>"
- exit 1
- fi
- mkfs -t ext2 $disk_partition
-fi
-
-rpm -q -a | grep autofs
-if [ $? != 0 ]
-then
- echo "FAILED: autofs package is not installed"
- exit 1
-fi
-
-grep autofs /proc/filesystems
-if [ $? != 0 ]
-then
- echo "FAILED: autofs module is not built into the kernel or loaded"
- exit 1
-fi
-
-
-##############################################################
-#
-# Pick the floppy device name from /etc/fstab
-# Format (mkfs -t ext2) the floppy to ext2 file system
-# Create the /etc/auto.master
-# Create the /etc/auto.media
-# Create /AUTOFS directory.
-#
-##############################################################
-
-floppy_dev=`grep floppy /etc/fstab | awk '{print $1}'`
-
-echo "Found floppy device:$floppy_dev"
-
-if [ $floppy_dev != "" ]
-then
- /sbin/mkfs -t ext2 $floppy_dev
- if [ $? != 0 ]
- then
- echo "FAILED: mkfs -t ext2 $floppy_dev failed"
- echo "Insert a disk into the floppy drive"
- exit 1
- fi
-fi
-
-if [ ! -d /AUTOFS ]
-then
- mkdir -m 777 /AUTOFS
-fi
-
-echo "/AUTOFS/MEDIA /etc/auto.media" > /etc/auto.master
-echo "floppy -fstype=ext2 :$floppy_dev" > /etc/auto.media
-
-
-##############################################################
-#
-# Verify that "/etc/init.d/autofs start|restart|stop|status|reload"
-# command works.
-#
-# If fails, cleanup and exit.
-#
-##############################################################
-
-/etc/init.d/autofs start
-if [ $? != 0 ]
-then
- rm -rf /etc/auto.master /etc/auto.media /AUTOFS
- echo "FAILED: "/etc/init.d/autofs start""
- exit 1
-fi
-echo "Resuming test, please wait..."
-sleep 15
-
-/etc/init.d/autofs stop
-if [ $? != 0 ]
-then
- rm -rf /etc/auto.master /etc/auto.media /AUTOFS
- echo "FAILED: "/etc/init.d/autofs stop""
- exit 1
-else
- /etc/init.d/autofs start
-fi
-echo "Resuming test, please wait..."
-sleep 15
-
-/etc/init.d/autofs restart
-if [ $? != 0 ]
-then
- /etc/init.d/autofs stop
- rm -rf /etc/auto.master /etc/auto.media /AUTOFS
- echo "FAILED: "/etc/init.d/autofs restart""
- exit 1
-fi
-echo "Resuming test, please wait..."
-sleep 15
-
-/etc/init.d/autofs status
-if [ $? != 0 ]
-then
- /etc/init.d/autofs stop
- rm -rf /etc/auto.master /etc/auto.media /AUTOFS
- echo "FAILED: "/etc/init.d/autofs status""
- exit 1
-fi
-
-/etc/init.d/autofs reload
-if [ $? != 0 ]
-then
- /etc/init.d/autofs stop
- rm -rf /etc/auto.master /etc/auto.media /AUTOFS
- echo "FAILED: "/etc/init.d/autofs reload""
- exit 1
-fi
-
-
-##############################################################
-#
-# Tryout some error code paths by:
-# (1) Write into automount directory
-# (2) Remove automount parent directory
-# (3) Automount the floppy disk
-# (4) Hit automounter timeout by sleep 60; then wakeup with error
-# condition.
-#
-##############################################################
-
-echo "forcing error paths and conditions..."
-
-mkdir /AUTOFS/MEDIA/mydir >/dev/null 2>&1
-rm -rf /AUTOFS >/dev/null 2>&1
-
-mkdir /AUTOFS/MEDIA/floppy/test
-cp /etc/auto.master /etc/auto.media /AUTOFS/MEDIA/floppy/test
-sync; sync
-echo "Resuming test, please wait..."
-sleep 60
-mkdir /AUTOFS/MEDIA/mydir >/dev/null 2>&1
-rm -rf /AUTOFS >/dev/null 2>&1
-
-
-##############################################################
-#
-# Add an entry to the /etc/auto.master and reload.
-#
-##############################################################
-
-echo "/AUTOFS/DISK /etc/auto.disk" >> /etc/auto.master
-echo "disk -fstype=auto,rw,sync :$disk_partition " > /etc/auto.disk
-/etc/init.d/autofs reload
-echo "Resuming test, please wait..."
-sleep 30
-
-
-
-mkdir /AUTOFS/DISK/disk/test
-cp /etc/auto.master /etc/auto.media /AUTOFS/DISK/disk/test
-sync; sync
-echo "Resuming test, please wait..."
-sleep 60
-
-
-if [ -e /AUTOFS/DISK/disk/test ]; then
- cd /AUTOFS/DISK/disk/test
- umount /AUTOFS/DISK/disk/ >/dev/null 2>&1
- if [ $? = 0 ]
- then
- /etc/init.d/autofs stop
- rm -rf /etc/auto.master /etc/auto.media /etc/auto.disk /AUTOFS
- echo "FAILED: unmounted a busy file system!"
- exit 1
- fi
- cd
- umount /AUTOFS/DISK/disk/
-if [ $? != 0 ]
- then
- /etc/init.d/autofs stop
- rm -rf /etc/auto.master /etc/auto.media /etc/auto.disk /AUTOFS
- echo "FAILED: Could not unmount automounted file system"
- exit 1
- fi
-fi
-#
-# Mount the disk partition somewhere else and then reference automount
-# point for disk partition.
-#
-mount -t ext2 $disk_partition /mnt/
-ls -l /AUTOFS/DISK/disk
-umount /mnt
-
-
-#######################################################
-#
-# Just before exit, stop autofs and cleanup.
-#
-#######################################################
-
-/etc/init.d/autofs stop
-rm -rf /etc/auto.master /etc/auto.media /etc/auto.disk /AUTOFS
-echo "PASSED: $0 passed!"
-exit 0
diff --git a/testscripts/autofs4.sh b/testscripts/autofs4.sh
deleted file mode 100755
index 00119a604..000000000
--- a/testscripts/autofs4.sh
+++ /dev/null
@@ -1,259 +0,0 @@
-#!/bin/bash
-
-
-##############################################################
-#
-# Copyright (c) International Business Machines Corp., 2003
-#
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#
-# FILE : autofs4.sh
-# USAGE : autofs4.sh <disk_partition>
-#
-# DESCRIPTION : A script that will test autofs on Linux system.
-# REQUIREMENTS:
-# 1) System with a floppy device with a floppy disk in it.
-# 2) A spare (scratch) disk partition of 100MB or larger.
-#
-# HISTORY :
-# 06/11/2003 Prakash Narayana (prakashn@us.ibm.com)
-#
-# CODE COVERAGE: 26.8% - fs/autofs4 (Total Coverage)
-#
-# 24.1% - fs/autofs4/expire.c
-# 33.3% - fs/autofs4/init.c
-# 24.0% - fs/autofs4/inode.c
-# 29.9% - fs/autofs4/root.c
-# 0.0% - fs/autofs4/symlink.c
-# 29.1% - fs/autofs4/waitq.c
-#
-##############################################################
-
-
-##############################################################
-#
-# Make sure that uid=root is running this script.
-# Validate the command line argument as a block special device.
-# Make sure that autofs package has been installed.
-# Make sure that autofs module is built into the kernel or loaded.
-#
-##############################################################
-
-if [ $UID != 0 ]
-then
- echo "FAILED: Must have root access to execute this script"
- exit 1
-fi
-
-if [ $# != 1 ]
-then
- echo "FAILED: Usage $0 <disk_partition>"
- exit 1
-else
- disk_partition=$1
- if [ ! -b $disk_partition ]
- then
- echo "FAILED: Usage $0 <block special disk_partition>"
- exit 1
- fi
- mkfs -t ext2 $disk_partition >/dev/null 2>&1
-fi
-
-rpm -q -a | grep autofs >/dev/null 2>&1
-if [ $? != 0 ]
-then
- echo "FAILED: autofs package is not installed"
- exit 1
-fi
-
-grep autofs /proc/filesystems >/dev/null 2>&1
-if [ $? != 0 ]
-then
- echo "FAILED: autofs module is not built into the kernel or loaded"
- exit 1
-fi
-
-
-##############################################################
-#
-# Pick the floppy device name from /etc/fstab
-# Format (mkfs -t ext2) the floppy to ext2 file system
-# Create the /etc/auto.master
-# Create the /etc/auto.media
-# Create /AUTOFS directory.
-#
-##############################################################
-
-floppy_dev=`grep floppy /etc/fstab | awk '{print $1}'`
-
-if [ $floppy_dev != "" ]
-then
- /sbin/mkfs -t ext2 $floppy_dev >/dev/null 2>&1
- if [ $? != 0 ]
- then
- echo "FAILED: mkfs -t ext2 $floppy_dev failed"
- exit 1
- fi
-fi
-
-if [ ! -d /AUTOFS ]
-then
- mkdir -m 755 /AUTOFS
-fi
-
-echo "/AUTOFS/MEDIA /etc/auto.media " > /etc/auto.master
-echo "floppy -fstype=ext2 :$floppy_dev" > /etc/auto.media
-
-
-##############################################################
-#
-# Verify that "/etc/init.d/autofs start|restart|stop|status|reload"
-# command works.
-#
-# If fails, cleanup and exit.
-#
-##############################################################
-
-/etc/init.d/autofs start >/dev/null 2>&1
-if [ $? != 0 ]
-then
- rm -rf /etc/auto.master /etc/auto.media /AUTOFS
- echo "FAILED: "/etc/init.d/autofs start""
- exit 1
-fi
-echo "Resuming test, please wait..."
-sleep 15
-
-/etc/init.d/autofs stop >/dev/null 2>&1
-if [ $? != 0 ]
-then
- rm -rf /etc/auto.master /etc/auto.media /AUTOFS
- echo "FAILED: "/etc/init.d/autofs stop""
- exit 1
-else
- /etc/init.d/autofs start >/dev/null 2>&1
-fi
-sleep 15
-
-/etc/init.d/autofs restart >/dev/null 2>&1
-if [ $? != 0 ]
-then
- /etc/init.d/autofs stop >/dev/null 2>&1
- rm -rf /etc/auto.master /etc/auto.media /AUTOFS
- echo "FAILED: "/etc/init.d/autofs restart""
- exit 1
-fi
-echo "Resuming test, please wait..."
-sleep 15
-
-/etc/init.d/autofs status >/dev/null 2>&1
-if [ $? != 0 ]
-then
- /etc/init.d/autofs stop >/dev/null 2>&1
- rm -rf /etc/auto.master /etc/auto.media /AUTOFS
- echo "FAILED: "/etc/init.d/autofs status""
- exit 1
-fi
-
-/etc/init.d/autofs reload >/dev/null 2>&1
-if [ $? != 0 ]
-then
- /etc/init.d/autofs stop >/dev/null 2>&1
- rm -rf /etc/auto.master /etc/auto.media /AUTOFS
- echo "FAILED: "/etc/init.d/autofs reload""
- exit 1
-fi
-
-
-##############################################################
-#
-# Tryout some error code paths by:
-# (1) Write into automount directory
-# (2) Remove automount parent directory
-# (3) Automount the floppy disk
-# (4) Hit automounter timeout by sleep 60; then wakeup with error
-# condition.
-#
-##############################################################
-
-mkdir /AUTOFS/MEDIA/mydir >/dev/null 2>&1
-rm -rf /AUTOFS >/dev/null 2>&1
-
-mkdir /AUTOFS/MEDIA/floppy/test
-cp /etc/auto.master /etc/auto.media /AUTOFS/MEDIA/floppy/test
-sync; sync
-echo "Resuming test, please wait..."
-sleep 60
-mkdir /AUTOFS/MEDIA/mydir >/dev/null 2>&1
-rm -rf /AUTOFS >/dev/null 2>&1
-
-
-##############################################################
-#
-# Add an entry to the /etc/auto.master and reload.
-#
-##############################################################
-
-echo "/AUTOFS/DISK /etc/auto.disk " >> /etc/auto.master
-echo "disk -fstype=ext2 :$disk_partition " > /etc/auto.disk
-/etc/init.d/autofs reload >/dev/null 2>&1
-echo "Resuming test, please wait..."
-sleep 30
-
-mkdir /AUTOFS/DISK/disk/test
-cp /etc/auto.master /etc/auto.media /AUTOFS/DISK/disk/test
-sync; sync
-echo "Resuming test, please wait..."
-sleep 60
-
-cd /AUTOFS/DISK/disk/test
-umount /AUTOFS/DISK/disk/ >/dev/null 2>&1
-if [ $? = 0 ]
-then
- /etc/init.d/autofs stop >/dev/null 2>&1
- rm -rf /etc/auto.master /etc/auto.media /etc/auto.disk /AUTOFS
- echo "FAILED: unmounted a busy file system!"
- exit 1
-fi
-cd
-
-umount /AUTOFS/DISK/disk/ >/dev/null 2>&1
-if [ $? != 0 ]
-then
- /etc/init.d/autofs stop >/dev/null 2>&1
- rm -rf /etc/auto.master /etc/auto.media /etc/auto.disk /AUTOFS
- echo "FAILED: Could not unmount automounted file system"
- exit 1
-fi
-
-#
-# Mount the disk partition somewhere else and then reference automount
-# point for disk partition.
-#
-mount -t ext2 $disk_partition /mnt/
-ls -l /AUTOFS/DISK/disk
-umount /mnt
-
-
-#######################################################
-#
-# Just before exit, stop autofs and cleanup.
-#
-#######################################################
-
-/etc/init.d/autofs stop >/dev/null 2>&1
-rm -rf /etc/auto.master /etc/auto.media /etc/auto.disk /AUTOFS
-echo "PASSED: $0 passed!"
-exit 0
diff --git a/testscripts/load_stress_all_kernel_modules.sh b/testscripts/load_stress_all_kernel_modules.sh
deleted file mode 100755
index 6e67b154a..000000000
--- a/testscripts/load_stress_all_kernel_modules.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-################################################################################
-## ##
-## Copyright (c) International Business Machines Corp., 2009 ##
-## ##
-## 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
-## ##
-################################################################################
-# ##
-# File : load_stress_all_kernel_modules.sh ##
-# ##
-# Description: Try to load all the modules present in the system, installed ##
-# both during Distro installation, or, custom kernel build. ##
-# ##
-# Author: Subrata Modak <subrata@linux.vnet.ibm.com> ##
-################################################################################
-
-for module in `modprobe -l | tr '\n' ' '`
- do
- insert_module=`basename $module .ko`
- modprobe -v $insert_module
-done
-
diff --git a/testscripts/ltp-scsi_debug.sh b/testscripts/ltp-scsi_debug.sh
deleted file mode 100755
index 37853002e..000000000
--- a/testscripts/ltp-scsi_debug.sh
+++ /dev/null
@@ -1,218 +0,0 @@
-#!/bin/bash
-
-# Check if scsi_debug module was built or not
-export kernel=$(uname -r)
-
-ls /lib/modules/$kernel/kernel/drivers/scsi | grep scsi_debug > /dev/null 2>&1
-if [ $? -ne 0 ];
-then
- echo "scsi_debug was not built in the kernel as a module"
- echo "Build scsi_debug as a module first before running the test"
-fi
-
-# Unload scsi_debug moudle if it was already loaded:
-lsmod | grep scsi_debug > /dev/null 2>&1
-if [ $? -eq 0 ];
-then
- echo "The scsi_debug module was already loaded, unload it before test..."
- rmmod -f scsi_debug
-fi
-lsmod | grep scsi_debug > /dev/null 2>&1
-if [ $? -eq 0 ];
-then
- echo "The scsi_debug module was not unloaded - unload error"
-else
- echo "The scsi_debug module was unloaded successfully"
- echo "start testing..."
-fi
-
-orig_count=$(cat /proc/partitions | wc -l)
-
-echo " Load the scsi_debug module..."
-modprobe scsi_debug
-if [ $? -ne 0 ];
-then
- echo "Can't load scsi_debug modules"
- exit
-fi
-
-echo "Check if scsi_debug was loaded..."
-lsmod | grep scsi_debug > /dev/null 2>&1
-if [ $? -eq 0 ];
-then
- echo "scsi_debug module was loaded successfully"
-else
- echo "scsi_debug module was not loaded"
- exit
-fi
-
-
-echo "Remove the scsi_debug device..."
-dev_name=$(ls /proc/scsi/scsi_debug)
-# echo $dev_name
-rm_dev=$dev_name:0:0:0
-# echo $rm_dev
-echo 1 > /sys/class/scsi_device/$rm_dev/device/delete
-
-echo "Check if the scsi_debug device was removed..."
-ls /sys/class/scsi_device | grep $rm_dev > /dev/null 2>&1
-if [ $? -eq 0 ];
-then
- echo "The device was not removed - remove error"
-else
- echo "The device $dev_name was removed successfully"
-fi
-
-echo "Add the device back..."
-echo "0 0 0" > /sys/class/scsi_host/host$dev_name/scan
-ls /sys/class/scsi_device | grep $rm_dev > /dev/null 2>&1
-if [ $? -ne 0 ];
-then
- echo "The device was not added - add device error"
-else
- echo "The device $dev_name was added back successfully"
-fi
-
-echo "Add a new host..."
-echo 1 > /sys/bus/pseudo/drivers/scsi_debug/add_host
-num_host=$(cat /sys/bus/pseudo/drivers/scsi_debug/add_host)
-if [ $num_host -ne 2 ];
-then
- echo "The new host was not added - add host error"
-else
- echo "The new host was added successfully"
-fi
-
-echo "Romove hosts..."
-echo -2 > /sys/bus/pseudo/drivers/scsi_debug/add_host
-num_host=$(cat /sys/bus/pseudo/drivers/scsi_debug/add_host)
-if [ $num_host -ne 0 ];
-then
- echo "The hosts were not removed - remove hosts error"
-else
- echo "The hosts were removed successfully"
-fi
-
-echo "Unload scsi_debug moudle..."
-rmmod -f scsi_debug
-lsmod | grep scsi_debug > /dev/null 2>&1
-if [ $? -eq 0 ];
-then
- echo "The scsi_debug module was not unloaded - unload error"
-else
- echo "The scsi_debug module was unloaded successfully"
-fi
-
-echo "Load scsi_debug with multiple hosts..."
-modprobe scsi_debug max_luns=2 num_tgts=2 add_host=2 dev_size_mb=20
-lsmod | grep scsi_debug > /dev/null 2>&1
-if [ $? -eq 0 ];
-then
- echo "The multiple scsi_debug modules were loaded successfully"
-else
- echo "The multiple scsi_debug modules were not loaded - load error"
-fi
-
-echo "Check if modules were loaded as required by premeters..."
-max_luns=$(cat /sys/bus/pseudo/drivers/scsi_debug/max_luns)
-add_host=$(cat /sys/bus/pseudo/drivers/scsi_debug/add_host)
-num_tgts=$(cat /sys/bus/pseudo/drivers/scsi_debug/num_tgts)
-# echo "max_lunx is $max_luns"
-# echo "add_host is $add_host"
-# echo "num_tgts is $num_tgts"
-
-premeter_err_ct=0;
-
-if [ $max_luns -ne 2 ];
-then
- echo "max_luns was not correct"
- premeter_err_ct=$premeter_err_ct+1;
-fi
-if [ $add_host -ne 2 ];
-then
- echo "add_host was not correct"
- premeter_err_ct=$premeter_err_ct+1;
-fi
-if [ $num_tgts -ne 2 ];
-then
- echo "num_tgts was not correct"
- premeter_err_ct=$premeter_err_ct+1;
-fi
-if [ $premeter_err_ct -eq 0 ];
-then
- echo "multiple scsi_debug was loaded as required premeters"
-else
- echo "multip.e scsi_debug was not loaded as required premeters"
-fi
-echo "scsi_debug first part of test has been done."
-
-echo "Now we are doing fs test for scsi_debug driver..."
-
-cd `dirname $0`
-export LTPROOT=${PWD}
-echo $LTPROOT | grep testscripts > /dev/null 2>&1
-if [ $? -eq 0 ]; then
- cd ..
- export LTPROOT=${PWD}
-fi
-
-export TMPBASE="/tmp"
-
-# check if the newly created scsi_debug partitions are in /proc/partitions file
-check_count=$(cat /proc/partitions | wc -l)
-save_count=$(( $check_count - $orig_count ))
-if [ $save_count -lt 4 ]; then
- echo "Not enough scsi_debug partitions to run the test"
- exit
-fi
-
-# Get the 4 partitions created by scsi_debug for testing
-cat /proc/partitions | awk '{print $4}' | tail -n 4 > $TMPBASE/partition-test
-echo "The 4 partitions used to run the test are:"
-part1=$(cat $TMPBASE/partition-test | tail -n 1)
-echo $part1
-part2=$(cat $TMPBASE/partition-test | head -n 3 | tail -n 1)
-echo $part2
-part3=$(cat $TMPBASE/partition-test | head -n 2 | tail -n 1)
-echo $part3
-part4=$(cat $TMPBASE/partition-test | head -n 1)
-echo $part4
-
-export PATH="${PATH}:${LTPROOT}/testcases/bin"
-
-mkdir /test >/dev/null 2>&1
-mkdir /test/growfiles >/dev/null 2>&1
-mkdir /test/growfiles/ext2 >/dev/null 2>&1
-mkdir /test/growfiles/ext3 >/dev/null 2>&1
-mkdir /test/growfiles/reiser >/dev/null 2>&1
-mkdir /test/growfiles/msdos >/dev/null 2>&1
-
-echo "----- make ext3 fs -----"
-mkfs -V -t ext3 /dev/$part1
-echo "----- make ext2 fs -----"
-mkfs -V -t ext2 /dev/$part2
-echo "----- make reiserfs fs -----"
-mkreiserfs -f /dev/$part3
-echo "----- make msdos fs -----"
-mkfs -V -t msdos -I /dev/$part4
-
-echo "----- Mount partitions -----"
-mount /dev/$part1 /test/growfiles/ext3
-mount /dev/$part2 /test/growfiles/ext2
-mount /dev/$part3 /test/growfiles/reiser
-mount /dev/$part4 /test/growfiles/msdos
-
-echo "----- Running tests ----- "
-echo "The test may take about 2 hours to finish..."
-sort -R ${LTPROOT}/runtest/scsi_debug.part1 -o ${TMPBASE}/scsi_debug
-
-${LTPROOT}/bin/ltp-pan -e -S -a scsi_debug -n scsi_debug -l ${TMPBASE}/fs-scsi_debug.log -o ${TMPBASE}/fs-scsi_debug.out -f ${TMPBASE}/scsi_debug
-
-wait $!
-
-umount -v /dev/$part1
-umount -v /dev/$part2
-umount -v /dev/$part3
-umount -v /dev/$part4
-
-echo "Look into /tmp/fs-scsi_debug.log and /tmp/fs-scsi_debug.out for detail results..."
diff --git a/testscripts/ltpdmmapper.sh b/testscripts/ltpdmmapper.sh
deleted file mode 100755
index f49e59626..000000000
--- a/testscripts/ltpdmmapper.sh
+++ /dev/null
@@ -1,204 +0,0 @@
-#!/bin/sh
-# This script should be run prior to running executing the filesystem tests.
-# valid devices need to be passed for Device Mapper to work correctly
-# 03/14/03 mridge@us.ibm.com added instance and time command line options
-
-cd `dirname $0`
-export LTPROOT=${PWD}
-echo $LTPROOT | grep testscripts > /dev/null 2>&1
-if [ $? -eq 0 ]; then
- cd ..
- export LTPROOT=${PWD}
-fi
-
-export TMPBASE="/tmp"
-
-
-usage()
-{
- cat <<-END >&2
- usage: ${0##*/} [ -a part1 ] [ -b part2 ]
-
- Note: In order to run this test, you must turn on "device mapper"
- component in kernel (it is under device drivers item when you
- run make menuconfig); and you must install userspace supporting
- files (libdevmapper and dmsetup). They are in the device-mapper
- package. You can download it from http://www.sistina.com. Follow
- the README/INSTALL file within the package to install it.
-
-
- defaults:
- part1=$part1
- part2=$part2
- ltproot=$LTPROOT
- tmpdir=$TMPBASE
-
- example: ${0##*/} -a hdc1 -b hdc2
-
-
- END
-exit
-}
-
-while getopts :a:b: arg
-do case $arg in
- a) part1=$OPTARG;;
- b) part2=$OPTARG;;
-
- \?) echo "************** Help Info: ********************"
- usage;;
- esac
-done
-
-if [ ! -n "$part1" ]; then
- echo "Missing 1st partition. You must pass 2 partitions for testing"
- usage;
- exit
-fi
-
-if [ ! -n "$part2" ]; then
- echo "Missing 2nd partition. You must pass 2 partitions for testing"
- usage;
- exit
-fi
-
-echo "Starting Device Mapper Tests..."
-
-echo "0 10240 linear " $part1 "0" > ltp-dev-mapper-table1
-echo "0 100000 linear " $part1 "0" > ltp-dev-mapper-table2
-echo "0 100000 linear " $part2 "0" > ltp-dev-mapper-table3
-echo "0 200000 striped 2 16 " $part1 "0" $part2 "0" > ltp-dev-mapper-table4
-
-echo "Creating Devices..."
-
-dmsetup create dm-test-1 ltp-dev-mapper-table1
-dmsetup create dm-test-2 ltp-dev-mapper-table2
-dmsetup create dm-test-3 ltp-dev-mapper-table3
-dmsetup create dm-test-4 ltp-dev-mapper-table4
-
-echo "Device Info..."
-
-dmsetup info dm-test-1
-dmsetup info dm-test-2
-dmsetup info dm-test-3
-dmsetup info dm-test-4
-
-echo "Device Dependancies..."
-
-dmsetup deps dm-test-1
-dmsetup deps dm-test-2
-dmsetup deps dm-test-3
-dmsetup deps dm-test-4
-
-echo "Device Status..."
-
-dmsetup status dm-test-1
-dmsetup status dm-test-2
-dmsetup status dm-test-3
-dmsetup status dm-test-4
-
-echo "Device Tables..."
-
-dmsetup table dm-test-1
-dmsetup table dm-test-2
-dmsetup table dm-test-3
-dmsetup table dm-test-4
-
-echo "Device Mapper Version..."
-
-dmsetup version
-
-echo "Device Waiting..."
-
-#dmsetup wait dm-test-1
-#dmsetup wait dm-test-2
-#dmsetup wait dm-test-3
-#dmsetup wait dm-test-4
-
-echo "Device Mapper Removing Devices..."
-
-dmsetup remove dm-test-1
-dmsetup remove dm-test-2
-dmsetup remove dm-test-3
-dmsetup remove dm-test-4
-
-echo "Device Mapper Re-Creating Devices..."
-
-dmsetup create dm-test-1 ltp-dev-mapper-table1
-dmsetup create dm-test-2 ltp-dev-mapper-table2
-dmsetup create dm-test-3 ltp-dev-mapper-table3
-dmsetup create dm-test-4 ltp-dev-mapper-table4
-
-echo "Re-Naming Devices..."
-
-dmsetup rename dm-test-1 dm-test-1-new
-dmsetup rename dm-test-2 dm-test-2-new
-dmsetup rename dm-test-3 dm-test-3-new
-dmsetup rename dm-test-4 dm-test-4-new
-
-echo "Suspend Devices..."
-
-dmsetup suspend dm-test-1-new
-dmsetup suspend dm-test-2-new
-dmsetup suspend dm-test-3-new
-dmsetup suspend dm-test-4-new
-
-echo "0 102400 linear " $part1 "0" > ltp-dev-mapper-table1
-echo "0 200000 linear " $part1 "0" > ltp-dev-mapper-table2
-echo "0 200000 linear " $part2 "0" > ltp-dev-mapper-table3
-echo "0 400000 striped 2 16 " $part1 "0" $part2 "0" > ltp-dev-mapper-table4
-
-echo "Re-loading Devices..."
-
-dmsetup reload dm-test-1-new ltp-dev-mapper-table1
-dmsetup reload dm-test-2-new ltp-dev-mapper-table2
-dmsetup reload dm-test-3-new ltp-dev-mapper-table3
-dmsetup reload dm-test-4-new ltp-dev-mapper-table4
-
-echo "Resuming Devices..."
-
-dmsetup resume dm-test-1-new
-dmsetup resume dm-test-2-new
-dmsetup resume dm-test-3-new
-dmsetup resume dm-test-4-new
-
-echo "Device Info..."
-
-dmsetup info dm-test-1-new
-dmsetup info dm-test-2-new
-dmsetup info dm-test-3-new
-dmsetup info dm-test-4-new
-
-echo "Device Dependancies..."
-
-dmsetup deps dm-test-1-new
-dmsetup deps dm-test-2-new
-dmsetup deps dm-test-3-new
-dmsetup deps dm-test-4-new
-
-echo "Device Status..."
-
-dmsetup status dm-test-1-new
-dmsetup status dm-test-2-new
-dmsetup status dm-test-3-new
-dmsetup status dm-test-4-new
-
-echo "Device Tables..."
-
-dmsetup table dm-test-1-new
-dmsetup table dm-test-2-new
-dmsetup table dm-test-3-new
-dmsetup table dm-test-4-new
-
-echo "Device Mapper Remove-all..."
-
-dmsetup remove_all
-
-echo "Device Mapper Checking Status - Shouldn't be anything to check"
-
-dmsetup status dm-test-1-new
-dmsetup status dm-test-2-new
-dmsetup status dm-test-3-new
-dmsetup status dm-test-4-new
-
-
diff --git a/testscripts/sysfs.sh b/testscripts/sysfs.sh
deleted file mode 100755
index e22f36fa2..000000000
--- a/testscripts/sysfs.sh
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/bin/bash
-
-
-##############################################################
-#
-# Copyright (c) International Business Machines Corp., 2003
-#
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#
-# FILE : sysfs.sh
-# USAGE : sysfs.sh [ -k <kernel_module> ]
-#
-# DESCRIPTION : A script that will test sysfs on Linux system.
-# REQUIREMENTS: CONFIG_DUMMY must have been used to build kernel, and the
-# dummy network module must exist.
-#
-# HISTORY :
-# 06/24/2003 Prakash Narayana (prakashn@us.ibm.com)
-#
-# CODE COVERAGE: 31.3% - fs/sysfs (Total Coverage)
-#
-# 0.0% - fs/sysfs/bin.c
-# 61.8% - fs/sysfs/dir.c
-# 27.5% - fs/sysfs/file.c
-# 40.4% - fs/sysfs/inode.c
-# 41.2% - fs/sysfs/mount.c
-# 58.1% - fs/sysfs/symlink.c
-#
-##############################################################
-
-
-MNT_POINT="/tmp/sysfs_$$"
-
-KERNEL_NAME=`uname -a | awk ' { print $3 } '`
-KERN_MODULE=/lib/modules/$KERNEL_NAME/kernel/drivers/net/dummy.ko
-USAGE="$0 [ -k <kernel_module> ]"
-
-
-##############################################################
-#
-# Make sure that uid=root is running this script.
-# Validate the command line arguments.
-#
-##############################################################
-
-if [ $UID != 0 ]
-then
- echo "FAILED: Must have root access to execute this script"
- exit 1
-fi
-
-while getopts k: args
-do
- case $args in
- k) KERN_MODULE=$OPTARG ;;
- \?) echo $USAGE ; exit 1 ;;
- esac
-done
-
-if [ -z "$KERN_MODULE" ]
-then
- echo $USAGE
- echo "FAILED: kernel module to insert not specified"
- exit 1
-fi
-
-# Here is the code coverage for fs/sysfs
-# insmod/rmmod net/dummy.ko creates and deletes a directory
-# under sysfs.
-# In kernel, 2.5.73 or higher, insert/delete base/firmware_class.ko
-
-mkdir -p -m 777 $MNT_POINT
-mount -t sysfs sysfs $MNT_POINT
-if [ $? != 0 ]
-then
- echo "FAILED: sysfs mount failed"
- exit 1
-fi
-
-insmod $KERN_MODULE
-if [ $? != 0 ]
-then
- umount $MNT_POINT
- rm -rf $MNT_POINT
- echo "FAILED: insmod failed"
- exit 1
-fi
-
-rmmod $KERN_MODULE
-if [ $? != 0 ]
-then
- umount $MNT_POINT
- rm -rf $MNT_POINT
- echo "FAILED: rmmod failed"
- exit 1
-fi
-
-
-#######################################################
-#
-# Just before exit, perform the cleanup.
-#
-#######################################################
-
-umount $MNT_POINT
-rm -rf $MNT_POINT
-
-echo "PASSED: $0 passed!"
-exit 0