Skip to content

Commit

Permalink
Remove duplicate testfiles (#3626)
Browse files Browse the repository at this point in the history
  • Loading branch information
glennsong09 authored Oct 3, 2023
1 parent 95907ba commit 3f0b881
Show file tree
Hide file tree
Showing 1,013 changed files with 66,392 additions and 0 deletions.
45 changes: 45 additions & 0 deletions test/API/tools/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
HDF5 VOL-independent tools tests

This directory includes a set of test scripts that will exercise the HDF5
command-line tools which do not require the native VOL connector. For all tests
to pass, you'll need a VOL connector that implements most of the data model
functionality (but not the native-specific API calls). If your connector only
implements a subset of the functionality, many tests will fail.

The test scripts are modified versions of a subset of the tools test scripts
found in the HDF5 library.

These are not well integrated into the testing framework yet and will require
some manual work to run.

1) Build the code in this repository.

2) Make sure the h5delete tool is in your path.

3) Make sure that the HDF5 tools are on your path.

NOTE: The tools tests require the tools to accept the VOL-related
command-line parameters, which is an unreleased feature. This
means that the tools MUST be built from the develop branch of the
HDF5 library (or 1.12.1 when it's released).

ALSO NOTE: You'll need the shared tools. The statically linked tools
cannot load VOL connector plugins. The tests use the "simple"
names, though (e.g., h5dump, not h5dump-shared), so you
might need to build HDF5 with the "shared only" option,
create aliases, or rename things in the script.

4) Set the HDF5_VOL_CONNECTOR environment variable.

e.g.: export HDF5_VOL_CONNECTOR="pass_through under_vol=0;under_info={}"

5) Make sure the HDF5_PLUGIN_PATH environment variable is set to the location
of your VOL connector.

6) Run the master test script
sh runtests.sh

You will see a lot of error messages and and FAILED text for anything that
fails.

You can also run the individual tool test scripts (testh5ls.sh, etc.).
135 changes: 135 additions & 0 deletions test/API/tools/output_filter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
## Copyright by The HDF Group.
## All rights reserved.
##
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the COPYING file, which can be found at the root of the source code
## distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
## If you do not have access to either file, you may request a copy from
## [email protected].

# This contains function definitions of output filtering.
# This file should only be sourced in by another shell script.
#
# Programmer: Albert Cheng
# Created Date: 2011/5/3


# Comment added to address HDFFV-8270:
# As I understand it, the purpose of this file is to remove extraneous messages
# that appear in stdout and stderr on some machines that have been tested outside
# of the HDF Group realm. The purpose of this script is to filter those
# extraneous messages from stdout and stderr so that when the output files are
# compared to the expected output, the extra messages will not cause failures in
# the tests. The system messages in the comments below are out of date, meaning
# I suppose that while the script code to filter messages on the system was
# correct correct when last used, the output in the comments doesn't match the
# script code that follows. I don't currently have access to any of these
# systems to see the current output and the effect of the script code. If using
# this file in the future, please update the comments to match the scripts in use.
# Larry Knox 2017/3/15


# Some systems will dump some messages to stdout for various reasons.
# Remove them from the stdout result file.
# $1 is the file name of the file to be filtered.
# Cases of filter needed:
# 1. Sandia Red-Storm
# yod always prints these two lines at the beginning.
# LibLustre: NAL NID: 0004a605 (5)
# Lustre: OBD class driver Build Version: 1, [email protected]
# 2. LANL Lambda
# mpijob mirun -np always add an extra line at the end like:
# P4 procgroup file is /users/acheng/.lsbatch/host10524.l82
STDOUT_FILTER() {
result_file=$1
tmp_file=/tmp/h5test_tmp_$$

# Filter Sandia Red-Storm yod messages.
cp $result_file $tmp_file
sed -e '/^LibLustre:/d' -e '/^Lustre:/d' \
< $tmp_file > $result_file

# Filter LANL Lambda mpirun message.
cp $result_file $tmp_file
sed -e '/^P4 procgroup file is/d' \
< $tmp_file > $result_file

# cleanup
rm -f $tmp_file
}


# Some systems will dump some messages to stderr for various reasons.
# Remove them from the stderr result file.
# $1 is the file name of the file to be filtered.
# Cases of filter needed:
# 1. MPE:
# In parallel mode and if MPE library is used, it prints the following
# two message lines whether the MPE tracing is used or not.
# Writing logfile.
# Finished writing logfile.
# 2. LANL MPI:
# The LANL MPI will print some messages like the following,
# LA-MPI: *** mpirun (1.5.10)
# LA-MPI: *** 3 process(es) on 2 host(s): 2*fln21 1*fln22
# LA-MPI: *** libmpi (1.5.10)
# LA-MPI: *** Copyright 2001-2004, ACL, Los Alamos National Laboratory
# 3. h5diff debug output:
# Debug output all have prefix "h5diff debug: ".
# 4. AIX system prints messages like these when it is aborting:
# ERROR: 0031-300 Forcing all remote tasks to exit due to exit code 1 in task 0
# ERROR: 0031-250 task 4: Terminated
# ERROR: 0031-250 task 3: Terminated
# ERROR: 0031-250 task 2: Terminated
# ERROR: 0031-250 task 1: Terminated
# 5. LLNL Blue-Gene mpirun prints messages like there when it exit non-zero:
# <Apr 12 15:01:49.075658> BE_MPI (ERROR): The error message in the job record is as follows:
# <Apr 12 15:01:49.075736> BE_MPI (ERROR): "killed by exit(1) on node 0"
STDERR_FILTER() {
result_file=$1
tmp_file=/tmp/h5test_tmp_$$
# Filter LLNL Blue-Gene error messages in both serial and parallel modes
# since mpirun is used in both modes.
cp $result_file $tmp_file
sed -e '/ BE_MPI (ERROR): /d' \
< $tmp_file > $result_file
# Filter MPE messages
if test -n "$pmode"; then
cp $result_file $tmp_file
sed -e '/^Writing logfile./d' -e '/^Finished writing logfile./d' \
< $tmp_file > $result_file
fi
# Filter LANL MPI messages
# and LLNL srun messages
# and AIX error messages
if test -n "$pmode"; then
cp $result_file $tmp_file
sed -e '/^LA-MPI:/d' -e '/^srun:/d' -e '/^ERROR:/d' \
< $tmp_file > $result_file
fi
# Filter h5diff debug output
cp $result_file $tmp_file
sed -e '/^h5diff debug: /d' \
< $tmp_file > $result_file
# clean up temporary files.
rm -f $tmp_file
}

H5LS_FILTER() {
result_file=$1
sed -i '/Modified:.*/d' $result_file
sed -i 's/Location:.*/Location: XXX:XXX/' $result_file
sed -i 's/with.*driver/with XXX driver/' $result_file
}

H5DUMP_FILTER() {
result_file=$1
sed -i '/OFFSET*/d' $result_file
sed -i '/^\s*SIZE*/d' $result_file
}

H5DIFF_FILTER() {
result_file=$1
sed -i 's/Referenced dataset.*/Referenced dataset XXXXX XXXXX/' $result_file
}
68 changes: 68 additions & 0 deletions test/API/tools/runtests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#! /bin/sh
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# If you do not have access to either file, you may request a copy from
# [email protected].
#
# Run the VOL-independent tools tests

echo
echo "********************"
echo "* TESTING: h5mkgrp *"
echo "********************"
echo

sh testh5mkgrp.sh

echo
echo "*****************"
echo "* TESTING: h5ls *"
echo "*****************"
echo

sh testh5ls.sh

echo
echo "*******************"
echo "* TESTING: h5dump *"
echo "*******************"
echo

sh testh5dump.sh

echo
echo "*********************"
echo "* TESTING: h5repack *"
echo "*********************"
echo

sh testh5repack.sh

echo
echo "*******************"
echo "* TESTING: h5diff *"
echo "*******************"
echo

sh testh5diff.sh

echo
echo "*******************"
echo "* TESTING: h5copy *"
echo "*******************"
echo

sh testh5copy.sh

echo
echo "********"
echo "* DONE *"
echo "********"
echo
Loading

0 comments on commit 3f0b881

Please sign in to comment.