From a9857c6d98b1e92b5a34ab056101a4d109e4bbe2 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 21 Feb 2009 18:46:45 +0000 Subject: [PATCH] - update from HEAD --- .../kernel_patches/patches/md-soft-lockups.patch | 13 - .../patches/raid5-mmp-unplug-dev-sles10.patch | 22 + .../patches/raid5-mmp-unplug-dev.patch | 22 + lustre/tests/2ost.sh | 54 --- lustre/tests/acceptance-metadata-double.sh | 128 ------ lustre/tests/acceptance-metadata-parallel.sh | 105 ----- lustre/tests/acceptance-metadata-single.sh | 153 ------- lustre/tests/busy.sh | 7 - lustre/tests/cfg/insanity-adev.sh | 37 -- lustre/tests/cfg/insanity-mdev.sh | 37 -- lustre/tests/cfg/mdev.sh | 32 -- lustre/tests/cmknod.c | 167 -------- lustre/tests/cobd.sh | 34 -- lustre/tests/crash-mod.sh | 11 - lustre/tests/createdestroy.c | 258 ------------ lustre/tests/disk1_4.zip | Bin 170785 -> 0 bytes lustre/tests/{disk1_8.tgz => disk1_8.tar.bz2} | Bin lustre/tests/fchdir_test.c | 77 ---- lustre/tests/gensymmap.c | 132 ------ lustre/tests/getdents.c | 67 --- lustre/tests/ldaptest.c | 63 --- lustre/tests/liblustre_sanity_uml.sh | 83 ---- lustre/tests/llecho.sh | 23 -- lustre/tests/mcr.sh | 45 -- lustre/tests/o_directory.c | 85 ---- lustre/tests/openclose.c | 178 -------- lustre/tests/openme.c | 59 --- lustre/tests/sanity-lmv.sh | 451 --------------------- lustre/tests/set_dates.sh | 4 - lustre/tests/sleeptest.c | 151 ------- lustre/tests/test2.c | 89 ---- lustre/tests/toexcl.c | 113 ------ 32 files changed, 44 insertions(+), 2656 deletions(-) delete mode 100644 lustre/kernel_patches/patches/md-soft-lockups.patch create mode 100644 lustre/kernel_patches/patches/raid5-mmp-unplug-dev-sles10.patch create mode 100644 lustre/kernel_patches/patches/raid5-mmp-unplug-dev.patch delete mode 100644 lustre/tests/2ost.sh delete mode 100644 lustre/tests/acceptance-metadata-double.sh delete mode 100644 lustre/tests/acceptance-metadata-parallel.sh delete mode 100644 lustre/tests/acceptance-metadata-single.sh delete mode 100644 lustre/tests/busy.sh delete mode 100644 lustre/tests/cfg/insanity-adev.sh delete mode 100644 lustre/tests/cfg/insanity-mdev.sh delete mode 100644 lustre/tests/cfg/mdev.sh delete mode 100644 lustre/tests/cmknod.c delete mode 100755 lustre/tests/cobd.sh delete mode 100644 lustre/tests/crash-mod.sh delete mode 100644 lustre/tests/createdestroy.c delete mode 100644 lustre/tests/disk1_4.zip rename lustre/tests/{disk1_8.tgz => disk1_8.tar.bz2} (100%) delete mode 100644 lustre/tests/fchdir_test.c delete mode 100644 lustre/tests/gensymmap.c delete mode 100644 lustre/tests/getdents.c delete mode 100644 lustre/tests/ldaptest.c delete mode 100644 lustre/tests/liblustre_sanity_uml.sh delete mode 100644 lustre/tests/llecho.sh delete mode 100755 lustre/tests/mcr.sh delete mode 100644 lustre/tests/o_directory.c delete mode 100644 lustre/tests/openclose.c delete mode 100644 lustre/tests/openme.c delete mode 100644 lustre/tests/sanity-lmv.sh delete mode 100644 lustre/tests/set_dates.sh delete mode 100644 lustre/tests/sleeptest.c delete mode 100755 lustre/tests/test2.c delete mode 100644 lustre/tests/toexcl.c diff --git a/lustre/kernel_patches/patches/md-soft-lockups.patch b/lustre/kernel_patches/patches/md-soft-lockups.patch deleted file mode 100644 index cde9a34..0000000 --- a/lustre/kernel_patches/patches/md-soft-lockups.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: linux-2.6.18-92.1.10/drivers/md/raid5.c -=================================================================== ---- linux-2.6.18-92.1.10.orig/drivers/md/raid5.c 2008-11-10 11:00:51.000000000 +0900 -+++ linux-2.6.18-92.1.10/drivers/md/raid5.c 2008-11-10 11:02:38.000000000 +0900 -@@ -3251,6 +3251,8 @@ - handle_stripe(sh, conf->spare_page, NULL); - release_stripe(sh); - -+ cond_resched(); -+ - spin_lock_irq(&conf->device_lock); - } - PRINTK("%d stripes handled\n", handled); diff --git a/lustre/kernel_patches/patches/raid5-mmp-unplug-dev-sles10.patch b/lustre/kernel_patches/patches/raid5-mmp-unplug-dev-sles10.patch new file mode 100644 index 0000000..8bfdef3 --- /dev/null +++ b/lustre/kernel_patches/patches/raid5-mmp-unplug-dev-sles10.patch @@ -0,0 +1,22 @@ +Index: linux-2.6.16.60-0.33/drivers/md/raid5.c +=================================================================== +--- linux-2.6.16.60-0.33.orig/drivers/md/raid5.c ++++ linux-2.6.16.60-0.33/drivers/md/raid5.c +@@ -900,6 +900,8 @@ static int add_stripe_bio(struct stripe_ + bi->bi_next = *bip; + *bip = bi; + bi->bi_phys_segments ++; ++ if (bio_sync(bi) && !forwrite) ++ clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); /* force to read from disk. */ + spin_unlock_irq(&conf->device_lock); + spin_unlock(&sh->lock); + +@@ -1617,6 +1619,8 @@ static int make_request (request_queue_t + bi->bi_end_io(bi, bytes, 0); + } + spin_unlock_irq(&conf->device_lock); ++ if (bio_sync(bi)) ++ raid5_unplug_device(q); + return 0; + } + diff --git a/lustre/kernel_patches/patches/raid5-mmp-unplug-dev.patch b/lustre/kernel_patches/patches/raid5-mmp-unplug-dev.patch new file mode 100644 index 0000000..0334abd --- /dev/null +++ b/lustre/kernel_patches/patches/raid5-mmp-unplug-dev.patch @@ -0,0 +1,22 @@ +Index: linux-2.6.22.14/drivers/md/raid5.c +=================================================================== +--- linux-2.6.22.14.orig/drivers/md/raid5.c ++++ linux-2.6.22.14/drivers/md/raid5.c +@@ -1268,6 +1268,8 @@ static int add_stripe_bio(struct stripe_ + bi->bi_next = *bip; + *bip = bi; + bi->bi_phys_segments ++; ++ if (bio_sync(bi) && !forwrite) ++ clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); /* force to read from disk. */ + spin_unlock_irq(&conf->device_lock); + spin_unlock(&sh->lock); + +@@ -2972,6 +2974,8 @@ static int make_request(request_queue_t + test_bit(BIO_UPTODATE, &bi->bi_flags) + ? 0 : -EIO); + } ++ if (bio_sync(bi)) ++ raid5_unplug_device(q); + return 0; + } + diff --git a/lustre/tests/2ost.sh b/lustre/tests/2ost.sh deleted file mode 100644 index 57ddc08..0000000 --- a/lustre/tests/2ost.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -export PATH=`dirname $0`/../utils:$PATH - -config=${1:-`basename $0 .sh`.xml} - -LMC="${LMC:-lmc} -m $config" -TMP=${TMP:-/tmp} - -HOSTNAME=`hostname` - -MDSDEV=${MDSDEV:-$TMP/mds1-`hostname`} -MDSSIZE=${MDSSIZE:-400000} -FSTYPE=${FSTYPE:-ext3} -MOUNT=${MOUNT:-/mnt/lustre} -MOUNT2=${MOUNT2:-${MOUNT}2} -NETTYPE=${NETTYPE:-tcp} - -OSTDEV=${OSTDEV:-$TMP/ost-`hostname`} -OSTSIZE=${OSTSIZE:-400000} - -# specific journal size for the ost, in MB -JSIZE=${JSIZE:-0} -[ "$JSIZE" -gt 0 ] && JARG="--journal_size $JSIZE" -MDSISIZE=${MDSISIZE:-0} -[ "$MDSISIZE" -gt 0 ] && IARG="--inode_size $MDSISIZE" - -STRIPE_BYTES=${STRIPE_BYTES:-1048576} -STRIPES_PER_OBJ=0 # 0 means stripe over all OSTs - -rm -f $config - -# create nodes -${LMC} --add node --node $HOSTNAME || exit 10 -${LMC} --add net --node $HOSTNAME --nid `hostname` --nettype $NETTYPE || exit 11 -${LMC} --add net --node client --nid '*' --nettype $NETTYPE || exit 12 - -# configure mds server -${LMC} --add mds --node $HOSTNAME --mds mds1 --fstype $FSTYPE \ - --dev $MDSDEV --size $MDSSIZE $JARG $IARG $MDSOPT || exit 20 - -# configure ost -${LMC} -m $config --add lov --lov lov1 --mds mds1 --stripe_sz $STRIPE_BYTES \ - --stripe_cnt $STRIPES_PER_OBJ --stripe_pattern 0 $LOVOPT || exit 20 -${LMC} --add ost --ost ost1 --node $HOSTNAME --lov lov1 \ - --fstype $FSTYPE --dev $OSTDEV --size $OSTSIZE $JARG $OSTOPT || exit 30 -${LMC} --add ost --ost ost2 --node $HOSTNAME --lov lov1 \ - --fstype $FSTYPE --dev ${OSTDEV}2 --size $OSTSIZE $JARG $OSTOPT || exit 30 - -# create client config -${LMC} --add mtpt --node $HOSTNAME --path $MOUNT --mds mds1 --lov lov1 \ - $CLIENTOPT || exit 40 -${LMC} --add mtpt --node client --path $MOUNT2 --mds mds1 --lov lov1 \ - $CLIENTOPT || exit 41 diff --git a/lustre/tests/acceptance-metadata-double.sh b/lustre/tests/acceptance-metadata-double.sh deleted file mode 100644 index 6027db7..0000000 --- a/lustre/tests/acceptance-metadata-double.sh +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/sh -set -e - -# -# Runs create.pl and rename.pl on two mountpoints with increasing load, varying -# debug levels. Assumes that the node is already setup with llmount2.sh -# - -SRCDIR="`dirname $0`" -CREATE=$SRCDIR/create.pl -RENAME=$SRCDIR/rename.pl - -TIME=${TIME:-/usr/bin/time} - -display_elapsed_time() { - PREVIOUS_TS=$CURRENT_TS - CURRENT_TS=`date +%s` - BLOCK_ELAPSED=`expr $CURRENT_TS - $PREVIOUS_TS` - TOTAL_ELAPSED=`expr $CURRENT_TS - $START_TS` - - echo " " - echo "Elapsed time (block): ${BLOCK_ELAPSED} seconds" - echo "Elapsed time (TOTAL): ${TOTAL_ELAPSED} seconds" - echo " " -} - -debug_client_on() -{ - lctl set_param -n debug=-1 -} - -debug_client_off() -{ - lctl set_param -n debug=0x3f0400 -} - -MNT=${MNT:-/mnt/lustre} - -# Get our initial timestamps. -START_TS=`date +%s` -CURRENT_TS=$START_TS -PREVIOUS_TS=$START_TS - -debug_client_on -echo "create.pl, 2 mounts, 1 thread, 10 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=10 -echo "create.pl, 2 mounts, 1 thread, 100 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --silent -echo "create.pl --use_mcreate=0, 2 mounts, 1 thread, 10 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=10 --use_mcreate=0 -echo "create.pl --use_mcreate=0, 2 mounts, 1 thread, 100 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --use_mcreate=0 --silent -echo "rename.pl, 2 mounts, 1 thread, 10 ops, debug on" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=10 -echo "rename.pl, 2 mounts, 1 thread, 100 ops, debug on" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=100 --silent - -display_elapsed_time - -debug_client_off -echo "create.pl, 2 mounts, 1 thread, 1000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=1000 --silent -echo "create.pl --use_mcreate=0, 2 mounts, 1 thread, 1000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=1000 --use_mcreate=0 --silent -echo "rename.pl, 2 mounts, 1 thread, 1000 ops, debug off" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=1000 --silent - -display_elapsed_time - -debug_client_on -echo "create.pl, 2 mounts, 2 threads, 100 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=2 --silent -echo "create.pl --use_mcreate=0, 2 mounts, 2 threads, 100 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=2 --use_mcreate=0 --silent -echo "rename.pl, 2 mounts, 2 thread, 1000 ops, debug on" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=1000 --num_threads=2 --silent - -display_elapsed_time - -debug_client_off -echo "create.pl, 2 mounts, 2 threads, 2000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=2 --silent -echo "create.pl --use_mcreate=0, 2 mounts, 2 threads, 2000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=2 --use_mcreate=0 --silent -echo "rename.pl, 2 mounts, 2 threads, 2000 ops, debug off" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=2 --silent - -display_elapsed_time - -debug_client_on -echo "create.pl, 2 mounts, 4 threads, 100 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=4 --silent -echo "create.pl --use_mcreate=0, 2 mounts, 4 threads, 100 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=4 --use_mcreate=0 --silent -echo "rename.pl, 2 mounts, 4 threads, 2000 ops, debug on" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --silent - -display_elapsed_time - -debug_client_off -echo "create.pl, 2 mounts, 4 threads, 2000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --silent -echo "create.pl --use_mcreate=0, 2 mounts, 4 threads, 2000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --use_mcreate=0 --silent -echo "rename.pl, 2 mounts, 4 threads, 2000 ops, debug off" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --silent - -display_elapsed_time - -debug_client_on -echo "create.pl, 2 mounts, 8 threads, 500 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=500 --num_threads=8 --silent -echo "create.pl --use_mcreate=0, 2 mounts, 8 threads, 500 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=500 --num_threads=8 --use_mcreate=0 --silent -echo "rename.pl, 2 mounts, 8 threads, 2000 ops, debug on" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --silent - -display_elapsed_time - -debug_client_off -echo "create.pl, 2 mounts, 8 threads, 2000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --silent -echo "create.pl --use_mcreate=0, 2 mounts, 8 threads, 2000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --use_mcreate=0 --silent -echo "rename.pl, 2 mounts, 8 threads, 2000 ops, debug off" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --silent - -display_elapsed_time diff --git a/lustre/tests/acceptance-metadata-parallel.sh b/lustre/tests/acceptance-metadata-parallel.sh deleted file mode 100644 index e302ecf..0000000 --- a/lustre/tests/acceptance-metadata-parallel.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh -set -e - -######################################################################### -# Runs create.pl on a single mountpoint and directory with increasing -# load across multiple clients. -######################################################################### - -LUSTRE=${LUSTRE:-`dirname $0`/..} -LTESTDIR=${LTESTDIR:-$LUSTRE/../ltest} -PATH=$LUSTRE/utils:$LUSTRE/tests:$PATH - -RLUSTRE=${RLUSTRE:-$LUSTRE} -RPWD=${RPWD:-$PWD} - -. $LUSTRE/tests/test-framework.sh - -TIME=${TIME:-/usr/bin/time} -PDSH=${PDSH:-"pdsh -S -w"} -MOUNTPT=${MOUNTPT:-"/mnt/lustre"} - -CREATE=$LUSTRE/tests/create.pl -RENAME=$LUSTRE/tests/rename.pl - -[ -z "$CLIENTS" ] && exit 1 -#CLIENTS=`comma_list $CLIENTS` - -display_elapsed_time() { - PREVIOUS_TS=$CURRENT_TS - CURRENT_TS=`date +%s` - BLOCK_ELAPSED=`expr $CURRENT_TS - $PREVIOUS_TS` - TOTAL_ELAPSED=`expr $CURRENT_TS - $START_TS` - - echo " " - echo "Elapsed time (block): ${BLOCK_ELAPSED} seconds" - echo "Elapsed time (TOTAL): ${TOTAL_ELAPSED} seconds" - echo " " -} - -set_debug_level() -{ - $PDSH $CLIENTS "echo $1 > /proc/sys/lnet/debug" -} - -debug_client_on() -{ - set_debug_level -1 -} - -debug_client_partial() -{ - set_debug_level 0x3f0400 -} - -debug_client_off() -{ - set_debug_level 0 -} - -# Get our initial timestamps. -START_TS=`date +%s` -CURRENT_TS=$START_TS -PREVIOUS_TS=$START_TS - -debug_client_off - -echo "create.pl, 1 mount, 1 thread, 1000 ops" -$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=1000 --silent" -#echo "create.pl --mcreate=0, 1 mount, 1 thread, 1000 ops, debug off" -#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=1000 --use_mcreate=0 --silent" -wait -#echo "rename.pl, 1 mount, 1 thread, 1000 ops, debug off" -#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $RENAME --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=1000 --silent" - -display_elapsed_time - -echo "create.pl, 1 mount, 2 threads, 2000 ops, debug off" -$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent" -#echo "create.pl --mcreate=0, 1 mount, 2 threads, 2000 ops, debug off" -#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=2 --use_mcreate=0 --silent" -wait -#echo "rename.pl, 1 mount, 2 threads, 2000 ops, debug off" -#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $RENAME --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent# - -display_elapsed_time - -echo "create.pl, 1 mount, 4 threads, 2000 ops, debug off" -$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent" -#echo "create.pl --mcreate=0, 1 mount, 4 threads, 2000 ops, debug off" -#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=4 --use_mcreate=0 --silent" -wait -#echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug off" -#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $RENAME --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent" - -display_elapsed_time - -echo "create.pl, 1 mount, 8 threads, 2000 ops, debug off" -$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent" -#echo "create.pl --mcreate=0, 1 mount, 8 threads, 2000 ops, debug off" -#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=8 --use_mcreate=0 --silent" -wait -#echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug off" -#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $RENAME --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent" - -display_elapsed_time diff --git a/lustre/tests/acceptance-metadata-single.sh b/lustre/tests/acceptance-metadata-single.sh deleted file mode 100644 index 685f9f4..0000000 --- a/lustre/tests/acceptance-metadata-single.sh +++ /dev/null @@ -1,153 +0,0 @@ -#!/bin/sh -set -e - -# -# Runs create.pl and rename.pl on a single mountpoint with increasing -# load, varying debug levels -# - -SRCDIR="`dirname $0`" -CREATE=$SRCDIR/create.pl -RENAME=$SRCDIR/rename.pl - -TIME=${TIME:-/usr/bin/time} - -display_elapsed_time() { - PREVIOUS_TS=$CURRENT_TS - CURRENT_TS=`date +%s` - BLOCK_ELAPSED=`expr $CURRENT_TS - $PREVIOUS_TS` - TOTAL_ELAPSED=`expr $CURRENT_TS - $START_TS` - - echo " " - echo "Elapsed time (block): ${BLOCK_ELAPSED} seconds" - echo "Elapsed time (TOTAL): ${TOTAL_ELAPSED} seconds" - echo " " -} - -debug_client_on() -{ - lctl set_param -n debug=-1 -} - -debug_client_off() -{ - lctl set_param -n debug=0x3f0400 -} - -MNT=${MNT:-/mnt/lustre} - -# Get our initial timestamps. -START_TS=`date +%s` -CURRENT_TS=$START_TS -PREVIOUS_TS=$START_TS - -debug_client_on -echo "create.pl, 1 mount, 1 thread, 10 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=10 -echo "create.pl, 1 mount, 1 thread, 100 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --silent -echo "create.pl --mcreate=0, 1 mount, 1 thread, 10 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=10 --use_mcreate=0 -echo "create.pl --mcreate=0, 1 mount, 1 thread, 100 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --use_mcreate=0 --silent -echo "rename.pl, 1 mount, 1 thread, 10 ops, debug on" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=10 -echo "rename.pl, 1 mount, 1 thread, 100 ops, debug on" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=100 --silent - -display_elapsed_time - -debug_client_off -echo "create.pl, 1 mount, 1 thread, 1000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --silent -echo "create.pl --mcreate=0, 1 mount, 1 thread, 1000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --use_mcreate=0 --silent -echo "rename.pl, 1 mount, 1 thread, 1000 ops, debug off" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --silent - -display_elapsed_time - -debug_client_on -echo "create.pl, 1 mount, 2 threads, 100 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=2 --silent -echo "create.pl --mcreate=0, 1 mount, 2 threads, 100 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=2 --use_mcreate=0 --silent -echo "rename.pl, 1 mount, 2 thread, 1000 ops, debug on" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --num_threads=2 --silent - -display_elapsed_time - -debug_client_off -echo "create.pl, 1 mount, 2 threads, 2000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent -echo "create.pl --mcreate=0, 1 mount, 2 threads, 2000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --use_mcreate=0 --silent -wait -echo "rename.pl, 1 mount, 2 threads, 2000 ops, debug off" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent - -display_elapsed_time - -debug_client_on -echo "create.pl, 1 mount, 4 threads, 100 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=4 --silent -echo "create.pl --mcreate=0, 1 mount, 4 threads, 100 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=4 --use_mcreate=0 --silent -echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug on" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent - -display_elapsed_time - -debug_client_off -echo "create.pl, 1 mount, 4 threads, 2000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent -echo "create.pl --mcreate=0, 1 mount, 4 threads, 2000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --use_mcreate=0 --silent -echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug off" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent - -display_elapsed_time - -debug_client_on -echo "create.pl, 1 mount, 8 threads, 500 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=500 --num_threads=8 --silent -echo "create.pl --mcreate=0, 1 mount, 8 threads, 500 ops, debug on" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=500 --num_threads=8 --use_mcreate=0 --silent -echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug on" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent - -display_elapsed_time - -debug_client_off -echo "create.pl, 1 mount, 8 threads, 2000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent -echo "create.pl --mcreate=0, 1 mount, 8 threads, 2000 ops, debug off" -$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --use_mcreate=0 --silent -echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug off" -$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent - -display_elapsed_time - -$TIME sh rundbench 1 - -display_elapsed_time - -$TIME sh rundbench 2 - -display_elapsed_time - -$TIME sh rundbench 4 - -display_elapsed_time - -$TIME sh rundbench 8 - -display_elapsed_time - -$TIME sh rundbench 16 - -display_elapsed_time - -$TIME sh rundbench 32 - -display_elapsed_time diff --git a/lustre/tests/busy.sh b/lustre/tests/busy.sh deleted file mode 100644 index 2f90986..0000000 --- a/lustre/tests/busy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - - mkdir /mnt/lustre/d22 - mkdir /mnt/lustre/d22/etc - ./mcreate /mnt/lustre/d22/etc/foo - ls -ld /mnt/lustre/etc - ls -ld /mnt/lustre/d22/etc diff --git a/lustre/tests/cfg/insanity-adev.sh b/lustre/tests/cfg/insanity-adev.sh deleted file mode 100644 index 756043a..0000000 --- a/lustre/tests/cfg/insanity-adev.sh +++ /dev/null @@ -1,37 +0,0 @@ -mds_HOST=${mds_HOST:-adev2} -mdsfailover_HOST=${mdsfailover_HOST:-adev2} -ost1_HOST=${ost1_HOST:-adev3} -ost2_HOST=${ost2_HOST:-adev4} -EXTRA_OSTS=${EXTRA_OSTS:-adev7} -client_HOST=client -LIVE_CLIENT=${LIVE_CLIENT:-adev8} -# This should always be a list, not a regexp -#FAIL_CLIENTS=${FAIL_CLIENTS:-mdev7} -FAIL_CLIENTS=${FAIL_CLIENTS:-"adev9 adev10 adev11 adev12"} -EXTRA_CLIENTS=${EXTRA_CLIENTS:-"adev[13-15]"} - -NETTYPE=${NETTYPE:-tcp} - -TIMEOUT=${TIMEOUT:-30} -PTLDEBUG=${PTLDEBUG:-0} -SUBSYSTEM=${SUBSYSTEM:-0} -MOUNT=${MOUNT:-"/mnt/lustre"} -#UPCALL=${CLIENT_UPCALL:-`pwd`/replay-single-upcall.sh} - -MDSDEV=${MDSDEV:-/dev/sdc} -MDSSIZE=${MDSSIZE:-50000} -MDSJOURNALSIZE=${MDSJOURNALSIZE:-0} - -OSTDEV=${OSTDEV:-$TMP/ost%d-`hostname`} -OSTSIZE=${OSTSIZE:=50000} -OSTJOURNALSIZE=${OSTJOURNALSIZE:-0} - -FSTYPE=${FSTYPE:-ext3} -STRIPE_BYTES=${STRIPE_BYTES:-1048576} -STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0} - -FAILURE_MODE=${FAILURE_MODE:-HARD} # or HARD -POWER_DOWN=${POWER_DOWN:-"powerman --off"} -POWER_UP=${POWER_UP:-"powerman --on"} - -PDSH="pdsh -S -w " diff --git a/lustre/tests/cfg/insanity-mdev.sh b/lustre/tests/cfg/insanity-mdev.sh deleted file mode 100644 index 59ceeb3..0000000 --- a/lustre/tests/cfg/insanity-mdev.sh +++ /dev/null @@ -1,37 +0,0 @@ -mds_HOST=${mds_HOST:-mdev4} -mdsfailover_HOST=${mdsfailover_HOST:-mdev5} -ost1_HOST=${ost1_HOST:-mdev2} -ost2_HOST=${ost2_HOST:-mdev3} -EXTRA_OSTS=${EXTRA_OSTS:-mdev7} -client_HOST=client -LIVE_CLIENT=${LIVE_CLIENT:-mdev6} -# This should always be a list, not a regexp -FAIL_CLIENTS=${FAIL_CLIENTS:-mdev8} -#FAIL_CLIENTS=${FAIL_CLIENTS:-""} -SINGLEMDS=${SINGLEMDS:-"mds"} - -NETTYPE=${NETTYPE:-tcp} - -TIMEOUT=${TIMEOUT:-30} -PTLDEBUG=${PTLDEBUG:-0x3f0400} -SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff} -MOUNT=${MOUNT:-"/mnt/lustre"} -#UPCALL=${CLIENT_UPCALL:-`pwd`/replay-single-upcall.sh} - -MDSDEV=${MDSDEV:-/dev/sda1} -MDSSIZE=${MDSSIZE:-50000} -MDSJOURNALSIZE=${MDSJOURNALSIZE:-0} - -OSTDEV=${OSTDEV:-$TMP/ost%d-`hostname`} -OSTSIZE=${OSTSIZE:=500000} -OSTJOURNALSIZE=${OSTJOURNALSIZE:-0} - -FSTYPE=${FSTYPE:-ext3} -STRIPE_BYTES=${STRIPE_BYTES:-1048576} -STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0} - -FAILURE_MODE=${FAILURE_MODE:-HARD} # or HARD -POWER_DOWN=${POWER_DOWN:-"powerman --off"} -POWER_UP=${POWER_UP:-"powerman --on"} - -PDSH="pdsh -S -w " diff --git a/lustre/tests/cfg/mdev.sh b/lustre/tests/cfg/mdev.sh deleted file mode 100644 index 251e4ff..0000000 --- a/lustre/tests/cfg/mdev.sh +++ /dev/null @@ -1,32 +0,0 @@ - -mds_HOST=${mds_HOST:-mdev4} -mdsfailover_HOST=${mdsfailover_HOST:-mdev5} -ost_HOST=${ost_HOST:-mdev2} -ost2_HOST=${ost2_HOST:-mdev3} -client_HOST=${client_HOST:-client} -NETTYPE=${NETTYPE:-tcp} -SINGLEMDS=${SINGLEMDS:-"mds"} - -MOUNT=${MOUNT:-"/mnt/lustre"} -MOUNT1=${MOUNT1:-$MOUNT} -MOUNT2=${MOUNT2:-"/mnt/lustre2"} -DIR=${DIR:-$MOUNT} -DIR2=${DIR2:-$MOUNT1} -PTLDEBUG=${PTLDEBUG:-0x3f0400} -SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff} -PDSH=${PDSH:-pdsh -S -w} - -MDSDEV=${MDSDEV:-/dev/sda1} -MDSSIZE=${MDSSIZE:-100000} -OSTDEV=${OSTDEV:-/tmp/ost1-`hostname`} -OSTSIZE=${OSTSIZE:-200000} -FSTYPE=${FSTYPE:-ext3} -TIMEOUT=${TIMEOUT:-10} -#UPCALL=${UPCALL:-$PWD/replay-single-upcall.sh} - -STRIPE_BYTES=${STRIPE_BYTES:-1048576} -STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0} - -FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD -POWER_DOWN=${POWER_DOWN:-"powerman --off"} -POWER_UP=${POWER_UP:-"powerman --on"} diff --git a/lustre/tests/cmknod.c b/lustre/tests/cmknod.c deleted file mode 100644 index 49e7ecc..0000000 --- a/lustre/tests/cmknod.c +++ /dev/null @@ -1,167 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * 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 version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * lustre/tests/cmknod.c - * - * Simple test to check that device nodes are correctly created and visible - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#define TEST_MINOR 120 -#define TEST_MAJOR 25 - -void usage(char *prog) -{ - fprintf(stderr, "usage: %s \n", prog); - exit(1); -} - -/* UMKA: This stuff inlined here instead of using appropriate header - to avoid linking to symbols which is not present in newer libc. - - Currently this is the case, as UML image contains RedHat 9 and - developers use something newer (Fedora, etc.). */ -inline unsigned int -__gnu_dev_major (unsigned long long int __dev) -{ - return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); -} - -inline unsigned int -__gnu_dev_minor (unsigned long long int __dev) -{ - return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); -} - -inline unsigned long long int -__gnu_dev_makedev (unsigned int __major, unsigned int __minor) -{ - return ((__minor & 0xff) | ((__major & 0xfff) << 8) - | (((unsigned long long int) (__minor & ~0xff)) << 12) - | (((unsigned long long int) (__major & ~0xfff)) << 32)); -} - -#define __minor(dev) __gnu_dev_minor(dev) -#define __major(dev) __gnu_dev_major(dev) -#define __makedev(maj, min) __gnu_dev_makedev(maj, min) - -int main( int argc, char **argv) -{ - char *prog = argv[0]; - char *filename = argv[1]; - int rc; - struct stat st; - dev_t device = __makedev(TEST_MAJOR, TEST_MINOR); - - if (argc != 2) - usage(prog); - - unlink(filename); - - /* First try block devices */ - rc = mknod(filename, 0700 | S_IFBLK, device); - if ( rc < 0 ) { - fprintf(stderr, "%s: mknod(%s) failed: rc %d: %s\n", - prog, filename, errno, strerror(errno)); - return 2; - } - - rc = stat(filename, &st); - if ( rc < 0 ) { - fprintf(stderr, "%s: stat(%s) failed: rc %d: %s\n", - prog, filename, errno, strerror(errno)); - return 3; - } - - if ( st.st_rdev != device) { - fprintf(stderr, "%s: created device other than requested: (%u,%u) instead of (%u,%u)\n", - prog, __major(st.st_rdev),__minor(st.st_rdev),__major(device),__minor(device)); - return 4; - } - if (!S_ISBLK(st.st_mode)) { - fprintf(stderr, "%s: created device of different type. Requested block device, got mode %o\n", prog, st.st_mode); - return 5; - } - - rc = unlink(filename); - if ( rc < 0 ) { - fprintf(stderr, "%s: Cannot unlink created device %s, rc %d: %s\n", - prog, filename, errno, strerror(errno)); - return 6; - } - - /* Second try char devices */ - rc = mknod(filename, 0700 | S_IFCHR, device); - if ( rc < 0 ) { - fprintf(stderr, "%s: mknod(%s) failed: rc %d: %s\n", - prog, filename, errno, strerror(errno)); - return 7; - } - - rc = stat(filename, &st); - if ( rc < 0 ) { - fprintf(stderr, "%s: stat(%s) failed: rc %d: %s\n", - prog, filename, errno, strerror(errno)); - return 8; - } - if ( st.st_rdev != device) { - fprintf(stderr, "%s: created device other than requested: (%u,%u) instead of (%u,%u)\n", - prog, __major(st.st_rdev),__minor(st.st_rdev),__major(device),__minor(device)); - return 9; - } - if (!S_ISCHR(st.st_mode)) { - fprintf(stderr, "%s: created device of different type. Requested char device, got mode %o\n", prog, st.st_mode); - return 10; - } - - rc = unlink(filename); - if ( rc < 0 ) { - fprintf(stderr, "%s: Cannot unlink created device %s, rc %d: %s\n", - prog, filename, errno, strerror(errno)); - return 11; - } - - printf("%s: device nodes created correctly\n", prog); - - return 0; -} diff --git a/lustre/tests/cobd.sh b/lustre/tests/cobd.sh deleted file mode 100755 index 3b7e8ac..0000000 --- a/lustre/tests/cobd.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - - -config=${1:-$(basename $0 .sh)}.xml - -LMC=${LMC:-../utils/lmc -m $config} -TMP=${TMP:-/tmp} - -HOSTNAME=`hostname` - -MDSDEV=${MDSDEV:-$TMP/mds1-`hostname`} -MDSSIZE=50000 -FSTYPE=${FSTYPE:-ext3} - -OSTDEV=${OSTDEV:-$TMP/ost1-`hostname`} -OSTSIZE=200000 - -rm -f $config -# create nodes -${LMC} --add node --node $HOSTNAME || exit 10 -${LMC} --add net --node $HOSTNAME --nid $HOSTNAME --nettype tcp || exit 11 - -# configure mds server -${LMC} --add mds --node $HOSTNAME --mds mds1 --fstype $FSTYPE --dev $MDSDEV --size $MDSSIZE || exit 20 - -# configure ost -${LMC} --add ost --node $HOSTNAME --obd obd1 --fstype $FSTYPE --obdtype obdecho || exit 30 -# configure ost -${LMC} --add ost --node $HOSTNAME --obd obd2 --fstype $FSTYPE --obdtype obdecho || exit 30 - -${LMC} --add cobd --node $HOSTNAME --real_obd obd1 --cache_obd obd2 - -# create client config -# ${LMC} -m $config --add mtpt --node $HOSTNAME --path /mnt/lustre --mds mds1 --obd obd1 || exit 40 diff --git a/lustre/tests/crash-mod.sh b/lustre/tests/crash-mod.sh deleted file mode 100644 index d5ce473..0000000 --- a/lustre/tests/crash-mod.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -TMP=${TMP:-/tmp} -BASEDIR=${1:-`dirname $0`/..} -LCMD=$TMP/crash-mod-`hostname` -echo "Storing crash module info in $LCMD" -cat /tmp/ogdb-`hostname` | while read JUNK M JUNK; do - MOD="$BASEDIR/$M" - MODNAME=`basename $MOD .o` - - echo mod -s $MODNAME $MOD | tee -a $LCMD -done diff --git a/lustre/tests/createdestroy.c b/lustre/tests/createdestroy.c deleted file mode 100644 index bc145e4..0000000 --- a/lustre/tests/createdestroy.c +++ /dev/null @@ -1,258 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * 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 version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -int thread; - -#define BAD_VERBOSE (-999999999) - -#define difftime(a, b) \ - ((double)(a)->tv_sec - (b)->tv_sec + \ - ((double)((a)->tv_usec - (b)->tv_usec) / 1000000)) - -static char *cmdname(char *func) -{ - static char buf[512]; - - if (thread) { - sprintf(buf, "%s-%d", func, thread); - return buf; - } - - return func; -} - -static int be_verbose(int verbose, struct timeval *next_time, - unsigned long num, unsigned long *next_num, int num_total) -{ - struct timeval now; - - if (!verbose) - return 0; - - if (next_time != NULL) - gettimeofday(&now, NULL); - - /* A positive verbosity means to print every X iterations */ - if (verbose > 0 && (num >= *next_num || num >= num_total)) { - *next_num += verbose; - if (next_time) { - next_time->tv_sec = now.tv_sec - verbose; - next_time->tv_usec = now.tv_usec; - } - return 1; - } - - /* A negative verbosity means to print at most each X seconds */ - if (verbose < 0 && next_time != NULL && difftime(&now, next_time) >= 0){ - next_time->tv_sec = now.tv_sec - verbose; - next_time->tv_usec = now.tv_usec; - *next_num = num; - return 1; - } - - return 0; -} - -static int get_verbose(char *func, const char *arg) -{ - int verbose; - char *end; - - if (!arg || arg[0] == 'v') - verbose = 1; - else if (arg[0] == 's' || arg[0] == 'q') - verbose = 0; - else { - verbose = (int)strtoul(arg, &end, 0); - if (*end) { - fprintf(stderr, "%s: error: bad verbose option '%s'\n", - func, arg); - return BAD_VERBOSE; - } - } - - if (verbose < 0) - printf("Print status every %d seconds\n", -verbose); - else if (verbose == 1) - printf("Print status every operation\n"); - else if (verbose > 1) - printf("Print status every %d operations\n", verbose); - - return verbose; -} - -int main(int argc, char *argv[]) -{ - char filename[1024]; - int verbose = 0; - unsigned long count, i; - int threads = 0; - char *end; - int rc = 0; - - if (argc < 3 || argc > 5) { - fprintf(stderr, - "usage: %s [verbose [threads]]\n", - argv[0]); - exit(1); - } - - count = strtoul(argv[2], &end, 0); - if (*end) { - fprintf(stderr, "%s: error: bad iteration count '%s'\n", - argv[0], argv[1]); - exit(2); - } - if (argc == 4) { - verbose = get_verbose(argv[0], argv[3]); - if (verbose == BAD_VERBOSE) - exit(2); - } - if (argc == 5) { - threads = strtoul(argv[4], &end, 0); - if (*end) { - fprintf(stderr, "%s: error: bad thread count '%s'\n", - argv[0], argv[1]); - exit(2); - } - } - - for (i = 1; i <= threads; i++) { - rc = fork(); - if (rc < 0) { - fprintf(stderr, "%s: error: #%ld - %s\n", - cmdname(argv[0]), i, strerror(rc = errno)); - break; - } else if (rc == 0) { - thread = i; - break; - } else - printf("%s: thread #%ld (PID %d) started\n", - cmdname(argv[0]), i, rc); - rc = 0; - } - - if (threads && thread == 0) { /* parent process */ - int live_threads = threads; - - while (live_threads > 0) { - int status; - pid_t ret; - - ret = waitpid(0, &status, 0); - if (ret == 0) { - continue; - } - - if (ret < 0) { - fprintf(stderr, "%s: error: wait - %s\n", - argv[0], strerror(errno)); - if (!rc) - rc = errno; - } else { - /* - * This is a hack. We _should_ be able to use - * WIFEXITED(status) to see if there was an - * error, but it appears to be broken and it - * always returns 1 (OK). See wait(2). - */ - int err = WEXITSTATUS(status); - if (err || WIFSIGNALED(status)) - fprintf(stderr, - "%s: error: PID %d had rc=%d\n", - argv[0], ret, err); - if (!rc) - rc = err; - - live_threads--; - } - } - } else { - struct timeval start, end, next_time; - unsigned long next_count; - double diff; - - gettimeofday(&start, NULL); - next_time.tv_sec = start.tv_sec - verbose; - next_time.tv_usec = start.tv_usec; - - for (i = 0, next_count = verbose; i < count; i++) { - if (threads) - sprintf(filename, "%s-%d-%ld", - argv[1], thread, i); - else - sprintf(filename, "%s-%ld", argv[1], i); - - rc = mknod(filename, S_IFREG, 0); - if (rc < 0) { - fprintf(stderr, "%s: error: mknod(%s): %s\n", - cmdname(argv[0]), filename, - strerror(errno)); - rc = errno; - break; - } - if (unlink(filename) < 0) { - fprintf(stderr, "%s: error: unlink(%s): %s\n", - cmdname(argv[0]), filename, - strerror(errno)); - rc = errno; - break; - } - if (be_verbose(verbose, &next_time,i,&next_count,count)) - printf("%s: number %ld\n", cmdname(argv[0]), i); - } - - gettimeofday(&end, NULL); - diff = difftime(&end, &start); - - printf("%s: %ldx2 files in %.4gs (%.4g ops/s): rc = %d: %s", - cmdname(argv[0]), i, diff, (double)i * 2 / diff, - rc, ctime(&end.tv_sec)); - } - return rc; -} diff --git a/lustre/tests/disk1_4.zip b/lustre/tests/disk1_4.zip deleted file mode 100644 index c5773e703135e94827f06922b91c478531328206..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 170785 zcmeF430PA}zUXnBmhN%k_PC3fwrxd4KxLCP-P+1d+69m;(WV6>LIi?=K!}d5jtd|n zgf+ARiL6ms!j{CP1tmZ<0fKB%F~kFe2nmF&=bhNy^XARHbLV~cz4yI4_nz~8aOzb3 zt4`Ig_B#JReCNIJ_bZHyj6OBmf$p|lF|hIHvu~ltua_<~Hd<+fk3M4^{X@L}k zFTeZ4!M#h@?EmB5Z|;2d)w#sI`>#2S{P`q*-O81g+gI+`us~LOG}`;+_MCx3zfU`7 zd}mm%cdp%e{@Zllq0KHliM*?`RW>=>b- zv~LKn827~TY#pW9w9;~{tf!b(M&c{#WVxDDCUMh_Mh)A)s_jcRMKE*~l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l00bZa0SG_<0uX=z1Rwwb2tWV=5P$## zAOHafytM+q39wWKz83`n2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz00bZa0SG_< z0uXq&1h7=byEUGO1_BU(00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_ zur6wwchR69X9P6)9a@wdZ|ykb(@!rqhGfKVKAyZq)oQ`4QR{}pER&8_9eJ_w$1snr z_8pI-vNcw{wZDXbjza(f5P-m6P=Kwqw@q*_7Im%Ek#NKI$i-b=ipC5>Kc)Vw-D#pL z(yLqNZ#Y+~ll=6-hRfyK=R|DE5=SPlSFhM-Rc3v1cA)W^2)m6hjU&=-`przRuAQ{4 z`}|koHL@0+{TXL9tWRdv@Ms?zdNz8!otfqtj}eV%gzY6(H&w?=n;S%)TpU#}-{l9bNZzRJCA5es!jM>F}ti zK^lcGKaNZc&-|Cm%AmCR&rG5f4T<>$)_FH{Ry*w9#x-7v$*rGZ5nDLlXWr=84U*9I zUw3pFOgmgswR??@?3MAMmK#r>hL#VwvGvkpr~F~DTjb4>PyT|Vk1jy~0uX=z1Rwwb z2tWV=5P$##AOHafKmY;|fB*y_0D-@tz%@;*vw-i^KmY;|fB*y_009U<00Izz00bZa z0SG_<0uX=z1Rwwb2tWV=5P$##-Yo&Fv+!<>C!&D>1Rwwb2tWV=5P$##AOHafKmY;| zfB*y_009U<00Izz00bZa0SK&98~#53g9QO{!Pqar0Rad=00Izz00bZa0SG_<0uX=z z1Rwwb2tWV=5P$##AOHafKmY;|fWTWXuy5X+4|^6bkO^Jif9s<`01$ux1Rwwb2tWV= z5P$##AOHafKmY;|fB*y_009U<00Izz00bZa0SKIIe-gm|Fu;O4tVA(nWY5e diff --git a/lustre/tests/disk1_8.tgz b/lustre/tests/disk1_8.tar.bz2 similarity index 100% rename from lustre/tests/disk1_8.tgz rename to lustre/tests/disk1_8.tar.bz2 diff --git a/lustre/tests/fchdir_test.c b/lustre/tests/fchdir_test.c deleted file mode 100644 index b300396..0000000 --- a/lustre/tests/fchdir_test.c +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * 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 version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - - -int main(int argc, char **argv) -{ - int fd; - int rc; - - fd = open(".", O_RDONLY); - if (fd < 0) { - perror("opening '.' :"); - exit(2); - } - - rc = chdir("/mnt/lustre/subdir/subdir"); - if (rc) { - perror("cannot chdir subdir:"); - exit(3); - } - - rc = fchdir(fd); - if (rc) { - perror("cannot fchdir back\n"); - exit(4); - } - - rc = close(fd); - if (rc) { - perror("cannot close '.'\n"); - exit(5); - } - - return(0); -} diff --git a/lustre/tests/gensymmap.c b/lustre/tests/gensymmap.c deleted file mode 100644 index 436cf41..0000000 --- a/lustre/tests/gensymmap.c +++ /dev/null @@ -1,132 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * 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 version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -#include -#include -#include -#include - -struct file_addr { - char path[256]; - char modname[32]; - unsigned long base; -}; - -int print_symbol_address(struct file_addr * fa) -{ - char buffer[4096]; - char cmd[256]; - char func_name[256]; - unsigned long addr; - char mode[256]; - FILE *file; - - sprintf(cmd, "modprobe -l %s", fa->modname); - file = popen(cmd, "r"); - if (!file) { - printf("failed to execute %s:%s\n." - "Have you installed modules?\n", - cmd, strerror(errno)); - pclose(file); - return -1; - } - if (fgets(buffer, 4095, file) == NULL) { - printf("failed to get modprobe ouput for %s:%s\n", - fa->modname, strerror(errno)); - pclose(file); - return -1; - } - pclose(file); - - sprintf(cmd, "nm -n %s", buffer); - file = popen(cmd, "r"); - if (!file) { - printf("failed to execute %s:%s\n." - "Have you installed modules?\n", - cmd, strerror(errno)); - return -1; - } - - while (fgets(buffer, 4095, file)) { - if (fscanf(file, "%x %s %s\n", &addr, mode, func_name) != 3) - continue; - - /* only list symbol in text section. */ - if (strcasecmp(mode, "t") == 0) { - /* skip __init functoin. How to filter others? */ - if (strcmp(func_name, "init_module") != 0) - printf("%x %s %s\n", fa->base + addr, - mode, func_name); - } - } - pclose(file); - return 0; -} - - -int generate_symbol_file() -{ - static char* cmd = "lctl modules"; - char other[4096]; - FILE *file; - struct file_addr gfa; - - memset(&gfa, 0, sizeof(gfa)); - file = popen(cmd, "r"); - if (!file) { - printf("failed to execute %s: %s\n", cmd, strerror(errno)); - return -1; - } - - while ( fscanf(file, "%s %s %lx\n", other, gfa.path, &gfa.base) == 3) { - strncpy(gfa.modname, strrchr(gfa.path, '/') + 1, - strrchr(gfa.path, '.') - strrchr(gfa.path, '/') - 1); - - //fprintf(stderr, "%s %s %#x\n", gfa.path, gfa.modname, gfa.base); - - /* continue going without checking result */ - print_symbol_address(&gfa); - memset(&gfa, 0, sizeof(gfa)); - } - pclose(file); - return 0; -} - - -int main() -{ - return generate_symbol_file(); -} diff --git a/lustre/tests/getdents.c b/lustre/tests/getdents.c deleted file mode 100644 index 7237160..0000000 --- a/lustre/tests/getdents.c +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * 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 version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - DIR *dir; - struct dirent64 *entry; - - if (argc < 2) { - fprintf(stderr, "Usage: %s dirname\n", argv[0]); - return 1; - } - - dir = opendir(argv[1]); - if (!dir) { - int rc = errno; - perror("opendir"); - return rc; - } - - while ((entry = readdir64(dir))) { - puts(entry->d_name); - } - - closedir(dir); - - return 0; -} - diff --git a/lustre/tests/ldaptest.c b/lustre/tests/ldaptest.c deleted file mode 100644 index 899377a..0000000 --- a/lustre/tests/ldaptest.c +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * 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 version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - LDAP *ld; - int err; - - ld = ldap_init("localhost", 389); - if (!ld) { - fprintf(stderr, "ldap_init: %s\n", strerror(errno)); - exit(1); - } - - err = ldap_bind_s(ld, "cn=Manager,dc=lustre,dc=cfs", "secret", - LDAP_AUTH_SIMPLE); - if (err) { - fprintf(stderr, "ldap_bind: %s\n", ldap_err2string(err)); - exit(1); - } - - - - -} diff --git a/lustre/tests/liblustre_sanity_uml.sh b/lustre/tests/liblustre_sanity_uml.sh deleted file mode 100644 index ee035d0..0000000 --- a/lustre/tests/liblustre_sanity_uml.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash - -# liblustre sanity test. specially written for UML for now - -LCONF=${LCONF:-../utils/lconf} - -LLIP=127.0.0.1 - -LTREE_KERNEL=${LTREE_KERNEL:-../../lustre} -LTREE_USER=${LTREE_USER:-../../lustre-lib} -HOSTNAME=`hostname` - -# checking -if [ ! -e $LTREE_KERNEL ]; then - echo "$LTREE_KERNEL dosen't exits" - exit 1 -fi - -if [ ! -e $LTREE_USER ]; then - echo "$LTREE_USER dosen't exits" - exit 1 -fi - -if [ ! -e $LTREE_USER/liblustre/lltest ]; then - echo "$LTREE_USER/liblustre/lltest dosen't exits" - exit 1 -fi - -workdir=`pwd` - -cleanup() -{ - curdir=`pwd` - cd $LTREE_KERNEL/tests - $LCONF --node $HOSTNAME --cleanup --force $LTREE_USER/tests/$configfile 2>&1 > /dev/null - cd $curdir -} - -configfile=liblustre_sanity_uml.xml - -# generate config file -rm -f $configfile -MDSNODE=$HOSTNAME OSTNODES=$HOSTNAME CLIENTS=$LLIP sh uml.sh $configfile -if [ ! -e $configfile ]; then - echo "fail to generate config file $configfile" - exit 1 -fi - -# generate dump file -rm -f /tmp/DUMP_FILE -$LCONF --lctl_dump /tmp/DUMP_FILE --node $LLIP $configfile -if [ ! -e /tmp/DUMP_FILE ]; then - echo "error creating dumpfile" - exit 1 -fi - -#setup lustre server -cd $LTREE_KERNEL/tests -$LCONF --node $HOSTNAME --reformat $LTREE_USER/tests/$configfile -rc=$? -if [ $rc -ne 0 ]; then - echo "setup lustre server: error $rc" - cleanup - exit 1 -fi -cd $workdir - -#do liblustre testing -$LTREE_USER/liblustre/lltest -rc=$? -if [ $rc -ne 0 ]; then - echo "liblustre test error $rc" - cleanup - exit 1 -fi - -echo "===== liblustre sanity test complete sucessfully =====" - -echo -n "===== cleanup... "; cleanup; echo "done =====" - -cd $workdir - -exit 0 diff --git a/lustre/tests/llecho.sh b/lustre/tests/llecho.sh deleted file mode 100644 index a345f4f..0000000 --- a/lustre/tests/llecho.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -PATH=`dirname $0`/../utils:$PATH - -LCONF=${LCONF:-lconf} -NAME=${NAME:-echo} - -config=$NAME.xml -mkconfig=$NAME.sh - -if [ "$LUSTRE" ]; then - lustre_opt="--lustre=$LUSTRE" -fi - -[ -f $config ] || sh -x $mkconfig $config || exit 1 - -$LCONF $lustre_opt --reformat $@ $OPTS $config || exit 4 - -cat < -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - int fd, rc; - - if (argc != 2) { - printf("Usage: %s \n", argv[0]); - exit(1); - } - - fd = open(argv[1], O_RDONLY | O_CREAT, 0600); - if (fd == -1) { - printf("Error opening %s for create: %s\n", argv[1], - strerror(errno)); - exit(1); - } - rc = close(fd); - if (rc < 0) { - printf("Error closing %s: %s\n", argv[1], strerror(errno)); - exit(1); - } - - fd = open(argv[1], O_DIRECTORY); - if (fd >= 0) { - printf("opening %s as directory should have returned an " - "error!\n", argv[1]); - exit(1); - } - if (errno != ENOTDIR) { - printf("opening %s as directory, expected -ENOTDIR and got " - "%s\n", argv[1], strerror(errno)); - exit(1); - } - - return 0; -} diff --git a/lustre/tests/openclose.c b/lustre/tests/openclose.c deleted file mode 100644 index aa54406..0000000 --- a/lustre/tests/openclose.c +++ /dev/null @@ -1,178 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * 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 version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -/* for O_DIRECT */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#ifndef O_DIRECT -#define O_DIRECT 0 -#endif - -int main(int argc, char *argv[]) -{ - char filename[1024]; - unsigned long count, i; - int thread = 0; - int threads = 0; - int rc = 0; - int fd, ioctl_flags = 0; - - if (argc < 3 || argc > 4) { - fprintf(stderr, "usage: %s [threads]\n", - argv[0]); - exit(1); - } - - count = strtoul(argv[2], NULL, 0); - if (argc == 4) - threads = strtoul(argv[3], NULL, 0); - - for (i = 1; i <= threads; i++) { - rc = fork(); - if (rc < 0) { - fprintf(stderr, "error: %s: #%ld - %s\n", argv[0], i, - strerror(rc = errno)); - break; - } else if (rc == 0) { - thread = i; - argv[2] = "--device"; - break; - } else - printf("%s: thread #%ld (PID %d) started\n", - argv[0], i, rc); - rc = 0; - } - - if (threads && thread == 0) { /* parent process */ - int live_threads = threads; - - while (live_threads > 0) { - int status; - pid_t ret; - - ret = waitpid(0, &status, 0); - if (ret == 0) - continue; - - if (ret < 0) { - if (!rc) - rc = errno; - fprintf(stderr, "error: %s: wait - %s\n", - argv[0], strerror(rc)); - } else { - /* - * This is a hack. We _should_ be able to use - * WIFEXITED(status) to see if there was an - * error, but it appears to be broken and it - * always returns 1 (OK). See wait(2). - */ - int err = WEXITSTATUS(status); - if (err || WIFSIGNALED(status)) - fprintf(stderr, - "%s: PID %d had rc=%d\n", - argv[0], ret, err); - if (!rc) - rc = err; - } - live_threads--; - } - } else { - if (threads) - sprintf(filename, "%s-%d", argv[1], thread); - else - strcpy(filename, argv[1]); - - fd = open(filename, O_RDWR|O_CREAT, 0644); - if (fd < 0) { - rc = errno; - fprintf(stderr, "open(%s, O_CREAT): %s\n", filename, - strerror(rc)); - exit(rc); - } - if (close(fd) < 0) { - rc = errno; - fprintf(stderr, "close(): %s\n", strerror(rc)); - goto unlink; - } - - for (i = 0; i < count; i++) { - fd = open(filename, O_RDWR|O_LARGEFILE|O_DIRECT); - if (fd < 0) { - rc = errno; - fprintf(stderr, "open(%s, O_RDWR): %s\n", - filename, strerror(rc)); - break; - } - if (ioctl(fd, LL_IOC_SETFLAGS, &ioctl_flags) < 0 && - errno != ENOTTY) { - rc = errno; - fprintf(stderr, "ioctl(): %s\n", strerror(rc)); - break; - } - if (close(fd) < 0) { - rc = errno; - fprintf(stderr, "close(): %s\n", strerror(rc)); - break; - } - } - unlink: - if (unlink(filename) < 0) { - rc = errno; - fprintf(stderr, "unlink(%s): %s\n", filename, - strerror(rc)); - } - if (threads) - printf("Thread %d done: rc = %d\n", thread, rc); - else - printf("Done: rc = %d\n", rc); - } - return rc; -} diff --git a/lustre/tests/openme.c b/lustre/tests/openme.c deleted file mode 100644 index d3f7b24..0000000 --- a/lustre/tests/openme.c +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * 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 version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - int fd; - - if (argc != 2) { - printf("Usage openme \n"); - exit(1); - } - - fd = open(argv[1], O_RDONLY | O_CREAT, 0600); - if (fd == -1) { - printf("Error opening %s\n", argv[1]); - exit(1); - } - - sleep(10000000); - return 0; -} diff --git a/lustre/tests/sanity-lmv.sh b/lustre/tests/sanity-lmv.sh deleted file mode 100644 index faa4b92..0000000 --- a/lustre/tests/sanity-lmv.sh +++ /dev/null @@ -1,451 +0,0 @@ -#!/bin/bash -# -# Run select tests by setting ONLY, or as arguments to the script. -# Skip specific tests by setting EXCEPT. -# -# e.g. ONLY="22 23" or ONLY="`seq 32 39`" or EXCEPT="31" -set -e - -ONLY=${ONLY:-"$*"} -# bug number for skipped test: 2108 -ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-""} -# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! -#case `uname -r` in -#2.6.*) ALWAYS_EXCEPT="$ALWAYS_EXCEPT 54c 55" # bug 3117 -#esac - -[ "$ALWAYS_EXCEPT$EXCEPT" ] && echo "Skipping tests: $ALWAYS_EXCEPT $EXCEPT" - -SRCDIR=`dirname $0` -export PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH -export SECURITY=${SECURITY:-"null"} - -TMP=${TMP:-/tmp} -FSTYPE=${FSTYPE:-ldiskfs} - -CHECKSTAT=${CHECKSTAT:-"checkstat -v"} -CREATETEST=${CREATETEST:-createtest} -LFS=${LFS:-lfs} -LSTRIPE=${LSTRIPE:-"$LFS setstripe"} -LFIND=${LFIND:-"$LFS find"} -LVERIFY=${LVERIFY:-ll_dirstripe_verify} -LCTL=${LCTL:-lctl} -MCREATE=${MCREATE:-mcreate} -OPENFILE=${OPENFILE:-openfile} -OPENUNLINK=${OPENUNLINK:-openunlink} -TOEXCL=${TOEXCL:-toexcl} -TRUNCATE=${TRUNCATE:-truncate} -MUNLINK=${MUNLINK:-munlink} -SOCKETSERVER=${SOCKETSERVER:-socketserver} -SOCKETCLIENT=${SOCKETCLIENT:-socketclient} -IOPENTEST1=${IOPENTEST1:-iopentest1} -IOPENTEST2=${IOPENTEST2:-iopentest2} -PTLDEBUG=${PTLDEBUG:-0} - -export NAME=${NAME:-lmv} - -SAVE_PWD=$PWD - -LUSTRE=${LUSTRE:-`dirname $0`/..} -. $LUSTRE/tests/test-framework.sh -init_test_env $@ -. ${CONFIG:=$LUSTRE/tests/cfg/lmv.sh} - -cleanup() { - echo -n "cln.." - cleanupall ${FORCE} $* || { echo "FAILed to clean up"; exit 20; } -} -CLEANUP=${CLEANUP:-:} - -setup() { - echo -n "mnt.." - load_modules - setupall || exit 10 - echo "done" -} - -SETUP=${SETUP:-:} - -log() { - echo "$*" - $LCTL mark "$*" 2> /dev/null || true -} - -trace() { - log "STARTING: $*" - strace -o $TMP/$1.strace -ttt $* - RC=$? - log "FINISHED: $*: rc $RC" - return 1 -} -TRACE=${TRACE:-""} - -check_kernel_version() { - VERSION_FILE=version - WANT_VER=$1 - [ ! -f $VERSION_FILE ] && echo "can't find kernel version" && return 1 - GOT_VER=$(lctl get_param $VERSION_FILE | awk '/kernel:/ {print $2}') - [ $GOT_VER -ge $WANT_VER ] && return 0 - log "test needs at least kernel version $WANT_VER, running $GOT_VER" - return 1 -} - -_basetest() { - echo $* -} - -basetest() { - IFS=abcdefghijklmnopqrstuvwxyz _basetest $1 -} - -run_one() { - if ! grep -q $DIR /proc/mounts; then - $SETUP - fi - testnum=$1 - message=$2 - BEFORE=`date +%s` - log "== test $testnum: $message= `date +%H:%M:%S` ($BEFORE)" - export TESTNAME=test_$testnum - export tfile=f${testnum} - export tdir=d${base} - test_${testnum} || error "exit with rc=$?" - unset TESTNAME - pass "($((`date +%s` - $BEFORE))s)" - cd $SAVE_PWD - $CLEANUP -} - -build_test_filter() { - [ "$ALWAYS_EXCEPT$EXCEPT$SANITY_EXCEPT" ] && \ - echo "Skipping tests: `echo $ALWAYS_EXCEPT $EXCEPT $SANITY_EXCEPT`" - - for O in $ONLY; do - eval ONLY_${O}=true - done - for E in $EXCEPT $ALWAYS_EXCEPT $SANITY_EXCEPT; do - eval EXCEPT_${E}=true - done -} - -_basetest() { - echo $* -} - -basetest() { - IFS=abcdefghijklmnopqrstuvwxyz _basetest $1 -} - -run_test() { - export base=`basetest $1` - if [ "$ONLY" ]; then - testname=ONLY_$1 - if [ ${!testname}x != x ]; then - run_one $1 "$2" - return $? - fi - testname=ONLY_$base - if [ ${!testname}x != x ]; then - run_one $1 "$2" - return $? - fi - echo -n "." - return 0 - fi - testname=EXCEPT_$1 - if [ ${!testname}x != x ]; then - echo "skipping excluded test $1" - return 0 - fi - testname=EXCEPT_$base - if [ ${!testname}x != x ]; then - echo "skipping excluded test $1 (base $base)" - return 0 - fi - run_one $1 "$2" - return $? -} - -[ "$SANITYLOG" ] && rm -f $SANITYLOG || true - -error() { - lctl set_param fail_loc=0 - log "FAIL: $TESTNAME $@" - $LCTL dk $TMP/lustre-log-$TESTNAME.log - if [ "$SANITYLOG" ]; then - echo "FAIL: $TESTNAME $@" >> $SANITYLOG - else - exit 1 - fi -} - -pass() { - echo PASS $@ -} - -mounted_lustre_filesystems() { - awk '($3 ~ "lustre" && $1 ~ ":") { print $2 }' /proc/mounts -} - -MOUNTED="`mounted_lustre_filesystems`" -if [ -z "$MOUNTED" ]; then - formatall - setupall - MOUNTED="`mounted_lustre_filesystems`" - [ -z "$MOUNTED" ] && error "NAME=$NAME not mounted" - I_MOUNTED=yes -fi - -[ `echo $MOUNT | wc -w` -gt 1 ] && error "NAME=$NAME mounted more than once" - -DIR=${DIR:-$MOUNT} -[ -z "`echo $DIR | grep $MOUNT`" ] && echo "$DIR not in $MOUNT" && exit 99 - -LOVNAME=`lctl get_param -n llite.*.lov.common_name | tail -n 1` -OSTCOUNT=`lctl get_param -n lov.$LOVNAME.numobd` -STRIPECOUNT=`lctl get_param -n lov.$LOVNAME.stripecount` -STRIPESIZE=`lctl get_param -n lov.$LOVNAME.stripesize` -ORIGFREE=`lctl get_param -n lov.$LOVNAME.kbytesavail` -MAXFREE=${MAXFREE:-$((200000 * $OSTCOUNT))} -MDS=$(lctl get_param -N mdt.* | grep -v num_refs | tail -n 1 | cut -d"." -f2) - -[ -f $DIR/d52a/foo ] && chattr -a $DIR/d52a/foo -[ -f $DIR/d52b/foo ] && chattr -i $DIR/d52b/foo -rm -rf $DIR/[Rdfs][1-9]* - -build_test_filter - -if [ "${ONLY}" = "MOUNT" ] ; then - echo "Lustre is up, please go on" - exit -fi - -echo "preparing for tests involving mounts" -EXT2_DEV=${EXT2_DEV:-$TMP/SANITY.LOOP} -touch $EXT2_DEV -mke2fs -j -F $EXT2_DEV 8000 > /dev/null -echo # add a newline after mke2fs. - -umask 077 - -test_0a() { - mkdir $DIR/0a0 || error - for ((i=0;i<5000;i++)); do - mkdir $DIR/0a0/`uuidgen -t` || error - done - rm -rf $DIR/0a0 || error -} -#run_test 0a " create random names =============================" - -test_1a() { - mkdir $DIR/1a0 || error - createmany -o $DIR/1a0/f 5000 || error - rmdir $DIR/1a0 && error - rm -rf $DIR/1a0 || error -} -run_test 1a " remove splitted dir =============================" - -test_1b() { - mkdir $DIR/1b0 || error - createmany -o $DIR/1b0/f 5000 || error - unlinkmany $DIR/1b0/f 5000 || error - NUM=`ls $DIR/1b0 | wc -l` - if [ $NUM -ne 0 ] ; then - echo "dir must be empty" - error - fi - - touch $DIR/1b0/file0 || error - touch $DIR/1b0/file1 || error - touch $DIR/1b0/file2 || error - - echo "3 files left" - rmdir $DIR/1b0 && error - rm -f $DIR/1b0/file0 - - echo "2 files left" - rmdir $DIR/1b0 && error - rm -f $DIR/1b0/file1 - - echo "1 files left" - rmdir $DIR/1b0 && error - rm -f $DIR/1b0/file2 - - echo "0 files left" - rmdir $DIR/1b0 || error -} -run_test 1b " remove splitted dir =============================" - -test_1c() { - mkdir $DIR/1b1 || error - createmany -o $DIR/1b1/f 5000 || error - unlinkmany $DIR/1b1/f 5000 || error - NUM=`ls $DIR/1b1 | wc -l` - if [ $NUM -ne 0 ] ; then - echo "dir must be empty" - error - fi - touch $DIR/1b1/file0 || error - touch $DIR/1b1/file1 || error - touch $DIR/1b1/file2 || error - - ls $DIR/1b1/ - log "3 files left" - rmdir $DIR/1b1 && error - rm -f $DIR/1b1/file0 - - ls $DIR/1b1/ - log "2 files left" - rmdir $DIR/1b1 && error - rm -f $DIR/1b1/file1 - - ls $DIR/1b1/ - log "1 files left" - rmdir $DIR/1b1 && error - rm -f $DIR/1b1/file2 - - ls $DIR/1b1/ - log "0 files left" - rmdir $DIR/1b1 || error -} -run_test 1c " remove splitted cross-node dir =============================" - -test_2a() { - mkdir $DIR/2a0 || error - createmany -o $DIR/2a0/f 5000 || error - NUM=`ls $DIR/2a0 | wc -l` - echo "found $NUM files" - if [ $NUM -ne 5000 ]; then - echo "wrong number of files: $NUM" - error - fi - rm -rf $DIR/2a0 || error -} -run_test 2a " list splitted dir =============================" - -test_2b() { - mkdir $DIR/2b1 || error - createmany -o $DIR/2b1/f 5000 || error - $CLEAN - $START - statmany -l $DIR/2b1/f 5000 5000 || error - statmany -s $DIR/2b1/f 5000 5000 || error - rm -rf $DIR/2b1 || error -} -run_test 2b " list splitted dir after remount =============================" - -test_3a() { - mkdir $DIR/3a0 || error - for i in `seq 100`; do - mkdir $DIR/3a0/d${i} || error - done - createmany -o $DIR/3a0/f 5000 || error - rm -rf $DIR/3a0 || error -} -run_test 3a " dir splitting with cross-ref =============================" - -test_3b() { - mkdir $DIR/3b1 || error - createmany -m $DIR/3b1/f 5000 || error - rm -rf $DIR/3b1 || error -} -run_test 3b " dir splitting via createmany -m =============================" - -test_3c() { - mkdir $DIR/3c1 || error - echo "MDS nodes: $MDSCOUNT" - for j in `seq 3`; do - for i in `seq 10`; do - $LFS dirstripe $DIR/3c1/d-${j}-${i} $j || error - createmany -m $DIR/3c1/d-${j}-${i}/m 200 || error - createmany -o $DIR/3c1/d-${j}-${i}/o 200 || error - done - done - rm -rf $DIR/3c1 || error -} - -#run_test 3c " dir splitting via lfs stripe =============================" - -test_4a() { - let rr=0 - while let "rr < 33000"; do - if let "rr % 2000 == 0"; then - echo "$rr" - fi - mkdir $DIR/4a1 || error - rm -rf $DIR/4a1 - let "rr = rr + 1" - done -} - -## this test is very time-consuming, don't run it by default -#run_test 4a " FIDS/ nlink overflow test =============================" - -test_5a() { - mount_client $MOUNT2 - # create a cross-ref file - mkdir -p $MOUNT/$tdir/d1 - mkdir -p $MOUNT2/$tdir/d2 - dd if=/dev/zero of=$MOUNT/$tdir/d1/f1 count=1 - mv $MOUNT2/$tdir/d1/f1 $MOUNT2/$tdir/d2/ - # XXX: a check the file is a cross-ref one is needed. - cancel_lru_locks mdc - cancel_lru_locks osc - dd if=$MOUNT2/$tdir/d2/f1 of=/dev/null - stat $MOUNT2/$tdir/d2 $MOUNT2/$tdir/d2/f1 > /dev/null - can1=`lctl get_param -n ldlm.services.ldlm_canceld.stats | - awk '/ldlm_cancel/ {print $2}'` - blk1=`lctl get_param -n ldlm.services.ldlm_cbd.stats | - awk '/ldlm_bl_callback/ {print $2}'` - unlink $MOUNT2/$tdir/d2/f1 - can2=`lctl get_param -n ldlm.services.ldlm_canceld.stats | - awk '/ldlm_cancel/ {print $2}'` - blk2=`lctl get_param -n ldlm.services.ldlm_cbd.stats | - awk '/ldlm_bl_callback/ {print $2}'` - umount $MOUNT2 - [ $can1 -eq $can2 ] && error "It does not look like a cross-ref file." - [ $[$can1+1] -eq $can2 ] || error $[$[$can2-$can1]] "cancel RPC occured." - [ $blk1 -eq $blk2 ] || error $[$[$blk2-$blk1]] "blocking RPC occured." -} -run_test 5a "Early Lock Cancel: cross-ref unlink" - -test_5b() { - mount_client $MOUNT2 - # create a cross-ref file - mkdir -p $MOUNT/$tdir/d1 - mkdir -p $MOUNT2/$tdir/d2 - dd if=/dev/zero of=$MOUNT/$tdir/d1/f1 count=1 - cancel_lru_locks mdc - cancel_lru_locks osc - dd if=$MOUNT2/$tdir/d1/f1 of=/dev/null - stat $MOUNT2/$tdir/d1/f1 $MOUNT2/$tdir/d2 > /dev/null - can1=`lctl get_param -n ldlm.services.ldlm_canceld.stats | - awk '/ldlm_cancel/ {print $2}'` - blk1=`lctl get_param -n ldlm.services.ldlm_cbd.stats | - awk '/ldlm_bl_callback/ {print $2}'` - ln $MOUNT2/$tdir/d1/f1 $MOUNT2/$tdir/d2/f2 - can2=`lctl get_param -n ldlm.services.ldlm_canceld.stats | - awk '/ldlm_cancel/ {print $2}'` - blk2=`lctl get_param -n ldlm.services.ldlm_cbd.stats | - awk '/ldlm_bl_callback/ {print $2}'` - umount $MOUNT2 - [ $can1 -eq $can2 ] && error "It does not look like a cross-ref file." - [ $[$can1+1] -eq $can2 ] || error $[$[$can2-$can1]] "cancel RPC occured." - [ $blk1 -eq $blk2 ] || error $[$[$blk2-$blk1]] "blocking RPC occured." -} -run_test 5b "Early Lock Cancel: cross-ref link" - -TMPDIR=$OLDTMPDIR -TMP=$OLDTMP -HOME=$OLDHOME - -log "cleanup: ======================================================" -if [ "`mount | grep ^$NAME`" ]; then - rm -rf $DIR/[Rdfs][1-9]* -fi -if [ "$I_MOUNTED" = "yes" ]; then - cleanupall -f || error "cleanup failed" -fi - -echo '=========================== finished ===============================' -[ -f "$SANITYLOG" ] && cat $SANITYLOG && exit 1 || true diff --git a/lustre/tests/set_dates.sh b/lustre/tests/set_dates.sh deleted file mode 100644 index b2a9979..0000000 --- a/lustre/tests/set_dates.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -[ `hostname` = "uml1" ] && date --set="Mar 14 20:21:41 MDT 1973" #101010101 -[ `hostname` = "uml2" ] && date --set="May 26 22:43:22 MDT 1976" #202020202 -[ `hostname` = "uml3" ] && date --set="Aug 9 01:05:03 MDT 1979" #303030303 diff --git a/lustre/tests/sleeptest.c b/lustre/tests/sleeptest.c deleted file mode 100644 index 7e40b24..0000000 --- a/lustre/tests/sleeptest.c +++ /dev/null @@ -1,151 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * 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 version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#define BUFSIZE (4096) - -#define min(a,b) ((a) < (b) ? (a) : (b)) - -int main(int argc, char *argv[]) -{ - - FILE *w_str; - int read_fd; - int rc, iter; - int line, delta, next; - int sleeptime = 0; - char *now_time; - const char ok_chars[] = "MonTueWedThuFriSatSun" - "JanFebMarAprMayJunJulAugSepOctNovDec" - "Line 0123456789 of file, written at:\n"; - - char buf_r[BUFSIZE]; - - char pathname[256] = "/mnt/lustre/linetest_"; - char *host; - - if (argc > 1) { - strncpy(pathname, argv[1], 255); - pathname[255] = '\0'; - } - - host = getenv("HOSTNAME"); - if (host) - strcat(pathname, host); - - if (argc > 2) - sleeptime = strtoul(argv[2], NULL, 0); - - if (sleeptime == 0) - sleeptime = 30; - - printf("Test file used is: %s at %ds intervals\n", pathname, sleeptime); - - w_str = fopen(pathname, "wb"); - if (w_str == NULL) { - perror("fopen"); - exit(1); - } - read_fd = open(pathname, O_RDONLY); - if (read_fd < 0) { - perror("open"); - exit(1); - } - - next = 1; - delta = 17; - iter = 1; - while (1) { - time_t now; - struct tm *t; - long offset; - - now = time((time_t *)NULL); - t = localtime(&now); - now_time = asctime(t); - - printf("iter: %d\n", iter); - - for (line=next; line<(next+delta); line++) { - rc = fprintf(w_str, "Line %8d of file, written at: %s", - line, now_time); - /* \n comes from ctime() result */ - if (rc <= 0) { - perror("fprintf"); - exit(4); - } - rc = fflush(w_str); - if (rc != 0) { - perror("fflush"); - exit(5); - } - } - next += delta; - - /* Check for corruption */ - offset = ftell(w_str); - rc = lseek(read_fd, offset & ~4095, SEEK_SET); - if (rc != (offset & ~4095)) { - perror("lseek"); - exit(7); - } - - rc = read(read_fd, buf_r, min(100, offset & 4095)); - if (rc != min(100, offset & 4095)) { - printf("rc: %d, off %lu buf: '%s'\n", rc,offset,buf_r); - exit(8); - } - buf_r[rc] = 0; - /* Chars from "C" days/months, and above Line */ - if (strspn(buf_r, ok_chars) != rc) { - printf("Corruption detected at %lu on %s", - offset & ~4095, now_time); - exit(9); - } - - sleep(sleeptime); - iter++; - } - -} diff --git a/lustre/tests/test2.c b/lustre/tests/test2.c deleted file mode 100755 index 9224e48..0000000 --- a/lustre/tests/test2.c +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * 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 version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -#include -#include -#include -#include -#include -#include -#include - -/* Beware when setting FSROOT that I've not made any attempts to avoid buffer - * overruns below--this is a test program, it's a static buffer. */ -#define FSROOT "/mnt" -#define OBD_ITERATIONS 10000 - -int main (int argc, char * argv[]) -{ - int fd, rc, err = -1; - struct stat stat_buf; - - if (argc < 2) { - printf("syntax: %s command\n", argv[0]); - printf("Where command is one of \"setup\" or \"create\".\n"); - exit(1); - } - - if (!strcmp(argv[1], "setup")) { - printf("This is silly.\n"); - } else if (!strcmp(argv[1], "create")) { - int i, iter; - - if (argc < 3) { - printf("create requires a nonzero argument.\n"); - exit(1); - } - - iter = atoi(argv[2]); - - if (iter < 1) { - printf("create requires a nonzero argument.\n"); - exit(1); - } - printf("creating %d files...\n", iter); - - for (i = 0; i < iter; i++) { - fd = creat(FSROOT "/foo123", S_IRWXU); - close(fd); - unlink(FSROOT "/foo123"); - } - } else { - printf("Invalid command, run with no arguments for help.\n"); - } - - return 0; -} diff --git a/lustre/tests/toexcl.c b/lustre/tests/toexcl.c deleted file mode 100644 index 43ca4c9..0000000 --- a/lustre/tests/toexcl.c +++ /dev/null @@ -1,113 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * 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 version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved - * Use is subject to license terms. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -void -usage (char *argv0, int help) -{ - char *progname = strrchr(argv0, '/'); - - if (progname == NULL) - progname = argv0; - - fprintf (help ? stdout : stderr, - "Usage: %s [-e] file\n", progname); - - if (!help) - { - fprintf (stderr, " or try '-h' for help\n"); - exit (1); - } - - printf ("Create the given file with O_EXCL...\n"); - printf (" -e expect EEXIST\n"); - printf (" -h print help"); - printf (" Exit status is 0 on success, 1 on failure\n"); -} - -int main(int argc, char **argv) -{ - int rc; - int want_eexist = 0; - - while ((rc = getopt (argc, argv, "eh")) != -1) - switch (rc) - { - case 'e': - want_eexist = 1; - break; - case 'h': - usage (argv[1], 1); - return (0); - default: - usage (argv[0], 0); - } - - if (optind != argc - 1) { - usage (argv[0], 0); - return 1; - } - - rc = open(argv[optind], O_CREAT|O_EXCL, 0644); - if (rc == -1) - { - if (want_eexist && errno == EEXIST) - { - printf("open failed: %s (expected)\n", strerror(errno)); - return (0); - } - printf("open failed: %s\n", strerror(errno)); - return (1); - } else { - if (want_eexist) - { - printf("open success (expecting EEXIST).\n"); - return (1); - } - printf("open success.\n"); - return (0); - } - - return ((rc == 0) ? 0 : 1); -} -- 1.8.3.1