From d731d3c5bcd0122190f1865f14bcc04b5e532b4c Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Mon, 28 Dec 2020 14:14:54 -0600 Subject: [PATCH] tests: Add existing-database test for pt_util Our current tests for pt_util use pt_util to generate a prdb, and then check the output of pt_util against that created database. Add a new test that runs pt_util against an existing database (with the same test data), to make sure that pt_util is still using the same db format. Change-Id: I4dbe7f3b5080ee6ff1f9509992b5686fc8381da0 Reviewed-on: https://gerrit.openafs.org/14801 Tested-by: BuildBot Reviewed-by: Cheyenne Wills Reviewed-by: Benjamin Kaduk --- tests/ptserver/db.prtiny/prdb.DB0 | Bin 0 -> 67008 bytes tests/ptserver/pt_util-t | 28 +++++++++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 tests/ptserver/db.prtiny/prdb.DB0 diff --git a/tests/ptserver/db.prtiny/prdb.DB0 b/tests/ptserver/db.prtiny/prdb.DB0 new file mode 100644 index 0000000000000000000000000000000000000000..bbb25f37a533be1c11d7c8aa5b10e5b9ffedb292 GIT binary patch literal 67008 zcmeI*L2lDP7zR*JXm7wxN;a&r={ZV(NJJ<}6(>bmVQ~W1aGBhKJ8%JZ7*Fe|j8jpJ z5?oo&k~<#P^ZT2ZxKdTu$;OwLS(Z&+U48pewWDh7zJzRYJ1CqNWm#TS+o4q?);(|S z(; z0Rn>*2<=;G2RTcVB0zuu0RjXF5O`_=>3_VQS}u7A5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7csfnf=Rv;D9pWHtl{5FjuZfe`kCnTv@KAV7csfpErv009C72oNAZ zfB*pk1PB~QAdHIR6jFr%0RjXF5FkK+009C7dJ~BEZu%QyZ~O-*j`u0~efxl=_Z{(h z^YK}1o(tUjOCbOO0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB=CL2z)Bb@)rVH+3Bq%-{qUx;^p-1V!oW`oAq?FTIa1}9_fy% zb6uok9>|`)_1A49|KXVU+3$^|&i{J)=Kc1%vA@G+%>OkVfBO8tzm&;;x!dNmbxP5x zjrqT%5&t3oKAkJJDgSo!?q4Sm^N&-_)8`)*>0Gg`^IvcBoB8a+tm}I}mMF69HbN{A{`P*}d*JE?QW83lgdQ8fHU%x%}_6JXU HXNUeT$eN6^ literal 0 HcmV?d00001 diff --git a/tests/ptserver/pt_util-t b/tests/ptserver/pt_util-t index af97668922..bf10d25349 100755 --- a/tests/ptserver/pt_util-t +++ b/tests/ptserver/pt_util-t @@ -4,14 +4,15 @@ use strict; use warnings; use lib $ENV{C_TAP_SOURCE} . "/tests-lib/perl5"; -use afstest qw(obj_path); +use afstest qw(src_path obj_path); use File::Basename; use File::Temp qw(tempfile); -use Test::More tests=>2; +use Test::More tests=>3; my $pt_util = obj_path("src/ptserver/pt_util"); -(undef, my $prdbfile) = tempfile("prdbtest.XXXXXX", TMPDIR => 1, UNLINK => 1); +(undef, my $prdb_tmp) = tempfile("prdbtest.XXXXXX", TMPDIR => 1, UNLINK => 1); +my $prdb_test = src_path("tests/ptserver/db.prtiny/prdb.DB0"); my $instructions = <