summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-03-19 23:27:29 (GMT)
committerGitHub <noreply@github.com>2023-03-19 23:27:29 (GMT)
commit59343e893185ef59f9fd93fd715a33ea4e125d7e (patch)
tree84e72ffacccff3b2f8357d40a6b9b217a0c488ac
parent0704abae0cb5747cfbc168c41d4f40176944dccd (diff)
downloadhdf5-59343e893185ef59f9fd93fd715a33ea4e125d7e.zip
hdf5-59343e893185ef59f9fd93fd715a33ea4e125d7e.tar.gz
hdf5-59343e893185ef59f9fd93fd715a33ea4e125d7e.tar.bz2
Bring bin/ changes from develop (#2595)
-rw-r--r--bin/README.md31
-rwxr-xr-xbin/checkposix90
-rwxr-xr-xbin/chkconfigure82
-rwxr-xr-xbin/chkcopyright17
-rwxr-xr-xbin/dependencies50
-rwxr-xr-xbin/deploy57
-rwxr-xr-xbin/distdep26
-rwxr-xr-xbin/errors138
-rwxr-xr-xbin/format_source_patch34
-rwxr-xr-xbin/gcov_script50
-rwxr-xr-xbin/genparser2
-rw-r--r--bin/output_filter.sh10
-rwxr-xr-xbin/release26
-rwxr-xr-xbin/restore.sh10
-rwxr-xr-xbin/trace14
-rwxr-xr-xbin/warnhist15
16 files changed, 175 insertions, 477 deletions
diff --git a/bin/README.md b/bin/README.md
new file mode 100644
index 0000000..856f348
--- /dev/null
+++ b/bin/README.md
@@ -0,0 +1,31 @@
+# Scripts in `bin` and their purpose
+
+Programs run via `autogen.sh` (or the equivalent in CMake) are indicated.
+
+|Program|Purpose|
+|-------|-------|
+|`buildhdf5`|Convenience script to build HDF5 using the Autotools|
+|`checkapi`|Checks if public API calls are used in internal functions|
+|`checkposix`|Checks if C/POSIX calls are prefixed with `HD`|
+|`chkcopyright`|Checks if files have appropriate copyright statements|
+|`cmakehdf5`|Convenience script to build HDF5 using CMake|
+|`debug-ohdr`|Examines debug output from `H5O_open/close` to look for open objects|
+|`format_source`|Runs `clang-format` over the source files, applying our rules|
+|`genparser`|Creates the flex/bison-based parser files in the high-level library|
+|`h5cc.in`|Input file from which h5cc is created|
+|`h5redeploy.in`|Input file from which h5redeploy is created|
+|`h5vers`|Updates the library version number|
+|`make_err`|Generates the H5E header files (called in `autogen.sh`)|
+|`make_vers`|Generates H5version.h (called in `autogen.sh`)|
+|`make_overflow`|Generates H5overflow.h (called in `autogen.sh`)|
+|`output_filter`|Used in the tools test code to strip extraneous output before we diff files|
+|`restore.sh`|Removes files generated by `autogen.sh`|
+|`runbkprog`|Used by CMake to run test programs in the background|
+|`switch_maint_mode`|Switches maintainer mode on/off in `configure.ac`|
+|`trace`|Adds `TRACE` macros to HDF5 C library source files (run by `autogen.sh`)|
+|`warnhist`|Generates compiler warning statistics for gcc/clang when fed output of make|
+
+## TODO
+
+* chkcopyright is currently semi-broken as it doesn't handle the full variety of copyright headers we need. We're leaving it in place, though, in the hopes that someone will update it in the future.
+* Extending warnhist to better understand the output of additional compilers/languages would be nice.
diff --git a/bin/checkposix b/bin/checkposix
index 3bc5447..c8dc18a 100755
--- a/bin/checkposix
+++ b/bin/checkposix
@@ -43,7 +43,27 @@ foreach $arg (@ARGV) {
#
# If a user specifies one file, process it no matter what so people
# can inspect files we normally skip (like H5system.c).
+
+ $ignore = 0;
+
+ # Ignored files in src/
if($#ARGV gt 0 and $filename =~ /H5FDmulti|H5FDstdio|H5system|H5detect|H5make_libsettings/) {
+ $ignore = 1;
+ }
+ # Ignored atomic test files in test/
+ if($#ARGV gt 0 and $filename =~ /atomic_reader|atomic_writer/) {
+ $ignore = 1;
+ }
+ # Ignored filter plugins in test/
+ if($#ARGV gt 0 and $filename =~ /^filter_plugin\d_/) {
+ $ignore = 1;
+ }
+ # Ignored generators in test/
+ if($#ARGV gt 0 and $filename =~ /^gen_/) {
+ $ignore = 1;
+ }
+
+ if($ignore) {
print "$filename is exempt from using Standard library macro wrappers\n";
next;
}
@@ -103,9 +123,11 @@ foreach $arg (@ARGV) {
next if $name =~ /^(UNIQUE_MEMBERS|S_ISDIR)$/;
next if $name =~ /^addr_defined$/;
- # These functions/macros are exempt.
- # op, cb, and OP are often spuriously flagged so ignore them.
- next if $name =~ /^(main|op|cb|OP)$/;
+ # Ignore callback invocation
+ next if $name =~ /^(op|cb|OP|iter_op|func)$/;
+
+ # Ignore main
+ next if $name =~ /^main$/;
# This often appears in preprocessor lines that span multiple lines
next if $name =~ /^(defined)$/;
@@ -139,15 +161,33 @@ foreach $arg (@ARGV) {
next if $name =~ /^(pow_fun|round_fun|abs_fun|lround_fun|llround_fun)$/;
}
+ # Internal calls in the HDFS VFD (H5FDhdfs.c). Ignore it in this file.
+ if($filename =~ /H5FDhdfs/) {
+ next if $name =~ /^(hdfs)/;
+ }
+
+ # Macros, etc. from the mirror VFD (H5FDmirror.c). Ignore in this file.
+ if($filename =~ /H5FDmirror/) {
+ next if $name =~ /^(LOG)/;
+ next if $name =~ /^(BSWAP_64|is_host_little_endian)$/;
+ }
+
+ # These are things in H5FDs3comms.c and H5FDros3.c. Ignore them in these files.
+ if($filename =~ /H5FDs3comms|H5FDros3/) {
+ next if $name =~ /^(curl_|curlwritecallback|gmnow)/;
+ next if $name =~ /^(ros3_|ROS3_|S3COMMS_)/;
+ next if $name =~ /^(EVP_sha256|SHA256|ISO8601NOW)$/;
+ }
+
# TESTING (not comprehensive - just noise reduction)
# Test macros and functions (testhdf5.h)
next if $name =~ /^(AddTest|TestErrPrintf|TestSummary|TestCleanup|TestShutdown)$/;
next if $name =~ /^(CHECK|CHECK_PTR|CHECK_PTR_NULL|CHECK_PTR_EQ|CHECK_I)$/;
- next if $name =~ /^(VERIFY|VERIFY_STR|VERIFY|TYPE|MESSAGE|ERROR)$/;
+ next if $name =~ /^(VERIFY|VERIFY_STR|VERIFY_TYPE|MESSAGE|ERROR)$/;
# Test macros and functions (h5test.h)
- next if $name =~ /^(TESTING|PASSED|SKIPPED|FAIL_PUTS_ERROR|FAIL_STACK_ERROR|TEST_ERROR)$/;
+ next if $name =~ /^(TESTING|PASSED|SKIPPED|PUTS_ERROR|FAIL_PUTS_ERROR|FAIL_STACK_ERROR|TEST_ERROR|AT)$/;
next if $name =~ /^(GetTestExpress)$/;
# Ignore functions that start with test_ or check_
@@ -157,9 +197,49 @@ foreach $arg (@ARGV) {
# Ignore functions that start with h5_
next if $name =~ /^h5_/;
+ # Ignore process completed status
+ next if $name =~ /(WIFEXITED|WEXITSTATUS|WIFSIGNALED|WTERMSIG|WCOREDUMP|WIFSTOPPED|WSTOPSIG)/;
+
# Ignore usage functions
next if $name =~ /^usage$/;
+ # Ignore callbacks
+ next if $name =~ /(_cb\d?)$/;
+
+ # Specific tests (not even remotely comprehensive)
+
+ # accum test code
+ if($filename =~ /accum/) {
+ next if $name =~ /^(accum_)/;
+ }
+
+ # cache test code
+ if($filename =~ /cache/) {
+ next if $name =~ /(_entry|_entries|_cache|_check|_dependency|_status|_op)$/;
+ next if $name =~ /^(verify_|smoke_check_|row_major_|col_major_)/;
+ next if $name =~ /^(resize_configs_are_equal|CACHE_ERROR)$/
+ }
+
+ # Splitter VFD test code. Ignore in vfd.c.
+ if($filename =~ /vfd/) {
+ next if $name =~ /^(SPLITTER_|splitter_)/;
+ next if $name =~ /(_splitter_)/;
+ next if $name =~ /^(file_exists)$/;
+ }
+
+ # S3 VFD test code. Ignore in ros3.c and s3comms.c.
+ # HDFS VFD test code. Ignore in hdfs.c.
+ if($filename =~ /ros3|s3comms|hdfs/) {
+ next if $name =~ /^(JSVERIFY|JSFAILED_|JSERR_|jserr_|FAIL_)/;
+ next if $name =~ /^(curl_)/;
+ next if $name =~ /^(S3COMMS_FORMAT_CREDENTIAL|ISO8601NOW|gmnow)$/;
+ }
+
+ # VDS test code. Ignore in vds.c.
+ if($filename =~ /vds/) {
+ next if $name =~ /^(vds_)/;
+ }
+
print "$filename:$.: $name\n";
}
diff --git a/bin/chkconfigure b/bin/chkconfigure
deleted file mode 100755
index db4010c..0000000
--- a/bin/chkconfigure
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/sh
-##
-## 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://www.hdfgroup.org/licenses.
-## If you do not have access to either file, you may request a copy from
-## help@hdfgroup.org.
-##
-# Check that all the configure files are properly generated.
-#
-# Programmer: Albert Cheng
-# Created Date: 2004/12/07
-
-#
-# Configure: should be generated by autoconf version 2.69.
-# autoconf: should be of version 2.69.
-
-# variable initialization
-nerrors=0
-AUTOCONFVERSION=2.69
-AUTOCONFVERSIONLEAD='Generated by GNU Autoconf'
-CONFIGUREFILES="configure"
-
-
-# Function definitions
-#
-# PRINTMSG
-# Print a one line message left justified in a field of 70 characters
-# without newline. More output for this line later.
-#
-PRINTMSG() {
- SPACES=" "
- echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
-}
-
-# print result passed.
-PASSED() {
- echo " PASSED"
-}
-
-# print result failed.
-FAILED() {
- echo "*FAILED*"
-}
-
-
-# Main body
-
-# Check configure files
-# The autoconf version should be among the first 5 lines.
-echo "Check autoconf version. Should be version $AUTOCONFVERSION"
-for xf in $CONFIGUREFILES; do
- PRINTMSG $xf
- if [ ! -f $xf ]; then
- FAILED
- echo File not found
- nerrors=`expr $nerrors + 1`
- continue
- fi
- autoconf_version=`head -5 $xf | grep "$AUTOCONFVERSIONLEAD"`
- echo $autoconf_version | grep "$AUTOCONFVERSIONLEAD $AUTOCONFVERSION" > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- PASSED
- else
- FAILED
- echo "Expected: $AUTOCONFVERSIONLEAD $AUTOCONFVERSION"
- echo "Got: $autoconf_version"
- nerrors=`expr $nerrors + 1`
- fi
-done
-
-
-# Summary
-echo $0 found $nerrors errors
-if [ $nerrors != 0 ]; then
- exit 1
-fi
-exit 0
diff --git a/bin/chkcopyright b/bin/chkcopyright
index daa7b54..756afe8 100755
--- a/bin/chkcopyright
+++ b/bin/chkcopyright
@@ -9,7 +9,6 @@
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
-#
# Check Copyright notice.
# Check that all the files have the proper copyright notice.
@@ -39,6 +38,7 @@ NFIXFAILEDFILES=0 # Number of files fix failed.
NUMBEGINLINES=60 # Copyright notice should be located within the
# this number of lines at the beginning of the file.
THGCOPYRIGHTSTR="Copyright by The HDF Group."
+UICOPYRIGHTSTR="Copyright by the Board of Trustees of the University of Illinois"
PASSEDLOG=/tmp/h5chkright_passed.$$
SKIPPEDLOG=/tmp/h5chkright_skipped.$$
@@ -194,7 +194,7 @@ dnl terms governing use, modification, and redistribution, is contained in
dnl the COPYING file, which can be found at the root of the source code
dnl distribution tree, or in https://www.hdfgroup.org/licenses.
dnl If you do not have access to either file, you may request a copy from
-dnl help@hdfgroup.org
+dnl help@hdfgroup.org.
EOF
}
@@ -341,7 +341,7 @@ FindLineInFile()
# $1 file which contains the expected copyright notice.
# $2 file in which to look for the copyright notice.
# Copyright notice must be found within the beginning $NUMBEGINLINES of lines.
-# Hunt for the particular string $UICOPYRIGHTSTR which signifies the beginning
+# Hunt for the particular string $THGCOPYRIGHTSTR which signifies the beginning
# of the copyright notice.
#
MATCH_COPYRIGHT()
@@ -356,7 +356,7 @@ MATCH_COPYRIGHT()
nlines=`wc -l ${COPYRIGHTFILE} | cut -f1 -d' '`
# Find a line that contains the copyright string and its line number in
# the file.
- begin=`FindLineInFile "${UICOPYRIGHTSTR}" $f`
+ begin=`FindLineInFile "${THGCOPYRIGHTSTR}" $f`
if [ "$begin" -le 0 ] ; then
# Not found, generate an empty dummy file
cp /dev/null ${EXTRACTEDFILE}
@@ -381,7 +381,7 @@ MATCH_COPYRIGHT()
# $1 file which contains the expected copyright notice.
# $2 file in which to look for the copyright notice.
# Copyright notice must be found within the beginning $NUMBEGINLINES of lines.
-# Hunt for the particular string $UICOPYRIGHTSTR which signifies the beginning
+# Hunt for the particular string $THGCOPYRIGHTSTR which signifies the beginning
# of the copyright notice.
#
FIX_COPYRIGHT()
@@ -404,7 +404,12 @@ FIX_COPYRIGHT()
# the file.
insertbegin=`FindLineInFile "${THGCOPYRIGHTSTR}" $f`
if [ $insertbegin -gt 0 ]; then
- insertend=`expr $insertbegin + $nlines` # no need to -1. See below.
+ insertUIbegin=`FindLineInFile "${UICOPYRIGHTSTR}" $f`
+ if [ $insertUIbegin -gt 0 ]; then
+ insertend=`expr $insertbegin + $nlines + 1`
+ else
+ insertend=`expr $insertbegin + $nlines`
+ fi
else
insertbegin=`FindLineInFile "${UICOPYRIGHTSTR}" $f`
if [ $insertbegin -gt 0 ]; then
diff --git a/bin/dependencies b/bin/dependencies
deleted file mode 100755
index b2f2395..0000000
--- a/bin/dependencies
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env perl
-#
-# 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://www.hdfgroup.org/licenses.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
-#
-use warnings;
-
-my $depend_file;
-my $new_depend_file;
-my $srcdir;
-my $top_srcdir;
-my $top_builddir;
-
-while ($_ = shift @ARGV) {
- if (/^--top_srcdir=([^ \t\n]*)/) {
- $top_srcdir = $1;
- $top_srcdir =~ s/\+/\\\+/g;
- $top_srcdir =~ s/\./\\\./g;
- } elsif (/^--top_builddir=([^ \t\n]*)/) {
- $top_builddir = $1;
- $top_builddir =~ s/\+/\\\+/g;
- $top_builddir =~ s/\./\\\./g;
- } else {
- $depend_file = $_;
- $new_depend_file = "$_.new";
- last;
- }
-}
-
-open(DEPEND, "<$depend_file") || die "cannot open file $depend_file: $!\n";
-open(NEW, ">$new_depend_file") || die "cannot open file $new_depend_file: $!\n";
-
-while (<DEPEND>) {
- s/\.o(\b)/\.lo$1/g;
- s/ $top_srcdir/ \$\(top_srcdir\)/g;
- s/ $top_builddir/ \$\(top_builddir\)/g;
- print NEW $_;
-}
-
-close(DEPEND);
-close(NEW);
-
-`mv $new_depend_file $depend_file`;
diff --git a/bin/deploy b/bin/deploy
deleted file mode 100755
index 818fa07..0000000
--- a/bin/deploy
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-#
-# 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://www.hdfgroup.org/licenses.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
-#
-# Deploy the HDF5 binary.
-#
-# Programmer: Albert Cheng
-# Created Date: 2004/12/15
-#
-# Modifications
-
-# Function definitions
-#
-# Print Usage page
-USAGE()
-{
-cat << EOF
-Usage: $0 <dir>
- Install the binary to directory <dir>
-
-Examples:
-
- $ bin/deploy /usr/local/hdf5
- ....
-
-EOF
-
-}
-
-
-# Variables
-
-if [ $# != 1 ]; then
- USAGE
- exit 1
-fi
-
-installdir=$1
-# create installdir if it does not exist yet.
-if [ -d $installdir ] || mkdir $installdir ; then
- ${MAKE:-gmake} install prefix=$installdir && \
- ( cd $installdir/bin; ./h5redeploy -force)
- exit $?
-else
- echo $installdir is not a valid directory
- USAGE
- exit 1
-fi
-
diff --git a/bin/distdep b/bin/distdep
deleted file mode 100755
index fcda217..0000000
--- a/bin/distdep
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#! -*-perl-*-
-eval 'exec perl -p -x -S $0 ${1+"$@"}'
- if 0;
-#
-# 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://www.hdfgroup.org/licenses.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
-#
-
-# Usage: $0 [<].depend
-
-# Takes dependency info and generates on stdout dependencies suitable for
-# distribution by removing all the system include files from the list and
-# removing all but the base name of other include files (since the Makefiles
-# contain the logic for searching).
-
-($h,$_)=/\s*\\/?$h.$`:("",$h.$_);
-s|( +/\S*)*( *)|$2?" \\\n ":""|eg;
-#s|(([-\w\.]+)/)+([-\w\.]+)|\3|g;
diff --git a/bin/errors b/bin/errors
deleted file mode 100755
index 9473636..0000000
--- a/bin/errors
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/usr/bin/env perl
-require 5.003;
-use warnings;
-use Text::Tabs;
-
-# NOTE: THE FORMAT OF HRETURN_ERROR AND HGOTO_ERROR MACROS HAS
-# CHANGED. THIS SCRIPT NO LONGER WORKS! --rpm
-
-# 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://www.hdfgroup.org/licenses.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
-#
-# Robb Matzke
-# 30 Aug 1997
-#
-# Purpose: This script will read standard input which should be a
-# function prologue followed by a C function and will emit
-# on standard output the same source code with the function
-# prologue containing documentation for the various errors
-# that occur in the function.
-#
-# Errors are raised by calling HGOTO_ERROR() or
-# HRETURN_ERROR(). The reason for the error message is a
-# comment which appears immediately after the error macro
-# call and is contained entirely on one line:
-#
-# HRETURN_ERROR (...); /*entry not found*/
-#
-# If such a comment doesn't exist, then the previous comment
-# is used, subject to the constraint that raising an error
-# clears the previous comment.
-#
-# /* Entry not found */
-# HGOTO_ERROR (...);
-#
-# Emacs users can use this script interactively with the
-# c-mark-function and shell-command-on-region functions which
-# are normally bound to M-C-h and M-|.
-
-
-# Split STDIN into the prolog and the function body. Preserve leading
-# white space.
-$_ = join "", <STDIN>;
-my ($head, $prolog, $body) = (/^(\s*)(\/\*(.*?)\*\/)?(.*)/s)[0,2,3];
-$prolog = "" unless $prolog;
-
-# Find each error and the comment that goes with it.
-for ($_=$body,$comment=""; /\/\*|H(RETURN|GOTO)_ERROR/s;) {
- $_ = $&.$';
-
- if (/^H(RETURN|GOTO)_ERROR\s*\(\s*H5E_(\w+)\s*,\s*H5E_(\w+)\s*,/s) {
- ($major, $minor, $_) = ($2, $3, $');
- $comment=$1 if /^.*?\)\s*;\s*\/\*\s*(.*?)\s*\*\//;
- $comment =~ s/^\s*\*+\s*/ /mg; # leading asterisks.
- $comment =~ s/^\s+//s; # leading white space.
- $comment =~ s/\s+$//s; # trailing white space.
- $comment =~ s/(\w)$/$1./s; # punctuation.
- $comment ||= "***NO COMMENT***";
- $errors{"$major\000$minor\000\u$comment"} = 1;
- $comment = "";
-
- } else {
- ($comment) = /^\/\*\s*(.*?)\s*\*\//s;
- $_ = $';
- }
-}
-
-
-# Format an error so it isn't too wide.
-sub fmt_error ($) {
- local ($_) = @_;
-
- my ($prefix,$space,$err) = /^((.*?)([A-Z_0-9]+\s+[A-Z_0-9]+\s+))/;
- $_ = $';
- tr/\n / /s;
- my $w = 70 - length expand $prefix;
- s/(.{$w}\S+)\s+(\S)/$1."\n".$space.' 'x(length $err).$2/eg;
- return $prefix . $_."\n";
-}
-
-
-
-# Sort the errors by major, then minor, then comment. Duplicate
-# triplets have already been removed.
-sub by_triplet {
- my ($a_maj, $a_min, $a_com) = split /\000/, $a;
- my ($b_maj, $b_min, $b_com) = split /\000/, $b;
- $a_maj cmp $b_maj || $a_min cmp $b_min || $a_com cmp $b_com;
-}
-@errors = map {sprintf "%-9s %-13s %s\n", split /\000/}
- sort by_triplet keys %errors;
-
-
-
-# Add the list of errors to the prologue depending on the type of
-# prolog.
-if (($front, $back) = $prolog=~/^(.*?Errors:\s*?(?=\n)).*?\n\s*\*\s*\n(.*)/s) {
- #| * Errors: |#
- #| * __list_of_error_messages__ (zero or more lines) |#
- #| * |#
- print $head, "/*", $front, "\n";
- map {print fmt_error " *\t\t".$_} @errors;
- print " *\n", $back, "*/", $body;
-
-} elsif (($front,$back) = $prolog =~
- /(.*?\n\s*ERRORS:?\s*?(?=\n)).*?\n\s*\n(.*)/s) {
- #| ERRORS |#
- #| __list_of_error_messages__ (zero or more lines) |#
- #| |#
- print $head, "/*", $front, "\n";
- map {print fmt_error " ".$_} @errors;
- print "\n", $back, "*/", $body;
-
-} elsif ($prolog eq "") {
- # No prolog present.
- print $head;
- print " \n/*", "-"x73, "\n * Function:\t\n *\n * Purpose:\t\n *\n";
- print " * Errors:\n";
- map {print fmt_error " *\t\t".$_} @errors;
- print " *\n * Return:\tSuccess:\t\n *\n *\t\tFailure:\t\n *\n";
- print " * Programmer:\t\n *\n * Modifications:\n *\n *", '-'x73, "\n";
- print " */\n", $body;
-
-} else {
- # Prolog format not recognized.
- print $head, "/*", $prolog, "*/\n\n";
- print "/*\n * Errors returned by this function...\n";
- map {print fmt_error " *\t".$_} @errors;
- print " */\n", $body;
-}
-
-
diff --git a/bin/format_source_patch b/bin/format_source_patch
deleted file mode 100755
index 2e01455..0000000
--- a/bin/format_source_patch
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-#
-# Recursively format all C & C++ sources and header files, except those in the
-# 'config' directory and generated files, such as H5LTanalyze.c, etc.
-#
-# Note that any files or directories that are excluded here should also be
-# added to the 'exclude' list in .github/workflows/clang-format-check.yml
-#
-# (Remember to update both bin/format_source and bin/format_source_patch)
-
-find . \( -type d -path ./config -prune -and -not -path ./config \) \
- -or \( \( \! \( \
- -name H5LTanalyze.c \
- -or -name H5LTparse.c \
- -or -name H5LTparse.h \
- -or -name H5Epubgen.h \
- -or -name H5Einit.h \
- -or -name H5Eterm.h \
- -or -name H5Edefin.h \
- -or -name H5version.h \
- -or -name H5overflow.h \
- \) \) \
- -and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp -or -iname *.java \) \) \
- | xargs clang-format -style=file -i -fallback-style=none
-
-git diff > clang_format.patch
-
-# Delete if 0 size
-if [ ! -s clang_format.patch ]
-then
- rm clang_format.patch
-fi
-
-exit 0
diff --git a/bin/gcov_script b/bin/gcov_script
deleted file mode 100755
index 06b2ad1..0000000
--- a/bin/gcov_script
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /bin/sh
-#
-# 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://www.hdfgroup.org/licenses.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
-
-# A script to generate coverage files for HDF5 using gcov.
-# Configures, builds, and runs tests in-place; the output files will be placed
-# in a directory called gcov_logs.
-# Must be invoked from the root hdf5 directory.
-# This script has been tested on kagiso.
-
-CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
-export CFLAGS
-LDFLAGS="$LDFLAGS -lgcov"
-export LDFLAGS
-CC=gcc
-export CC
-./configure
-make
-make check
-mkdir gcov_logs
-cd src
-for j in *.h *.c
- do
- ln -s ../$j .libs/$j
- done
-cd .libs
-for j in *.gcda
- do
- gcov -b $j >> gcov.log 2>&1
- done
-for j in *.gcov
- do
- mv $j ../../gcov_logs
- done
-mv gcov.log ../../gcov_logs
-for j in *.c *.h
- do
- rm $j
- done
-cd ../..
-
-
diff --git a/bin/genparser b/bin/genparser
index bb44a91..dab2de7 100755
--- a/bin/genparser
+++ b/bin/genparser
@@ -3,7 +3,7 @@
# Copyright by The HDF Group.
# All rights reserved.
#
-# This file is part of HDF5. The full HDF5 copyright notice, including
+# 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://www.hdfgroup.org/licenses.
diff --git a/bin/output_filter.sh b/bin/output_filter.sh
index ba68cb3..33b3f75 100644
--- a/bin/output_filter.sh
+++ b/bin/output_filter.sh
@@ -61,26 +61,26 @@ STDOUT_FILTER() {
# Remove them from the stderr result file.
# $1 is the file name of the file to be filtered.
# Cases of filter needed:
-# 1. MPE:
+# * 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:
+# * 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:
+# * h5diff debug output:
# Debug output all have prefix "h5diff debug: ".
-# 4. AIX system prints messages like these when it is aborting:
+# * 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:
+# * 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() {
diff --git a/bin/release b/bin/release
index 034aa2f..62cd01f 100755
--- a/bin/release
+++ b/bin/release
@@ -52,23 +52,23 @@ for compressing the resulting tar archive (if none are given then
information is available in the README_HPC file.
doc -- produce the latest doc tree in addition to the archive.
-An md5 checksum is produced for each archive created and stored in the md5 file.
+A sha256 checksum is produced for each archive created and stored in the sha256 file.
Examples:
$ bin/release -d /tmp
/tmp/hdf5-1.8.13-RELEASE.txt
- /tmp/hdf5-1.8.13.md5
+ /tmp/hdf5-1.8.13.sha256
/tmp/hdf5-1.8.13.tar
$ bin/release -d /tmp gzip
/tmp/hdf5-1.8.13-RELEASE.txt
- /tmp/hdf5-1.8.13.md5
+ /tmp/hdf5-1.8.13.sha256
/tmp/hdf5-1.8.13.tar.gz
$ bin/release -d /tmp tar gzip zip
/tmp/hdf5-1.8.13-RELEASE.txt
- /tmp/hdf5-1.8.13.md5
+ /tmp/hdf5-1.8.13.sha256
/tmp/hdf5-1.8.13.tar
/tmp/hdf5-1.8.13.tar.gz
/tmp/hdf5-1.8.13.tar.zip
@@ -531,43 +531,43 @@ test "$verbose" && echo " Running tar..." 1>&2
(cd "$tmpdir" && exec tar -ch --exclude-vcs -f "$HDF5_VERS.tar" "./$HDF5_VERS" || exit 1 )
# Compress
-MD5file=$HDF5_VERS.md5
-cp /dev/null $DEST/$MD5file
+SHA256=$HDF5_VERS.sha256
+cp /dev/null $DEST/$SHA256
for comp in $methods; do
case $comp in
tar)
cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
- (cd $DEST; md5sum $HDF5_VERS.tar >> $MD5file)
+ (cd $DEST; sha256sum $HDF5_VERS.tar >> $SHA256)
;;
gzip)
test "$verbose" && echo " Running gzip..." 1>&2
gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
- (cd $DEST; md5sum $HDF5_VERS.tar.gz >> $MD5file)
+ (cd $DEST; sha256sum $HDF5_VERS.tar.gz >> $SHA256)
;;
cmake-tgz)
test "$verbose" && echo " Creating CMake tar.gz file..." 1>&2
tar2cmaketgz $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/CMake-$HDF5_VERS.tar.gz 1>&2
- (cd $DEST; md5sum CMake-$HDF5_VERS.tar.gz >> $MD5file)
+ (cd $DEST; sha256sum CMake-$HDF5_VERS.tar.gz >> $SHA256)
;;
hpc-cmake-tgz)
test "$verbose" && echo " Creating HPC-CMake tar.gz file..." 1>&2
tar2hpccmaketgz $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/HPC-CMake-$HDF5_VERS.tar.gz 1>&2
- (cd $DEST; md5sum HPC-CMake-$HDF5_VERS.tar.gz >> $MD5file)
+ (cd $DEST; sha256sum HPC-CMake-$HDF5_VERS.tar.gz >> $SHA256)
;;
bzip2)
test "$verbose" && echo " Running bzip2..." 1>&2
bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
- (cd $DEST; md5sum $HDF5_VERS.tar.bz2 >> $MD5file)
+ (cd $DEST; sha256sum $HDF5_VERS.tar.bz2 >> $SHA256)
;;
zip)
test "$verbose" && echo " Creating zip ball..." 1>&2
tar2zip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
- (cd $DEST; md5sum $HDF5_VERS.zip >> $MD5file)
+ (cd $DEST; sha256sum $HDF5_VERS.zip >> $SHA256)
;;
cmake-zip)
test "$verbose" && echo " Creating CMake-zip ball..." 1>&2
tar2cmakezip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/CMake-$HDF5_VERS.zip 1>&2
- (cd $DEST; md5sum CMake-$HDF5_VERS.zip >> $MD5file)
+ (cd $DEST; sha256sum CMake-$HDF5_VERS.zip >> $SHA256)
;;
doc)
if [ "${DOCVERSION}" = "" ]; then
diff --git a/bin/restore.sh b/bin/restore.sh
index 0597572..85ebd1c 100755
--- a/bin/restore.sh
+++ b/bin/restore.sh
@@ -1,10 +1,10 @@
#!/bin/sh
#
-# 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
+# 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://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
diff --git a/bin/trace b/bin/trace
index 8b77831..f116930 100755
--- a/bin/trace
+++ b/bin/trace
@@ -203,7 +203,9 @@ sub argstring ($$$) {
# Normalize the data type by removing redundant white space,
# certain type qualifiers, and indirection.
- $atype =~ s/^\bconst\b//;
+ $atype =~ s/^\bconst\b//; # Leading const
+ $atype =~ s/\s*const\s*//; # const after type, possibly in the middle of '*'s
+ $atype =~ s/^\bstatic\b//;
$atype =~ s/\bH5_ATTR_UNUSED\b//g;
$atype =~ s/\bH5_ATTR_DEPRECATED_USED\b//g;
$atype =~ s/\bH5_ATTR_NDEBUG_UNUSED\b//g;
@@ -325,9 +327,9 @@ sub rewrite_func ($$$$$) {
# Wrap lines that will be longer than the limit
if ($len_if_added > $max_trace_macro_line_len) {
- # Wrap line, with indention
+ # Wrap line, with indentation
$trace .= ",\n ";
- $len = 13; # Set to 13, for indention
+ $len = 13; # Set to 13, for indentation
# Indent an extra space to account for extra digit in 'H5TRACE' macro
if (scalar(@arg_str) >= 10) {
@@ -378,14 +380,16 @@ my $total_api = 0;
for $file (@ARGV) {
# Ignore some files that do not need tracing macros
unless ($file eq "H5FDmulti.c" or $file eq "src/H5FDmulti.c" or $file eq "H5FDstdio.c" or $file eq "src/H5FDstdio.c") {
-
+
# Snarf up the entire file
open SOURCE, $file or die "$file: $!\n";
$Source = join "", <SOURCE>;
close SOURCE;
- # Make modifications
+ # Make a copy of the original data
my $original = $Source;
+
+ # Make modifications
my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**)\n #type
(H5[A-Z]{0,2}[^_A-Z0-9]\w*) #name
\s*\((.*?)\)\s* #args
diff --git a/bin/warnhist b/bin/warnhist
index 680a0e8..fc42209 100755
--- a/bin/warnhist
+++ b/bin/warnhist
@@ -227,6 +227,9 @@ while (<>) {
# Skip variables with the word 'warning' in them
next if $_ =~ /_warning_/;
+ # Skip AMD Optimizing Compiler (aocc) lines "<#> warning(s) generated."
+ next if $_ =~ / warnings? generated\./;
+
# "Hide" the C++ '::' symbol until we've parsed out the parts of the line
while($_ =~ /\:\:/) {
$_ =~ s/\:\:/@@@@/g;
@@ -242,6 +245,18 @@ while (<>) {
} elsif($_ =~ /^\s*[Ww]arning:.*/) {
$name = $last_c_name;
($toss, $warning, $extra, $extra2) = split /\:/, $_;
+ # Check for file-scope gcc Fortran warning output
+ } elsif($_ =~ /f\d\d\d: Warning:/) {
+ # These are interspersed with the "compiling a file" output
+ # when compiling with `make -j` and thus difficult to tie to
+ # any particular file. They are due to things like inappropriate
+ # build options and don't have a line number.
+ #
+ # They start with f, as in f951
+ $name = "(generic)";
+ $line = int(rand(1000000)); # Hack to avoid counting as duplictates
+
+ ($warning) = $_ =~ /\[(.*)\]/x;
# Check for FORTRAN warning output
} elsif($_ =~ /^Warning:.*/) {
$name = $last_fort_name;