David Steele
c1ab7b3c98
Start work on C handle io object and use it to output help.
2018-03-25 11:39:24 -04:00
David Steele
dabf727d91
Include VM type in gcov path to avoid conflicts between VMs with different architectures.
2018-03-21 16:08:08 -04:00
David Steele
07f38f584a
Use lcov for C unit test coverage reporting.
...
Switch from Devel::Cover because it would not report on branch coverage for reports converted from gcov.
Branch coverage is not complete, so for the time being errors will only be generated when statement coverage is not complete. Coverage of unit tests is not displayed in the report unless they are incomplete for either statement or branch coverage.
2018-03-19 23:33:28 -04:00
Cynthia Shang
f0a4264f77
Fix manifest test in the check command when tablespaces are present.
...
Fixed by Cynthia Shang.
Reported by Thomas Flatley.
2018-03-19 19:54:03 -04:00
David Steele
0c313713b1
Use clang for static code analysis during lint testing.
...
Nothing found except for some functions that should have been marked __noreturn__.
2018-03-18 13:32:19 -04:00
David Steele
f0451c1494
Enable -Wformat=2 and -Wformat-nonliteral and silence new warnings.
2018-03-15 13:53:03 -04:00
David Steele
dd3ce70810
Config test code writes secure options to a file instead of passing on the command-line.
2018-03-15 11:09:46 -04:00
David Steele
4b6cd92a4c
Improve debugging.
...
* Replace remaining NDEBUG blocks with the more granular DEBUG_UNIT.
* Remove some debug memset() calls in MemContext since valgrind is more useful for these checks.
2018-03-12 17:15:14 -04:00
David Steele
cced6ec03a
Add ASSERT_DEBUG() macro for debugging.
...
Replace all current assert() calls except in tests that can't use the debug code.
2018-03-12 14:31:22 -04:00
David Steele
03f1082e86
Improve logging.
...
Move command begin to C except when it must be called after another command in Perl (e.g. expire after backup). Command begin logs correctly for complex data types like hash and list. Specify which commands will log to file immediately and set the default log level for log messages that are common to all commands. File logging is initiated from C.
2018-03-12 11:03:38 -04:00
David Steele
94494a632f
Update pip before installing awscli.
2018-03-12 11:02:46 -04:00
David Steele
f047cd0dfd
Improve code generation performance.
2018-03-09 23:00:20 -05:00
David Steele
919635b6f4
Set config before Main::main() call to avoid secrets being exposed in a stack trace.
2018-03-08 16:24:16 -05:00
David Steele
e331564c90
Add new test for Common::Io::Process.
...
Show that output on stderr will raise an exception on close() even if the exit code is 0.
2018-03-08 12:36:55 -05:00
Cynthia Shang
45ffe37e4f
Add cfgOptionTest().
...
Update cfgOption() calls that are better implemented as cfgOptionTest().
Contributed by Cynthia Shang.
2018-03-05 18:51:48 -05:00
David Steele
406acf9cba
Enable -Wconversion and silence new warnings.
2018-03-02 12:07:12 -05:00
David Steele
5b491b3035
Add CentOS/RHEL package builds.
2018-02-26 19:32:27 -05:00
David Steele
64a7196cb6
Rename retention-* options to repo-retention-*.
2018-02-19 15:07:24 -05:00
David Steele
9070325760
Improve performance of HTTPS client.
...
Buffering now takes the pending bytes on the socket into account (when present) rather than relying entirely on select(). In some instances the final bytes would not be flushed until the connection was closed.
2018-02-18 14:53:27 -05:00
David Steele
72cbb9a9d4
Call Perl with built-in interpreter instead of execvp().
...
Exec'ing Perl worked fine but generated a very large command line in the process list and potentially exposed secrets.
2018-02-14 17:19:54 -05:00
David Steele
5f2884cb29
Suppress coverage failures for Archive/Push/Async on Travis.
...
The coverage report shows some code as never being run -- but that makes no sense because the tests pass. This may be due to trying to combine the C and Perl coverage reports and overwriting some runs.
Suppress for now with a plan to implement LCOV for the C unit tests.
2018-02-14 16:46:52 -05:00
David Steele
a907fd7d2d
Build C binary/library for C unit tests that require Perl.
2018-02-14 10:33:21 -05:00
David Steele
fda62dfc48
Move Perl option JSON generation to a new module.
...
Linking exec.c into LibC will not be an option once the perl exec loads the Perl interpreter.
2018-02-14 09:49:01 -05:00
David Steele
5242e8eec5
Generate suppressions when running Valgrind.
...
This makes it easier to suppress errors that are only occurring on Travis.
2018-02-14 09:18:27 -05:00
David Steele
305a3e1761
Add int64 variant type.
2018-02-09 13:52:02 -05:00
David Steele
1659598cfe
Create a master list of errors in build/error.yaml.
...
The C and Perl errors lists are created automatically by Build.pm so they stay up to date.
2018-02-08 16:11:47 -05:00
David Steele
eba31fbfe5
Update URL for Debian package repository.
2018-02-08 14:49:35 -05:00
David Steele
7d13087c4b
Rename -no to -reset for non-boolean options.
2018-02-06 11:26:06 -05:00
David Steele
c3f47bf240
Move config parsing out of Perl tests.
...
cfgParseTest() is provided in the C library for parsing configs in unit tests.
2018-02-05 12:32:30 -05:00
David Steele
be90028100
Rename db-* options to pg-* and backup-* options to repo-* to improve consistency.
...
* repo-* options are now indexed although only one is allowed.
* List deprecated option names in documentation and command-line help.
2018-02-03 18:27:38 -05:00
Cynthia Shang
dc73abdb6e
Improve stanza-create command so that it does not error when the stanza already exists.
...
Contributed by Cynthia Shang.
2018-02-01 14:12:03 -05:00
Cynthia Shang
bacc08792d
Ensure latest db-id is selected on when matching archive.info to backup.info.
...
This provides correct matching in the event there are system-id and db-version duplicates (e.g. after reverting a pg_upgrade).
Fixed by Cynthia Shang.
Reported by Adam K. Sumner.
2018-01-30 16:49:47 -05:00
Cynthia Shang
00f58ec8c0
Fixed inability to restore a single database contained in a tablespace using --db-include.
...
Fixed by Cynthia Shang.
2018-01-30 16:13:54 -05:00
David Steele
a91a648019
Config parsing no longer implemented in Perl.
...
Options are passed to Perl as JSON from the C process.
2018-01-28 21:37:09 -05:00
David Steele
f0ef1dee05
Improve speed of C unit tests.
...
Preserve object files between tests and use a Makefile to avoid rebuilding object files.
2018-01-26 16:41:17 -05:00
David Steele
b58a45e067
Implement help command in C.
2018-01-23 13:34:24 -05:00
David Steele
404ec30d03
Move Perl help test to real module.
2018-01-23 12:58:35 -05:00
David Steele
2afb73da1c
Improve String, StringList, and List objects.
...
* Add strCmp*() and strFirst*() to String.
* Add strLstSort() and strLstNewSplitSize() to StringList.
* Add strLstNewSplitZ() to StringList a update calls to strLstNewSplit() as needed.
* Add lstSort to List.
2018-01-23 12:17:30 -05:00
David Steele
2cc9b2287b
The archive-push command is now partially coded in C.
...
This allows the PostgreSQL archive_command to run significantly faster when processing status messages from the asynchronous archive process.
2018-01-17 15:52:00 -05:00
David Steele
7c73f4f6c9
Add command and exit modules.
2018-01-17 09:15:51 -05:00
David Steele
39cb971afb
Add log module.
2018-01-16 13:52:20 -05:00
David Steele
eb452c8add
Improvements to Storage object.
...
* storagePath() and storageList() commands
* Helper functions for local and spool storag
2018-01-16 13:38:37 -05:00
David Steele
8f81620b9f
Improve error module.
...
Add functions to convert error codes to C errors and handle system errors.
2018-01-16 13:29:27 -05:00
David Steele
d633417e5d
Add Wait object and time module.
2018-01-16 13:05:00 -05:00
David Steele
721d1127a0
Add RegExp object.
2018-01-16 12:57:23 -05:00
David Steele
83ddd75d82
Improvements to String object.
...
* Add strBeginsWith(), strEndsWith(), strEq(), and strBase().
* Enable compiler type checking for strNewFmt() and strCatFmt().
* Rename strNewSzN() to strNewN().
2018-01-16 12:47:08 -05:00
David Steele
d992851456
Rename Perl tests so they don't conflict with their C counterparts.
2018-01-16 12:36:22 -05:00
Cynthia Shang
0e9ba98a50
Add stanza-delete command to cleanup unused stanzas.
...
Contributed by Cynthia Shang.
2018-01-03 12:23:33 -05:00
David Steele
526acca5bd
Config parsing implemented in C.
2017-12-22 23:27:49 -05:00
David Steele
d8c575801d
Add Ini object.
2017-12-22 22:55:17 -05:00