1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-15 01:04:37 +02:00

Storage object improvements.

* Convert all functions to variadic functions.
* Enforce read-only storage.
* Add storageLocalWrite() helper function. Add storageExists(), storagePathCreate(), storageRemove(), and storageStat().
* Add StorageFile object and storageOpenRead()/storageOpenWrite().
This commit is contained in:
David Steele
2018-04-03 12:25:21 -04:00
parent 90f980fe91
commit 93fdb98d15
30 changed files with 1141 additions and 287 deletions

View File

@ -614,9 +614,19 @@ my $oTestDef =
'Storage/Helper' => TESTDEF_COVERAGE_PARTIAL,
},
},
{
&TESTDEF_NAME => 'file',
&TESTDEF_TOTAL => 1,
&TESTDEF_C => true,
&TESTDEF_COVERAGE =>
{
'storage/file' => TESTDEF_COVERAGE_FULL,
},
},
{
&TESTDEF_NAME => 'storage',
&TESTDEF_TOTAL => 4,
&TESTDEF_TOTAL => 10,
&TESTDEF_C => true,
&TESTDEF_COVERAGE =>
@ -626,7 +636,7 @@ my $oTestDef =
},
{
&TESTDEF_NAME => 'helper',
&TESTDEF_TOTAL => 2,
&TESTDEF_TOTAL => 3,
&TESTDEF_C => true,
&TESTDEF_COVERAGE =>

View File

@ -342,6 +342,9 @@ sub run
"CFLAGS=-I. -std=c99 -fPIC -g \\\n" .
" -Werror -Wfatal-errors -Wall -Wextra -Wwrite-strings -Wno-clobbered -Wswitch-enum -Wconversion \\\n" .
($self->{oTest}->{&TEST_VM} eq VM_U16 ? " -Wformat-signedness \\\n" : '') .
# This warning appears to be broken on U12 even though the functionality is fine
($self->{oTest}->{&TEST_VM} eq VM_U12 || $self->{oTest}->{&TEST_VM} eq VM_CO6 ?
" -Wno-missing-field-initializers \\\n" : '') .
($self->{oTest}->{&TEST_VM} ne VM_CO6 && $self->{oTest}->{&TEST_VM} ne VM_U12 ?
" -Wpedantic \\\n" : '') .
" -Wformat=2 -Wformat-nonliteral \\\n" .