1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-01-06 08:01:21 +03:00

Fix comment typos.

This includes some variable names in tests which don't seem important enough for their own commits.

Contributed by Josh Soref.
This commit is contained in:
Josh Soref
2019-08-26 12:05:36 -04:00
committed by David Steele
parent 22aa532be1
commit c2771e5469
62 changed files with 99 additions and 99 deletions

View File

@@ -69,7 +69,7 @@ sub codeCountScan
$strFile eq 'test/src/valgrind.suppress' ||
$strFile eq 'test/src/lcov.conf');
# Classify the souce file
# Classify the source file
my $strClass = 'test/harness';
if ($strFile =~ '^doc/xml/' || $strFile eq 'doc/manifest.xml')

View File

@@ -97,7 +97,7 @@ sub testDefLoad
my $bExpect = false; # By default don't run expect tests
my $bContainer = true; # By default run tests in a single container
my $bIndividual = false; # By default runs are all executed in the same contanier
my $bIndividual = false; # By default runs are all executed in the same container
if ($strModuleType eq TESTDEF_INTEGRATION)
{

View File

@@ -365,7 +365,7 @@ sub run
$strTestC =~ s/\{\[C\_TEST\_EXPECT_PATH\]\}/$self->{strExpectPath}/g;
$strTestC =~ s/\{\[C\_TEST\_REPO_PATH\]\}/$self->{strBackRestBase}/g;
# Set defalt log level
# Set default log level
my $strLogLevelTestC = "logLevel" . ucfirst($self->{strLogLevelTest});
$strTestC =~ s/\{\[C\_LOG\_LEVEL\_TEST\]\}/$strLogLevelTestC/g;
@@ -420,7 +420,7 @@ sub run
(vmCoverageC($self->{oTest}->{&TEST_VM}) && $self->{bCoverageUnit} ? ' -DDEBUG_COVERAGE' : '') .
($self->{bDebug} ? '' : ' -DNDEBUG') . ($self->{bDebugTestTrace} ? ' -DDEBUG_TEST_TRACE' : '');
# Flags used to buid harness files
# Flags used to build harness files
my $strHarnessFlags =
'-O2' . ($self->{oTest}->{&TEST_VM} ne VM_U12 ? ' -ftree-coalesce-vars' : '') .
($self->{oTest}->{&TEST_CTESTDEF} ? " $self->{oTest}->{&TEST_CTESTDEF}" : '');
@@ -429,7 +429,7 @@ sub run
$self->{oStorageTest}, "$self->{strGCovPath}/harnessflags",
"${strCommonFlags} ${strWarningFlags} ${strHarnessFlags}");
# Flags used to buid test.c
# Flags used to build test.c
my $strTestFlags =
'-DDEBUG_TEST_TRACE -O0' . ($self->{oTest}->{&TEST_VM} ne VM_U12 ? ' -ftree-coalesce-vars' : '') .
(vmCoverageC($self->{oTest}->{&TEST_VM}) && $self->{bCoverageUnit} ?
@@ -440,7 +440,7 @@ sub run
$self->{oStorageTest}, "$self->{strGCovPath}/testflags",
"${strCommonFlags} ${strWarningFlags} ${strTestFlags}");
# Flags used to buid all other files
# Flags used to build all other files
my $strBuildFlags =
($self->{bOptimize} ? '-O2' : '-O0' . ($self->{oTest}->{&TEST_VM} ne VM_U12 ? ' -ftree-coalesce-vars' : ''));

View File

@@ -36,7 +36,7 @@ use constant BOGUS => 'bogus';
push @EXPORT, qw(BOGUS);
####################################################################################################################################
# The current test run that is executung. Only a single run should ever occur in a process to prevent various cleanup issues from
# The current test run that is executing. Only a single run should ever occur in a process to prevent various cleanup issues from
# affecting the next run. Of course multiple subtests can be executed in a single run.
####################################################################################################################################
my $oTestRun;
@@ -70,14 +70,14 @@ sub new
####################################################################################################################################
# initModule
#
# Empty init sub in case the ancestor class does not delare one.
# Empty init sub in case the ancestor class does not declare one.
####################################################################################################################################
sub initModule {}
####################################################################################################################################
# initTest
#
# Empty init sub in case the ancestor class does not delare one.
# Empty init sub in case the ancestor class does not declare one.
####################################################################################################################################
sub initTest {}
@@ -96,7 +96,7 @@ sub cleanTest
####################################################################################################################################
# cleanModule
#
# Empty final sub in case the ancestor class does not delare one.
# Empty final sub in case the ancestor class does not declare one.
####################################################################################################################################
sub cleanModule {}

View File

@@ -362,7 +362,7 @@ my $oyVm =
};
####################################################################################################################################
# Set VM_DB_TEST to VM_DB if it is not defined so it doesn't have to be checked everywere
# Set VM_DB_TEST to VM_DB if it is not defined so it doesn't have to be checked everywhere
####################################################################################################################################
foreach my $strVm (sort(keys(%{$oyVm})))
{

View File

@@ -1032,7 +1032,7 @@ sub configCreate
$oParamHash{&CFGDEF_SECTION_GLOBAL}{cfgOptionName(CFGOPT_PROTOCOL_TIMEOUT)} = 60;
$oParamHash{&CFGDEF_SECTION_GLOBAL}{cfgOptionName(CFGOPT_DB_TIMEOUT)} = 45;
# Set to make sure that changinf the default works and to speed compression for testing
# Set to make sure that changing the default works and to speed compression for testing
$oParamHash{&CFGDEF_SECTION_GLOBAL}{cfgOptionName(CFGOPT_COMPRESS_LEVEL)} = 3;
# Only set network compress level if there is more than one host

View File

@@ -320,7 +320,7 @@ sub controlGenerateContent
$tControlContent .= pack('L', $self->dbControlVersion($strPgVersion));
$tControlContent .= pack('L', $self->dbCatalogVersion($strPgVersion));
# Offset to page size by archecture bits and version
# Offset to page size by architecture bits and version
my $rhOffsetToPageSize =
{
32 =>

View File

@@ -394,7 +394,7 @@ sub run
false, " checksum not set since copy size 0");
#---------------------------------------------------------------------------------------------------------------------------
# Checkum page exception
# Checksum page exception
$iResultCopyResult = BACKUP_FILE_COPY;
$self->testException(sub {backupManifestUpdate(

View File

@@ -224,7 +224,7 @@ sub run
# Clear the storage repo settings
storageRepoCacheClear();
# Create an encrypted storage and generate an encyption sub passphrase to store in the file
# Create an encrypted storage and generate an encryption sub passphrase to store in the file
my $strCipherPassSub = cipherPassGen();
# Error on encrypted repo but no passphrase passed to store in the file

View File

@@ -1125,7 +1125,7 @@ sub run
$oManifest->set(MANIFEST_SECTION_BACKUP_TARGET, $strTablespace, MANIFEST_SUBKEY_PATH, $self->{strDbPath} .
"/tablespace/" . $strTablespaceName);
$self->testResult(sub {$oManifest->repoPathGet($strTablespace)}, $strTablespace,
'repoPathGet() - tablespace - no tablepace-id nor subpath');
'repoPathGet() - tablespace - no tablespace-id nor subpath');
# repoPathGet - fully qualified tablespace target
#---------------------------------------------------------------------------------------------------------------------------
@@ -1139,7 +1139,7 @@ sub run
$self->testResult(sub {$oManifest->repoPathGet($strTablespace, BOGUS)}, $strTablespace . "/PG_" . PG_VERSION_94 . "_" .
$self->dbCatalogVersion(PG_VERSION_94) . "/" . BOGUS, 'repoPathGet() - tablespace valid with subpath');
# Set the DB version to < 9.0 - there is no special sudirectory in earlier PG versions
# Set the DB version to < 9.0 - there is no special subdirectory in earlier PG versions
$oManifest->set(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_VERSION, undef, PG_VERSION_84);
$self->testResult(sub {$oManifest->repoPathGet($strTablespace, BOGUS)}, $strTablespace . "/" . BOGUS,
'repoPathGet() - tablespace in 8.4 valid with subpath');
@@ -1530,7 +1530,7 @@ sub run
$oManifestBase->{oStorage} = $oStorageTemp;
$oManifestExpected->{oStorage} = $oStorageTemp;
# Add a bogus file - all traces to be removed after the manifest has been built to simulate an inital manifest and avoid
# Add a bogus file - all traces to be removed after the manifest has been built to simulate an initial manifest and avoid
# missing files error
storageDb()->put(storageDb()->openWrite($self->{strDbPath} . '/' . BOGUS,
{strMode => MODE_0750, strUser => TEST_USER, strGroup => TEST_GROUP, lTimestamp => $lTime}), '');

View File

@@ -261,7 +261,7 @@ sub run
$oHostDbMaster->manifestPathCreate(\%oManifest, MANIFEST_TARGET_PGDATA, DB_PATH_PGSERIAL);
$oHostDbMaster->dbFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, DB_PATH_PGSERIAL . '/anything.tmp', 'IGNORE');
# Create pg_snaphots dir and file - only file will be ignored
# Create pg_snapshots dir and file - only file will be ignored
$oHostDbMaster->manifestPathCreate(\%oManifest, MANIFEST_TARGET_PGDATA, DB_PATH_PGSNAPSHOTS);
$oHostDbMaster->dbFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, DB_PATH_PGSNAPSHOTS . '/anything.tmp', 'IGNORE');
@@ -365,7 +365,7 @@ sub run
$oHostDbMaster->manifestLinkCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'postgresql.conf.bad',
'../pg_config/postgresql.conf.link');
# Fail bacause two links point to the same place
# Fail because two links point to the same place
$strFullBackup = $oHostBackup->backup(
$strType, 'error on link to a link',
{oExpectedManifest => \%oManifest, iExpectedExitStatus => ERROR_LINK_DESTINATION});

View File

@@ -217,9 +217,9 @@ sub run
forceStorageMove(storageRepo(), $strArchiveInfoCopyOldFile, $strArchiveInfoFile, {bRecurse => false});
# Confirm versions
my $oAchiveInfo = new pgBackRest::Archive::Info(storageRepo()->pathGet('archive/' . $self->stanza()));
my $oArchiveInfo = new pgBackRest::Archive::Info(storageRepo()->pathGet('archive/' . $self->stanza()));
my $oBackupInfo = new pgBackRest::Backup::Info(storageRepo()->pathGet('backup/' . $self->stanza()));
$self->testResult(sub {$oAchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
$self->testResult(sub {$oArchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
PG_VERSION_93)}, true, 'archive at old pg version');
$self->testResult(sub {$oBackupInfo->test(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_DB_VERSION, undef,
PG_VERSION_95)}, true, 'backup at new pg version');

View File

@@ -337,20 +337,20 @@ sub run
{strOptionalParam =>
' --' . cfgOptionName(CFGOPT_PG_PATH) . '=' . $oHostDbMaster->dbPath() .
'/testbase/ --no-' . cfgOptionName(CFGOPT_ONLINE) . ' --' . cfgOptionName(CFGOPT_FORCE)});
my $oAchiveInfo = new pgBackRest::Archive::Info(storageRepo()->pathGet('archive/' . $self->stanza()));
my $oArchiveInfo = new pgBackRest::Archive::Info(storageRepo()->pathGet('archive/' . $self->stanza()));
my $oBackupInfo = new pgBackRest::Backup::Info(storageRepo()->pathGet('backup/' . $self->stanza()));
# Read info files to confirm the files were created with a different database version
if ($self->pgVersion() eq PG_VERSION_94)
{
$self->testResult(sub {$oAchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
$self->testResult(sub {$oArchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
PG_VERSION_95)}, true, 'archive upgrade forced with pg mismatch');
$self->testResult(sub {$oBackupInfo->test(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_DB_VERSION, undef,
PG_VERSION_95)}, true, 'backup upgrade forced with pg mismatch');
}
else
{
$self->testResult(sub {$oAchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
$self->testResult(sub {$oArchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
PG_VERSION_94)}, true, 'archive create forced with pg mismatch in prep for stanza-upgrade');
$self->testResult(sub {$oBackupInfo->test(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_DB_VERSION, undef,
PG_VERSION_94)}, true, 'backup create forced with pg mismatch in prep for stanza-upgrade');
@@ -360,9 +360,9 @@ sub run
$oHostBackup->stanzaUpgrade('upgrade stanza files online');
# Reread the info files and confirm the result
$oAchiveInfo = new pgBackRest::Archive::Info(storageRepo()->pathGet('archive/' . $self->stanza()));
$oArchiveInfo = new pgBackRest::Archive::Info(storageRepo()->pathGet('archive/' . $self->stanza()));
$oBackupInfo = new pgBackRest::Backup::Info(storageRepo()->pathGet('backup/' . $self->stanza()));
$self->testResult(sub {$oAchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
$self->testResult(sub {$oArchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
$self->pgVersion())}, true, 'archive upgrade online corrects db');
$self->testResult(sub {$oBackupInfo->test(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_DB_VERSION, undef,
$self->pgVersion())}, true, 'backup upgrade online corrects db');
@@ -408,7 +408,7 @@ sub run
# Enabled async archiving
$oHostBackup->configUpdate({&CFGDEF_SECTION_GLOBAL => {cfgOptionName(CFGOPT_ARCHIVE_ASYNC) => 'y'}});
# Kick out a bunch of archive logs to excercise async archiving. Only do this when compressed and remote to slow it
# Kick out a bunch of archive logs to exercise async archiving. Only do this when compressed and remote to slow it
# down enough to make it evident that the async process is working.
if ($bTestExtra && $bCompress && $strBackupDestination eq HOST_BACKUP)
{
@@ -519,7 +519,7 @@ sub run
$oHostDbStandby->check('verify check command on standby');
}
# Shutdown the stanby before creating tablespaces (this will error since paths are different)
# Shutdown the standby before creating tablespaces (this will error since paths are different)
$oHostDbStandby->clusterStop({bIgnoreLogError => true});
}
@@ -600,7 +600,7 @@ sub run
}
# Start a backup so the next backup has to restart it. This test is not required for PostgreSQL >= 9.6 since backups
# are run in non-exlusive mode.
# are run in non-exclusive mode.
if ($bTestLocal && $oHostDbMaster->pgVersion() >= PG_VERSION_93 && $oHostDbMaster->pgVersion() < PG_VERSION_96)
{
$oHostDbMaster->sqlSelectOne("select pg_start_backup('test backup that will cause an error', true)");
@@ -996,7 +996,7 @@ sub run
#---------------------------------------------------------------------------------------------------------------------------
if ($bTestExtra && !$bS3 && $bHostBackup)
{
# With stanza-delete --force, allow stanza to be deleted regardless of accessiblility of database host
# With stanza-delete --force, allow stanza to be deleted regardless of accessibility of database host
if ($bHostBackup)
{
$oHostDbMaster->stop();