1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
|
#! /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 files COPYING and Copyright.html. COPYING can be found at the root
# of the source code distribution tree; Copyright.html can be found at the
# root level of an installed copy of the electronic HDF5 document set and
# is linked from the top-level documents page. It can also be found at
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
# access to either file, you may request a copy from help@hdfgroup.org.
#
# Tests for the h5recover tool
# Determine which filters are available
USE_FILTER_SZIP="@USE_FILTER_SZIP@"
USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@"
USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@"
USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@"
USE_FILTER_NBIT="@USE_FILTER_NBIT@"
USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@"
TOOL=trecover # The tool name
TOOL_BIN=`pwd`/$TOOL # The path of the tool binary
TOOLDataFile=trecover.h5
TOOLJournalFile=$TOOLDataFile.jnl
TOOLCTLDataFile=CTL$TOOLDataFile
RECOVERTOOL=h5recover # The tool name
RECOVERTOOL_BIN=`pwd`/$RECOVERTOOL # The path of the tool binary
#RECOVERTOOL_BIN="cp $TOOLCTLDataFile"
# Use my own h5diff since h5diff has errors such as returning 0 when comparing
# an empty file with a non-empty one.
#H5DIFF=../h5diff/h5diff
H5DIFF=MYH5DIFF
H5DUMP=../h5dump/h5dump
TESTDIR=`pwd`/../testfiles
CMP='cmp -s'
DIFF='diff'
nerrors=0
verbose=yes
# The build (current) directory might be different than the source directory.
if test -z "$srcdir"; then
srcdir=.
fi
#test -d $TESTDIR || mkdir $TESTDIR
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
#
TESTING() {
SPACES=" "
echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Run a test and print PASS or *FAIL*. If a test fails then increment
# the `nerrors' global variable and (if $verbose is set) display the
# difference between the actual output and the expected output. The
# expected output is given as the first argument to this function and
# the actual output file is calculated by replacing the `.ddl' with
# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a
# non-zero value.
# $1: Expected output file
# $2-: arguments for the trecover program
#
TOOLTEST() {
expect="$srcdir/testfiles/$1"
actual=`basename $1 .txt`.out
actual_err=`basename $1 .txt`.err
shift
# Run test.
TESTING $TOOL $@
# Generate the data, journal and the control files.
# The testing shell will still print "Terminated" though the signal is
# trapped. Need to find a way to block or filter it out.
trap true 15
$RUNSERIAL $TOOL_BIN $@
# expect first diff to fail
# $RUNSERIAL $H5DIFF $TOOLDataFile $TOOLCTLDataFile > /dev/null 2>&1
try_diff $TOOLDataFile $TOOLCTLDataFile try_diff.stdout try_diff.stderr
if [ $? = 0 ]; then
echo first diff did not fail as expected
fi
# Recover the file.
# $RUNSERIAL $RECOVERTOOL_BIN -j $TOOLJournalFile $TOOLDataFile > /dev/null
try_h5recover $TOOLJournalFile $TOOLDataFile
if [ $? != 0 ]; then
echo $RECOVERTOOL failed
nerrors="`expr $nerrors + 1`"
fi
# JRM -- 12/10/08
# Replaced the second diff with a call to try_verify. While you
# should see the source code in trecover_verifier.c for details,
# in essence this test checks to see that the metadata is as it
# should be, and that the raw data is "reasonable".
try_verify
if [ $? = 0 ]; then
echo " PASSED"
else
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
fi
# # second diff should produce expected output
# (
# echo "#############################"
# echo "Expected output for '$TOOL $@'"
# echo "#############################"
# $RUNSERIAL $H5DIFF $TOOLDataFile $TOOLCTLDataFile
# ) >$actual 2>$actual_err
# cat try_diff.stdout >> $actual
# cat try_diff.stderr >> $actual_err
# cat $actual_err >> $actual
#
# if [ ! -f $expect ]; then
# echo "missing expected output file($expect)"
# nerrors="`expr $nerrors + 1`"
# elif $CMP $expect $actual; then
# echo " PASSED"
# else
# echo "*FAILED*"
# echo " Expected result (*.ddl) differs from actual result (*.out)"
# nerrors="`expr $nerrors + 1`"
# test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
# fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
rm -f $actual $actual_err
rm -f try_diff.stderr try_diff.stdout
rm -f try_h5recover.stderr try_h5recover.stdout
rm -f try_verify.stdout try_verify.stderr
fi
}
# Print a "SKIP" message
SKIP() {
TESTING $TOOL $@
echo " -SKIP-"
}
# My own h5diff because h5diff has errors such as returning 0 when comparing
# an empty file with a non-empty one.
# Compare the h5dump output of two files, return 0 if the same, else 1.
# The cp to x.data is needed to make h5dump output showing the same filename.
MYH5DIFF(){
xout1=x1.out
xerr1=x1.err
xout2=x2.out
xerr2=x2.err
xdata=x.h5
cp $1 $xdata
$RUNSERIAL $H5DUMP $xdata > $xout1 2> $xerr1
cat $xerr1 >> $xout1
cp $2 $xdata
$RUNSERIAL $H5DUMP $xdata > $xout2 2> $xerr2
cat $xerr2 >> $xout2
# $DIFF $xout1 $xout2
try_diff $xout1 $xout2 try_diff.stdout try_diff.stderr
if [ $? = 0 ]; then
return 0
else
return 1
fi
}
##############################################################################
## ##
## The following function is used to perform a series of test on the ##
## output generated by h5recover, and its ability to reject mis-matched ##
## HDF5/journal file pairs, or HDF5 files that are not or cannot be ##
## journaled. ##
## ##
## The basic idea is to do run h5recover on predefined hdf5 files and ##
## journals and compare the stdout and stderr output generated with ##
## architypes. The matter is somewhat complicated by the flags needed for ##
## different tests -- but the concept is as above. ##
## ##
##############################################################################
run_h5recover_output_test() {
return_code=0
BASE_NAME=$1
FLAGS=$2
COMMENT=$3
TESTING $COMMENT
cp $srcdir/testfiles/${BASE_NAME}.h5 .
cp $srcdir/testfiles/${BASE_NAME}.jnl .
( $RUNSERIAL ./h5recover -j ${BASE_NAME}.jnl -n ${FLAGS} ${BASE_NAME}.h5 \
> ${BASE_NAME}.stdout ) 2> ${BASE_NAME}.stderr
# check stdout
($DIFF $srcdir/testfiles/${BASE_NAME}.stdout ./${BASE_NAME}.stdout > \
./${BASE_NAME}.stdout.stdout) 2> ./${BASE_NAME}.stdout.stderr
# check both return code and contents of stdout and stderr files --
# report files different if either the return code isn't 0, or
# either of the output files is non-empty.
if [ $? != 0 ]
then
echo "$DIFF returned non-zero return code(1)."
return_code=1
else
if [ `wc -c < ./${BASE_NAME}.stdout.stdout` != '0' ]
then
# echo "#DIFF returned non-empty stdout file(1)."
return_code=1
else
if [ `wc -c < ./${BASE_NAME}.stdout.stderr` != '0' ]
then
# echo "$DIFF returned non-empty stderr file(1)."
return_code=1
fi
fi
fi
# check stderr
($DIFF $srcdir/testfiles/${BASE_NAME}.stderr ./${BASE_NAME}.stderr > \
./${BASE_NAME}.stderr.stdout) 2> ./${BASE_NAME}.stderr.stderr
# check both return code and contents of stdout and stderr files --
# report files different if either the return code isn't 0, or
# either of the output files is non-empty.
if [ $? != 0 ]
then
# echo "$DIFF returned non-zero return code(2)."
return_code=1
else
if [ `wc -c < ./${BASE_NAME}.stderr.stdout` != '0' ]
then
# echo "#DIFF returned non-empty stdout file(2)."
return_code=1
else
if [ `wc -c < ./${BASE_NAME}.stderr.stderr` != '0' ]
then
# echo "$DIFF returned non-empty stderr file(2)."
return_code=1
fi
fi
fi
# tidy up
rm -f ${BASE_NAME}.h5
rm -f ${BASE_NAME}.jnl
rm -f ${BASE_NAME}.stdout
rm -f ${BASE_NAME}.stdout.stdout
rm -f ${BASE_NAME}.stdout.stderr
rm -f ${BASE_NAME}.stderr
rm -f ${BASE_NAME}.stderr.stdout
rm -f ${BASE_NAME}.stderr.stderr
if [ $return_code = 0 ]; then
echo " PASSED"
else
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
fi
return $return_code
}
##############################################################################
## ##
## The following functions are used to perform a sort of "temporal scan" ##
## of the possible HDF5 file and journal file value created by trecover. ##
## ##
## The basic idea is to do run trecover -a n over a wide selection of ##
## values for n in the hope that if there is a window in which the journal ##
## is not maintained properly, we will find it when we force a crash, and ##
## then attempt to recover. ##
## ##
## The following pseudo code describes the test: ##
## ##
## let n = 0.01; // these values are arbitrary ##
## let incr = 0.001; // for now ##
## let fail = false; ##
## ##
## do { ##
## trecover -a n ##
## ##
## if ( trecover.h5.jnl exists ) ##
## { ##
## if ( h5dump trecover.h5 is able to open trecover.h5 ) ##
## { ##
## ##
## fail = true; ##
## ##
## } else if ( h5recover -j trecover.h5.jnl trecover.h5 fails ) { ##
## ##
## fail = true; ##
## ##
## } else if ( h5dump trecover.h5 can't open trecover.h5 ) { ##
## ##
## fail = true; ##
## } ##
## } else if ( h5dump trecover.h5 can't open trecover.h5 ) { ##
## ##
## fail = true; ##
## } ##
## ##
## n += incr; ##
## ##
## } while ( ( trecover.h5.jnl exists ) && ( not fail ) ) ##
## ##
##############################################################################
# On some target systems, the return code of a program is inaccessible.
# Get around this by storing stdout and stderr to separate files, and
# inferring that the files are different if either file is non-empty
try_diff() {
return_code=0
TRY_DIFF_INPUT1=$1
TRY_DIFF_INPUT2=$2
TRY_DIFF_STDOUT=$3
TRY_DIFF_STDERR=$4
rm -f $TRY_DIFF_STDOUT $TRY_DIFF_STDERR
($DIFF $TRY_DIFF_INPUT1 $TRY_DIFF_INPUT2 > $TRY_DIFF_STDOUT) \
2> $TRY_DIFF_STDERR
# check both return code and contents of stdout and stderr files --
# report files different if either the return code isn't 0, or
# either of the output files is non-empty.
if [ $? != 0 ]
then
# echo "$DIFF returned non-zero return code."
return_code=1
else
if [ `wc -c < ${TRY_DIFF_STDOUT}` != '0' ]
then
# echo "#DIFF returned non-empty stdout file."
return_code=1
else
if [ `wc -c < ${TRY_DIFF_STDERR}` != '0' ]
then
# echo "$DIFF returned non-empty stderr file."
return_code=1
fi
fi
fi
return $return_code
}
# On some target systems, the return code of a program is inaccessible.
# Get around this by storing stdout and stderr to separate files, and
# inferring that the return code is 0 if the stderr file is empty.
try_h5dump() {
return_code=0
TRY_H5DUMP_INPUT=$1
TRY_H5DUMP_STDOUT=$2
TRY_H5DUMP_STDERR=$3
rm -f $TRY_H5DUMP_STDOUT $TRY_H5DUMP_STDERR
# echo "(h5dump $TRY_H5DUMP_INPUT > $TRY_H5DUMP_STDOUT) \
# 2> $TRY_H5DUMP_STDERR"
( $RUNSERIAL ../h5dump/h5dump $TRY_H5DUMP_INPUT > $TRY_H5DUMP_STDOUT ) \
2> $TRY_H5DUMP_STDERR
# check both return code and contents of stderr file -- report
# failure if either the return code is non-zero or the stderr
# file is non-empty.
if [ $? != 0 ]
then
# echo "try_h5dump failed by return code."
return_code=1
else
if [ `wc -c < $TRY_H5DUMP_STDERR` != '0' ]
then
# echo "try_h5dump failed by stderr file."
return_code=1
fi
fi
return $return_code
}
try_h5recover() {
return_code=0
TRY_RECOVER_JNL_FILE=$1
TRY_RECOVER_H5_FILE=$2
rm -f try_h5recover.stdout try_h5recover.stderr
( $RUNSERIAL ./h5recover -j $TRY_RECOVER_JNL_FILE -f $TRY_RECOVER_H5_FILE > \
try_h5recover.stdout ) 2> try_h5recover.stderr
if [ `wc -c < try_h5recover.stderr` != '0' ]
then
return_code=1
fi
return $return_code
}
try_verify() {
return_code=0
rm -f try_verify.stdout try_verify.stderr
( $RUNSERIAL ./trecover -v > try_verify.stdout) 2> try_verify.stderr
# check both return code and contents of stderr file -- report
# failure and cat the stderr file if either the return code is
# non-zero or the stderr file is non-empty.
if [ $? != 0 ]
then
# echo "try_verify reports failure by return code."
return_code=1
cat try_verify.stderr
else
if [ `wc -c < try_verify.stderr` != '0' ]
then
# echo "try_verify reports failure by stderr file."
return_code=1
cat try_verify.stderr
fi
fi
# cat the stdout file if it is non empty
if [ `wc -c < try_h5recover.stdout` != '0' ]
then
cat try_verify.stdout
fi
return $return_code
}
test_point() {
pass=1
seconds=$1
usecs=$2
trecover_options=$3
if [ $usecs -lt 10 ]
then
delay=${seconds}.00000${usecs}
else
if [ $usecs -lt 100 ]
then
delay=${seconds}.0000${usecs}
else
if [ $usecs -lt 1000 ]
then
delay=${seconds}.000${usecs}
else
if [ $usecs -lt 10000 ]
then
delay=${seconds}.00${usecs}
else
if [ $usecs -lt 100000 ]
then
delay=${seconds}.0${usecs}
else
delay=${seconds}.${usecs}
fi
fi
fi
fi
fi
echo "trecover -a $delay $trecover_options"
# Generate the data, journal and the control files.
# The testing shell will still print "Terminated" though the signal is
# trapped. Need to find a way to block or filter it out.
trap true 15
$RUNSERIAL ./trecover -a $delay $trecover_options > /dev/null 2>&1
if [ -f trecover.h5 ]
then
# echo "trecover.h5 exists"
try_h5dump trecover.h5 try_h5dump.stdout try_h5dump.stderr
if [ $? -ne 0 ]
then
# echo "h5dump trecover.h5 failed (1)"
if [ -f trecover.h5.jnl ]
then
# echo "trecover.h5.jnl exists -- try to recover"
# echo "./h5recover -j trecover.h5.jnl -f trecover.h5"
try_h5recover trecover.h5.jnl trecover.h5
if [ $? -ne 0 ]
then
# echo "h5recover failed!!! FAILED"
pass=0
else
# echo "h5recover succeeded -- try h5dump again"
try_h5dump trecover.h5 try_h5dump.stdout try_h5dump.stderr
if [ $? -ne 0 ]
then
# echo "h5dump trecover.h5 failed again?!? FAILED"
pass=0
else
# echo "h5dump trecover.h5 succeeded (2)"
# since h5dump works, try to verify the recovery
try_verify
if [ $? -ne 0 ]
then
# echo "try_verify failed!!! FAILED"
pass=0
else
# echo "try_verify succeeded -- PASS"
pass=1
fi
fi
fi
else
# echo "trecover.h5.jnl doesn't exist!!! FAILED"
pass=0
fi
else
# echo "h5dump trecover.h5 succeeded on first attempt"
if [ -f trecover.h5.jnl ]
then
# echo "h5dump trecover.h5 succeeded on first attempt"
# echo "journal file exists."
ls -l trecover.h5.jnl
# else
# echo "h5dump trecover.h5 succeeded on first attempt"
# echo "no journal file exists."
fi
pass=1
fi
fi
return $pass
}
run_jnl_invarient_test() {
echo "Starting journaling invarients test:"
echo ""
echo "This test runs the same journaled test application repeatedly, "
echo "but with a gradually increasing delay before the test procees is"
echo "killed. The opjective is to search for windows in which the "
echo "the journaling invarients are not maintained. If the test finds "
echo "such a case, the file should be unreadable after the journal is "
echo "recovered."
echo ""
echo "This test generates a lot of garbage output, as we are killing the "
echo "test application repeatedly. Ignore this output, and only look at"
echo "the last line."
echo ""
echo "Starting the test now:"
echo ""
echo "Testing journaling invarients...."
echo ""
trecover_options=$1
finished=0;
sec=0;
usec=0;
while [ $finished -eq 0 ]
do
usec="`expr $usec + 50`"
if [ $usec -ge 1000000 ]
then
usec=0;
sec="`expr $sec + 1`"
fi
test_point $sec $usec $trecover_options
pass=$?
echo "pass = $pass"
if [ $pass -eq 0 ]
then
finished=1
fi
if [ ! -f trecover.h5.jnl ]
then
finished=1
fi
done
echo -n "Testing journaling invarients"
echo -n " "
if [ $pass -eq 0 ]
then
echo "FAILED"
nerrors="`expr $nerrors + 1`"
else
echo "PASSED"
fi
# Clean up output files
if test -z "$HDF5_NOCLEANUP"; then
rm -f try_h5dump.stderr try_h5dump.stdout
rm -f try_h5recover.stderr try_h5recover.stdout
rm -f try_verify.stderr try_verify.stdout
fi
return
}
##############################################################################
### T H E T E S T S ###
##############################################################################
# default test setting
TOOLTEST default.txt
# repeat using the binary journal file format
TOOLTEST default.txt -b
# h5recover output and journal rejection tests
#
# Ideally, this set of tests should verify that h5recover can examine all
# valid HDF5 files, detect whether the file is marked as having journaling
# in progress, and read the magic number if so.
#
# Similarly, these tests should also verify that h5recover can validate
# the journal file, and that it can reject journal files that don't match
# the supplied HDF5 file.
#
# In practice, this set of tests if quite incomplete. In particular,
# the tests do not cover anything close to the full range of HDF5 files.
# This must be fixed eventualy, but for now I think I have the more common
# cases.
# JRM -- 4/2/09
run_h5recover_output_test test00 " " "00 successful recovery"
run_h5recover_output_test test01 "-x" "01 examine with recovery possible"
run_h5recover_output_test test02 "-x -v" "02 verbose examine with recovery possible"
run_h5recover_output_test test03 "-f" "03 successful recovery with empty journal"
run_h5recover_output_test test04 "-x" "04 empty journal examine with recovery possible"
run_h5recover_output_test test05 "-x -v" "05 verbose empty journal examine with recovery possible"
run_h5recover_output_test test06 " " "06 magic mismatch journal rejection"
run_h5recover_output_test test07 "-x" "07 examine with magic mismatch"
run_h5recover_output_test test08 "-x -v" "08 verbose examine with magic mismatch"
run_h5recover_output_test test09 " " "09 un-journaled file"
run_h5recover_output_test test10 "-x" "10 examine un-journaled file"
run_h5recover_output_test test11 "-x -v" "11 verbose examine un-journaled file"
run_h5recover_output_test test12 " " "12 invalid journal file -- bad first char"
run_h5recover_output_test test13 "-x" "13 examine invalid journal file -- bad first char"
run_h5recover_output_test test14 "-x -v" "14 verbose examine invalid journal file -- bad first char"
run_h5recover_output_test test15 " " "15 invalid journal file -- bad ver tag"
run_h5recover_output_test test16 "-x" "16 examine invalid journal file -- bad ver tag"
run_h5recover_output_test test17 "-x -v" "17 verbose examine invalid journal file -- bad ver tag"
run_h5recover_output_test test18 " " "18 invalid journal file -- bad target tag"
run_h5recover_output_test test19 "-x" "19 examine invalid journal file -- bad target tag"
run_h5recover_output_test test20 "-x -v" "20 verbose examine invalid journal file -- bad target tag"
run_h5recover_output_test test21 " " "21 invalid journal file -- bad magic tag"
run_h5recover_output_test test22 "-x" "22 examine invalid journal file -- bad magic tag"
run_h5recover_output_test test23 "-x -v" "23 verbose examine invalid journal file -- bad magic tag"
run_h5recover_output_test test24 " " "24 invalid journal file -- bad date tag"
run_h5recover_output_test test25 "-x" "25 examine invalid journal file -- bad date tag"
run_h5recover_output_test test26 "-x -v" "26 verbose examine invalid journal file -- bad date tag"
run_h5recover_output_test test27 " " "27 invalid journal file -- bad human readable tag"
run_h5recover_output_test test28 "-x" "28 examine invalid journal file -- bad human readable tag"
run_h5recover_output_test test29 "-x -v" "29 verbose examine invalid journal file -- bad human readable tag"
run_h5recover_output_test test30 " " "30 invalid journal file -- bad ver val"
run_h5recover_output_test test31 "-x" "31 examine invalid journal file -- bad ver val"
run_h5recover_output_test test32 "-x -v" "32 verbose examine invalid journal file -- bad ver val"
run_h5recover_output_test test33 " " "33 invalid journal file -- bad human readable val"
run_h5recover_output_test test34 "-x" "34 examine invalid journal file -- bad human readable val"
run_h5recover_output_test test35 "-x -v" "35 verbose examine invalid journal file -- bad human readable val"
run_h5recover_output_test test36 " " "36 bad HDF5 file"
run_h5recover_output_test test37 "-x" "37 examine bad HDF5 file"
run_h5recover_output_test test38 "-x -v" "38 verbose examine bad HDF5 file"
# Invarient test
# This is a very different test from the previous TOOLTEST calls --
# basic idea is to scan the execution time of a journaled process to
# look for points in time at which the journaling invarients are not
# maintained. see comments for details.
#
# Run the test twice -- once with human readable journal file format, and
# once with binary journal file format.
run_jnl_invarient_test
run_jnl_invarient_test -b
if test $nerrors -eq 0 ; then
echo "All $TOOL tests passed."
exit 0
else
echo $nerrors errors encountered.
exit 1
fi
|