1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-02-03 13:21:32 +02: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

@ -481,7 +481,7 @@ use constant CFGDEF_LOG_FILE => 'log-file
# Defines the log level to use for default messages that are output for every command. For example, the log message that lists all
# the options passed is usually output at the info level, but that might not be appropriate for some commands, such as info. Allow
# the log level to be lowered so these common messages will not be emmitted where they might be distracting.
# the log level to be lowered so these common messages will not be emitted where they might be distracting.
use constant CFGDEF_LOG_LEVEL_DEFAULT => 'log-level-default';
push @EXPORT, qw(CFGDEF_LOG_LEVEL_DEFAULT);

View File

@ -489,7 +489,7 @@ sub manGet
{
my $hOption = $$hOptionList{$strSection}{$strOption};
# Contruct the default
# Construct the default
my $strCommand = grep(/$strSection/i, cfgDefineCommandList()) ? $strSection : undef;
my $strDefault = docConfigOptionDefault($strOption, $strCommand);

View File

@ -208,7 +208,7 @@ eval
$oStorageDoc->put("${strDocPath}/resource/git-history.cache", "[\n${strGitLog}\n]\n");
# Generate coverage summmary
# Generate coverage summary
&log(INFO, "Generate Coverage Summary");
executeTest(
"${strTestExe} --no-package --no-valgrind --no-optimize --vm-max=3 --coverage-summary",

View File

@ -229,7 +229,7 @@
br-setting|pg-option|pg-setting|link|user|proper)*>
<!-- Formatted elements -->
<!-- adminition type can be note, important, warning, caution and tip -->
<!-- admonition type can be note, important, warning, caution and tip -->
<!ELEMENT admonition ANY>
<!ATTLIST admonition type CDATA #REQUIRED>
<!ELEMENT summary (#PCDATA|quote|b|i|ul|ol|id|code|code-block|host|file|path|cmd|setting|exe|backrest|postgres|br-option|

View File

@ -415,7 +415,7 @@ sub reconstruct
"\nHINT: Is or was the repo encrypted?", ERROR_CRYPTO);
}
# If the file is encrypted, then the passprase from the info file is required, else getEncryptionKeySub returns undefined
# If the file is encrypted, then the passphrase from the info file is required, else getEncryptionKeySub returns undefined
my $oFileIo = storageRepo()->openRead(
$strArchiveFilePath,
{rhyFilter => $strArchiveFile =~ ('\.' . COMPRESS_EXT . '$') ?

View File

@ -516,7 +516,7 @@ sub process
# Load the backup.info
my $oBackupInfo = new pgBackRest::Backup::Info($oStorageRepo->pathGet(STORAGE_REPO_BACKUP));
# Get passphrase to open manifest (undefined if repo not encrypted) and intialize passphrase variable for backup files
# Get passphrase to open manifest (undefined if repo not encrypted) and initialize passphrase variable for backup files
my $strCipherPassManifest = $oBackupInfo->cipherPassSub();
my $strCipherPassBackupSet;
@ -809,7 +809,7 @@ sub process
# If this is an offline backup
if (!cfgOption(CFGOPT_ONLINE))
{
# If checksum-page is not explictly enabled then disable it. Even if the version is high enough to have checksums we can't
# If checksum-page is not explicitly enabled then disable it. Even if the version is high enough to have checksums we can't
# know if they are enabled without asking the database. When pg_control can be reliably parsed then this decision could be
# based on that.
if (!cfgOptionTest(CFGOPT_CHECKSUM_PAGE))
@ -920,7 +920,7 @@ sub process
&log(WARN, "aborted backup ${strBackupLabel} of same type exists, will be cleaned to remove invalid files and resumed");
&log(TEST, TEST_BACKUP_RESUME);
# Clean the backup path before resuming. The delta option may have changed from false to true during the reseume clean
# Clean the backup path before resuming. The delta option may have changed from false to true during the resume clean
# so set it to the result.
cfgOptionSet(CFGOPT_DELTA, $self->resumeClean($oStorageRepo, $strBackupLabel, $oBackupManifest, $oAbortedManifest,
cfgOption(CFGOPT_ONLINE), cfgOption(CFGOPT_DELTA), $strTimelineCurrent, $strTimelineAborted));

View File

@ -56,7 +56,7 @@ sub backupRegExpGet
confess &log(ASSERT, 'at least one backup type must be selected');
}
# Standard regexp to match date and time formattting
# Standard regexp to match date and time formatting
my $strDateTimeRegExp = "[0-9]{8}\\-[0-9]{6}";
# Start the expression with the anchor if requested, date/time regexp and full backup indicator
my $strRegExp = ($bAnchor ? '^' : '') . $strDateTimeRegExp . 'F';

View File

@ -193,7 +193,7 @@ sub new
####################################################################################################################################
# validate
#
# Comfirm the file exists and reconstruct as necessary.
# Confirm the file exists and reconstruct as necessary.
####################################################################################################################################
sub validate
{
@ -1018,7 +1018,7 @@ sub confirmDb
# If the db-id for the backup exists in the list
if (exists $hDbList->{$iDbHistoryId})
{
# If the version and system-id match then datbase is confirmed for the backup
# If the version and system-id match then database is confirmed for the backup
if (($hDbList->{$iDbHistoryId}{&INFO_DB_VERSION} eq $strDbVersion) &&
($hDbList->{$iDbHistoryId}{&INFO_SYSTEM_ID} eq $ullDbSysId))
{

View File

@ -69,7 +69,7 @@ sub process
# Get the master database object to test to see if the manifest can be built
my ($oDb) = dbMasterGet();
# Get the databse version to pass to the manifest constructor and the system-id in the event of a failure
# Get the database version to pass to the manifest constructor and the system-id in the event of a failure
my ($strDbVersion, $iControlVersion, $iCatalogVersion, $ullDbSysId) = $oDb->info();
# Turn off console logging to control when to display the error
@ -84,7 +84,7 @@ sub process
{
eval
{
# Passing file location dev/null so that the save will fail if it is ever attempted. Pass a miscellaneus value for
# Passing file location dev/null so that the save will fail if it is ever attempted. Pass a miscellaneous value for
# encryption key since the file will not be saved.
my $oBackupManifest = new pgBackRest::Manifest("/dev/null/manifest.chk",
{bLoad => false, strDbVersion => $strDbVersion, iDbCatalogVersion => $iCatalogVersion,

View File

@ -1,5 +1,5 @@
####################################################################################################################################
# Process Excecution, Management, and IO
# Process Execution, Management, and IO
####################################################################################################################################
package pgBackRest::Common::Io::Process;
use parent 'pgBackRest::Common::Io::Filter';

View File

@ -746,7 +746,7 @@ sub log
# }
}
# If in test mode and this is a test messsage then delay so the calling process has time to read the message
# If in test mode and this is a test message then delay so the calling process has time to read the message
if ($bTest && $strLevel eq TEST && $fTestDelay > 0)
{
usleep($fTestDelay * 1000000);

View File

@ -385,7 +385,7 @@ sub cfgCommandWrite
my $oValue;
my $bMulti = false;
# If this is a hash then it will break up into multple command-line options
# If this is a hash then it will break up into multiple command-line options
if (ref($oOption{$strOption}{value}) eq 'HASH')
{
$oValue = $oOption{$strOption}{value};

View File

@ -558,7 +558,7 @@ sub backupStart
my $bChecksumPage =
$self->executeSqlOne("select count(*) = 1 from pg_settings where name = 'data_checksums' and setting = 'on'");
# If checksum page option is not explictly set then set it to whatever the database says
# If checksum page option is not explicitly set then set it to whatever the database says
if (!cfgOptionTest(CFGOPT_CHECKSUM_PAGE))
{
cfgOptionSet(CFGOPT_CHECKSUM_PAGE, $bChecksumPage);

View File

@ -191,7 +191,7 @@ sub main
# ------------------------------------------------------------------------------------------------------------------------------
or do
{
# Perl 5.10 seems to have a problem propogating errors up through a large call stack, so in the case that the error arrives
# Perl 5.10 seems to have a problem propagating errors up through a large call stack, so in the case that the error arrives
# blank just use the last logged error instead. Don't do this in all cases because newer Perls seem to work fine and there
# are other errors that could be arriving in $EVAL_ERROR.
my $oException = defined($EVAL_ERROR) && length($EVAL_ERROR) > 0 ? $EVAL_ERROR : logErrorLast();

View File

@ -898,7 +898,7 @@ sub build
# If version is greater than 9.0, check for files to exclude
if ($self->dbVersion() >= PG_VERSION_90 && $hManifest->{$strName}{type} eq 'f')
{
# Get the directory name from the manifest; it will be used later to seach for existence in the keys
# Get the directory name from the manifest; it will be used later to search for existence in the keys
my $strDir = dirname($strName);
# If it is a database data directory (base or tablespace) then check for files to skip
@ -1421,7 +1421,7 @@ sub buildDefault
####################################################################################################################################
# validate
#
# Checks for any mising values or inconsistencies in the manifest.
# Checks for any missing values or inconsistencies in the manifest.
####################################################################################################################################
sub validate
{

View File

@ -63,7 +63,7 @@ sub new
####################################################################################################################################
# reset
#
# Reset to inital state.
# Reset to initial state.
####################################################################################################################################
sub reset
{

View File

@ -581,7 +581,7 @@ sub clean
next;
}
# The presense of any other file will cause an error (unless --force or --delta specified)
# The presence of any other file will cause an error (unless --force or --delta specified)
if (!$bDelta)
{
confess &log(ERROR, "cannot restore to path '${$self->{oTargetPath}}{$strTarget}' that contains files - " .

View File

@ -991,7 +991,7 @@ sub encrypted
}
####################################################################################################################################
# encryptionValid - determine if encyption set properly based on the value passed
# encryptionValid - determine if encryption set properly based on the value passed
####################################################################################################################################
sub encryptionValid
{

View File

@ -92,7 +92,7 @@ Core context handling macros, only intended to be called from other macros
TRY_END();
/***********************************************************************************************************************************
Simplifies creation of the memory context in contructors and includes error handling
Simplifies creation of the memory context in constructors and includes error handling
***********************************************************************************************************************************/
#define MEM_CONTEXT_XS_NEW_BEGIN(contextName) \
{ \

View File

@ -169,7 +169,7 @@ cmdArchiveGet(void)
// A move will be attempted but if the spool queue and the WAL path are on different file systems then a copy
// will be performed instead.
//
// It looks scary that we are disabling syncs and atomicity (in case we need to copy intead of move) but this
// It looks scary that we are disabling syncs and atomicity (in case we need to copy instead of move) but this
// is safe because if the system crashes Postgres will not try to reuse a restored WAL segment but will instead
// request it again using the restore_command. In the case of a move this hardly matters since path syncs are
// cheap but if a copy is required we could save a lot of writes.

View File

@ -9,7 +9,7 @@ Common Functions and Definitions for Backup and Expire Commands
#include "common/type/string.h"
/***********************************************************************************************************************************
Backup type enum and contants
Backup type enum and constants
***********************************************************************************************************************************/
typedef enum
{

View File

@ -361,7 +361,7 @@ removeExpiredArchive(InfoBackup *infoBackup)
for (unsigned int archiveIdx = 0; archiveIdx < strLstSize(listArchiveDisk); archiveIdx++)
{
// Is there an archive directory for this archvieId? If not, move on to the next.
// Is there an archive directory for this archiveId? If not, move on to the next.
if (strCmp(archiveId, strLstGet(listArchiveDisk, archiveIdx)) != 0)
continue;

View File

@ -317,7 +317,7 @@ stanzaInfoList(const String *stanza, StringList *stanzaList)
}
CATCH(CryptoError)
{
// If a reason for the error is due to a an ecryption error, add a hint
// If a reason for the error is due to a an encryption error, add a hint
THROW_FMT(
CryptoError,
"%s\n"

View File

@ -108,7 +108,7 @@ stanzaDelete(const Storage *storageRepoWriteStanza, const StringList *archiveLis
manifestDelete(storageRepoWriteStanza);
}
// Recusively remove the entire stanza repo if exists. S3 will attempt to remove even if not.
// Recursively remove the entire stanza repo if exists. S3 will attempt to remove even if not.
if (archiveList != NULL)
storagePathRemoveP(storageRepoWriteStanza, STRDEF(STORAGE_REPO_ARCHIVE), .recurse = true);

View File

@ -7,7 +7,7 @@ Assert Routines
#include "common/error.h"
/***********************************************************************************************************************************
Asserts are used in test code to ensure that certain conditions are true. They are ommitted from production builds.
Asserts are used in test code to ensure that certain conditions are true. They are omitted from production builds.
***********************************************************************************************************************************/
#ifndef NDEBUG
#define ASSERT(condition) \

View File

@ -315,7 +315,7 @@ errorInternalTry(const char *fileName, const char *functionName, int fileLine)
}
/***********************************************************************************************************************************
Propogate the error up so it can be caught
Propagate the error up so it can be caught
***********************************************************************************************************************************/
void
errorInternalPropagate(void)
@ -368,7 +368,7 @@ errorInternalProcess(bool catch)
// Remove the try
errorContext.tryTotal--;
// If not caught in the last try then propogate
// If not caught in the last try then propagate
if (errorContext.tryList[errorContext.tryTotal + 1].uncaught)
errorInternalPropagate();
@ -403,7 +403,7 @@ errorInternalThrow(const ErrorType *errorType, const char *fileName, const char
errorContext.error.stackTrace = (const char *)stackTraceBuffer;
// Propogate the error
// Propagate the error
errorInternalPropagate();
}

View File

@ -61,7 +61,7 @@ struct HttpClient
String *responseMessage; // Response message e.g. (OK, Not Found)
HttpHeader *responseHeader; // Response headers
bool contentChunked; // Is the reponse content chunked?
bool contentChunked; // Is the response content chunked?
uint64_t contentSize; // Content size (ignored for chunked)
uint64_t contentRemaining; // Content remaining (per chunk if chunked)
bool closeOnContentEof; // Will server close after content is sent?
@ -389,7 +389,7 @@ httpClientRequest(
bool contentExists = (this->contentChunked || this->contentSize > 0) && !strEq(verb, HTTP_VERB_HEAD_STR);
this->contentEof = !contentExists;
// If all content should be returned from this function then read the buffer. Also read the reponse if there has
// If all content should be returned from this function then read the buffer. Also read the response if there has
// been an error.
if (returnContent || !httpClientResponseCodeOk(this))
{

View File

@ -3,7 +3,7 @@ Http Client
A robust HTTP client with pipelining support and automatic retries.
Using a single object to make multiple requests is more efficient because requests are piplelined whenever possible. Requests are
Using a single object to make multiple requests is more efficient because requests are pipelined whenever possible. Requests are
automatically retried when the connection has been closed by the server. Any 5xx response is also retried.
Only the HTTPS protocol is currently supported.

View File

@ -153,7 +153,7 @@ tlsClientNew(
// -------------------------------------------------------------------------------------------------------------------------
cryptoInit();
// Select the TLS method to use. To maintain compatability with older versions of OpenSSL we need to use an SSL method,
// Select the TLS method to use. To maintain compatibility with older versions of OpenSSL we need to use an SSL method,
// but SSL versions will be excluded in SSL_CTX_set_options().
const SSL_METHOD *method = SSLv23_method();
cryptoError(method == NULL, "unable to load TLS method");

View File

@ -24,7 +24,7 @@ common/object.h has numerous examples of this.
/***********************************************************************************************************************************
If param2 > param1 then assign it to param1
Useful for ensuring coverage in cases where compared values may be always ascending or decending.
Useful for ensuring coverage in cases where compared values may be always ascending or descending.
***********************************************************************************************************************************/
#define MAX_ASSIGN(param1, param2) \
do \

View File

@ -434,7 +434,7 @@ bufSize(const Buffer *this)
Get/set the amount of the buffer actually used
Tracks how much of the buffer has actually been used. This will be updated automatically when possible but if the buffer is
modified by using bufPtr() then the user is reponsible for updating the used size.
modified by using bufPtr() then the user is responsible for updating the used size.
***********************************************************************************************************************************/
size_t
bufUsed(const Buffer *this)

View File

@ -150,7 +150,7 @@ strNewFmt(const char *format, ...)
/***********************************************************************************************************************************
Create a new string from a string with a specific length
The string may or may not be zero-terminated but we'll use that nomeclature since we're not concerned about the end of the string.
The string may or may not be zero-terminated but we'll use that nomenclature since we're not concerned about the end of the string.
***********************************************************************************************************************************/
String *
strNewN(const char *string, size_t size)
@ -713,7 +713,7 @@ strSize(const String *this)
}
/***********************************************************************************************************************************
Trim whitespace from the beginnning and end of a string
Trim whitespace from the beginning and end of a string
***********************************************************************************************************************************/
String *
strTrim(String *this)

View File

@ -22,7 +22,7 @@ typedef struct XmlNodeList XmlNodeList;
#include "common/type/string.h"
/***********************************************************************************************************************************
Document Contructors
Document Constructors
***********************************************************************************************************************************/
XmlDocument *xmlDocumentNew(const String *rootNode);
XmlDocument *xmlDocumentNewBuf(const Buffer *);

View File

@ -242,7 +242,7 @@ Rules:
the config-include-path will be appended and at least one is expected to exist.
- If --no-config is specified and --config-include-path is specified then only *.conf files in the config-include-path will be
loaded; the directory is required.
- If --no-config is specified and --config-path is specified then only *.conf files in the overriden default config-include-path
- If --no-config is specified and --config-path is specified then only *.conf files in the overridden default config-include-path
(<config-path>/conf.d) will be loaded if exist but not required.
- If --no-config is specified and neither --config-include-path nor --config-path are specified then no configs will be loaded.
- If --config-path only, the defaults for config and config-include-path will be changed to use that as a base path but the files
@ -582,7 +582,7 @@ configParse(unsigned int argListSize, const char *argList[], bool resetLogLevel)
if (argFound)
THROW_FMT(CommandRequiredError, "no command found");
// Otherwise set the comand to help
// Otherwise set the command to help
cfgCommandHelpSet(true);
}
@ -932,7 +932,7 @@ configParse(unsigned int argListSize, const char *argList[], bool resetLogLevel)
// If depend not resolved and option value is set on the command-line then error. It's OK to have
// unresolved options in the config file because they may be there for another command. For instance,
// spool-path is only loaded for the archive-push command when archive-async=y, and the presense of
// spool-path is only loaded for the archive-push command when archive-async=y, and the presence of
// spool-path in the config file should not cause an error here, it will just end up null.
if (!dependResolved && optionSet && parseOption->source == cfgSourceParam)
{
@ -1077,7 +1077,7 @@ configParse(unsigned int argListSize, const char *argList[], bool resetLogLevel)
cfgOptionName(optionId));
}
// Make sure there are no occurences of //
// Make sure there are no occurrences of //
if (strstr(strPtr(value), "//") != NULL)
{
THROW_FMT(

View File

@ -82,7 +82,7 @@ infoNew(CipherType cipherType, const String *cipherPassSub)
Info *this = infoNewInternal();
// Cipher used to encrypt/descrypt subsequent dependent files. Value may be NULL.
// Cipher used to encrypt/decrypt subsequent dependent files. Value may be NULL.
if (cipherPassSub != NULL)
this->cipherPass = cipherPassSub;

View File

@ -153,7 +153,7 @@ infoPgNewLoad(
this->historyCurrent = lstSize(this->history);
// Get values that are only in backup and manifest files. These are really vestigial since stanza-create verifies
// the control and catalog versions so there is no good reason to store them. However, for backward compatability
// the control and catalog versions so there is no good reason to store them. However, for backward compatibility
// we must write them at least, even if we give up reading them.
if (type == infoPgBackup || type == infoPgManifest)
{

View File

@ -280,7 +280,7 @@ storageRepoPathExpression(const String *expression, const String *path)
if (strEqZ(expression, STORAGE_REPO_ARCHIVE))
{
// Contruct the base path
// Construct the base path
if (storageHelper.stanza != NULL)
result = strNewFmt(STORAGE_PATH_ARCHIVE "/%s", strPtr(storageHelper.stanza));
else
@ -300,7 +300,7 @@ storageRepoPathExpression(const String *expression, const String *path)
}
else if (strEqZ(expression, STORAGE_REPO_BACKUP))
{
// Contruct the base path
// Construct the base path
if (storageHelper.stanza != NULL)
result = strNewFmt(STORAGE_PATH_BACKUP "/%s", strPtr(storageHelper.stanza));
else

View File

@ -387,7 +387,7 @@ storageMove(const Storage *this, StorageRead *source, StorageWrite *destination)
this->interface.remove(this->driver, storageReadName(source), false);
// Sync source path if the destination path was synced. We know the source and destination paths are different because
// the move did not succeed. This will need updating when drivers other than Posix/CIFS are implemented becaue there's
// the move did not succeed. This will need updating when drivers other than Posix/CIFS are implemented because there's
// no way to get coverage on it now.
if (storageWriteSyncPath(destination))
this->interface.pathSync(this->driver, strPath(storageReadName(source)));

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();

View File

@ -13,7 +13,7 @@ HARNESS_FORK_BEGIN()
// The first parameter is the expected exit code. If the child block does not have an explicit exit then it will automatically
// exit on 0.
//
// The second paramater specifies whether pipes should be setup between the parent and child processes. These can be accessed
// The second parameter specifies whether pipes should be setup between the parent and child processes. These can be accessed
// with the HARNESS_FORK_*() macros;
HARNESS_FORK_CHILD_BEGIN(0, true)
{

View File

@ -159,7 +159,7 @@ Structure for scripting pq responses
***********************************************************************************************************************************/
typedef struct HarnessPq
{
unsigned int session; // Session number when mutliple sessions are run concurrently
unsigned int session; // Session number when multiple sessions are run concurrently
const char *function; // Function call expected
const char *param; // Params expected by the function for verification
int resultInt; // Int result value

View File

@ -156,7 +156,7 @@ parameters.
/* Format the expected result */ \
formatMacro(type, format, TEST_RESULT_resultExpected); \
\
/* Try to run the statement. Assign expected to result to silence compiler warning about unitialized var. */ \
/* Try to run the statement. Assign expected to result to silence compiler warning about uninitialized var. */ \
type TEST_RESULT_result = (type)TEST_RESULT_resultExpected; \
\
TRY_BEGIN() \

View File

@ -166,7 +166,7 @@ testRun(void)
ioWriteOpen(write);
int lockHandle = open(strPtr(strNewFmt("%s/empty" LOCK_FILE_EXT, strPtr(lockPath))), O_RDONLY, 0);
TEST_RESULT_BOOL(lockHandle != -1, true, " file handle aquired");
TEST_RESULT_BOOL(lockHandle != -1, true, " file handle acquired");
TEST_RESULT_INT(flock(lockHandle, LOCK_EX | LOCK_NB), 0, " lock the empty file");
// Let the parent know the lock has been acquired and wait for the parent to allow lock release
@ -223,7 +223,7 @@ testRun(void)
ioWriteOpen(write);
int lockHandle = open(strPtr(strNewFmt("%s/empty" LOCK_FILE_EXT, strPtr(lockPath))), O_RDONLY, 0);
TEST_RESULT_BOOL(lockHandle != -1, true, " file handle aquired");
TEST_RESULT_BOOL(lockHandle != -1, true, " file handle acquired");
TEST_RESULT_INT(flock(lockHandle, LOCK_EX | LOCK_NB), 0, " lock the non-empty file");
// Let the parent know the lock has been acquired and wait for the parent to allow lock release
@ -275,7 +275,7 @@ testRun(void)
ioWriteOpen(write);
TEST_RESULT_BOOL(
lockAcquire(lockPath, cfgOptionStr(cfgOptStanza), 0, 30000, true), true," child process aquires lock");
lockAcquire(lockPath, cfgOptionStr(cfgOptStanza), 0, 30000, true), true," child process acquires lock");
// Let the parent know the lock has been acquired and wait for the parent to allow lock release
ioWriteStrLine(write, strNew(""));
@ -324,7 +324,7 @@ testRun(void)
ioWriteOpen(write);
int lockHandle = open(strPtr(strNewFmt("%s/badpid" LOCK_FILE_EXT, strPtr(lockPath))), O_RDONLY, 0);
TEST_RESULT_BOOL(lockHandle != -1, true, " file handle aquired");
TEST_RESULT_BOOL(lockHandle != -1, true, " file handle acquired");
TEST_RESULT_INT(flock(lockHandle, LOCK_EX | LOCK_NB), 0, " lock the badpid file");
// Let the parent know the lock has been acquired and wait for the parent to allow lock release

View File

@ -800,7 +800,7 @@ testRun(void)
" wal start/stop: n/a\n"
" database size: 0B, backup size: 0B\n"
" repository size: 0B, repository backup size: 0B\n"
,"formatTextDb only backup section (code cverage only)");
,"formatTextDb only backup section (code coverage only)");
}
//******************************************************************************************************************************

View File

@ -294,7 +294,7 @@ testRun(void)
TEST_RESULT_STR(memContextName(memContextCurrent()), "TOP", "context is now top");
// Reset temp mem context after a single interation
// Reset temp mem context after a single interaction
// -------------------------------------------------------------------------------------------------------------------------
MEM_CONTEXT_TEMP_RESET_BEGIN()
{

View File

@ -188,7 +188,7 @@ testRun(void)
}
CATCH(ConfigError)
{
// Ignore the error since we are just testing stack cleaup
// Ignore the error since we are just testing stack cleanup
}
TRY_END();
@ -197,7 +197,7 @@ testRun(void)
}
CATCH(ConfigError)
{
// Ignore the error since we are just testing stack cleaup
// Ignore the error since we are just testing stack cleanup
}
TRY_END();

View File

@ -207,7 +207,7 @@ testRun(void)
"{\"backup-info-size-delta\":1982702,\"backup-prior\":\"20161219-212741F_20161219-212803I\","
"\"backup-reference\":[\"20161219-212741F\",\"20161219-212741F_20161219-212803I\"],"
"\"checksum-page-error\":[1,[4,6]],\"backup-timestamp-start\":1482182951}"))),
"multpile values with array");
"multiple values with array");
TEST_ASSIGN(json, jsonFromKv(keyValue, 0), " kvToJson - sorted, no indent");
TEST_RESULT_STR(strPtr(json),
"{\"backup-info-size-delta\":1982702,\"backup-prior\":\"20161219-212741F_20161219-212803I\","

View File

@ -217,7 +217,7 @@ testRun(void)
"recovery-option=c=d\n",
"config default and doesn't exist, config-include-path passed read");
// config and config-include-path are "default" with files existing. Config file exists in both currrent default and old
// config and config-include-path are "default" with files existing. Config file exists in both current default and old
// default location - old location ignored.
//--------------------------------------------------------------------------------------------------------------------------
parseOptionList[cfgOptConfig].found = false;
@ -330,7 +330,7 @@ testRun(void)
"pg1-host=db\n"
"pg1-path=/path/to/db\n"
"recovery-option=c=d\n",
"config new default exists with files, config-include-path passed, defualt config and config-include-path read");
"config new default exists with files, config-include-path passed, default config and config-include-path read");
// config and config-include-path are "default".
//--------------------------------------------------------------------------------------------------------------------------

View File

@ -437,7 +437,7 @@ testRun(void)
TEST_RESULT_BOOL(storageExistsNP(storageTest, sourceFile), false, "check source file not exists");
TEST_RESULT_BOOL(storageExistsNP(storageTmp, destinationFile), true, "check destination file exists");
// Move across fileystems without syncing the paths
// Move across filesystems without syncing the paths
// -------------------------------------------------------------------------------------------------------------------------
sourceFile = destinationFile;
source = storageNewReadNP(storageTmp, sourceFile);

View File

@ -74,7 +74,7 @@ test.pl [options]
--test execute the specified test in a module
--run execute only the specified test run
--dry-run show only the tests that would be executed but don't execute them
--no-cleanup don't cleaup after the last test is complete - useful for debugging
--no-cleanup don't cleanup after the last test is complete - useful for debugging
--pg-version version of postgres to test (all, defaults to minimal)
--log-force force overwrite of current test log files
--build-only compile the test library / packages and run tests only
@ -316,7 +316,7 @@ eval
confess "Only one --test can be provided when --run is specified";
}
# Set test path if not expicitly set
# Set test path if not explicitly set
if (!defined($strTestPath))
{
$strTestPath = cwd() . '/test';