- Notifications
You must be signed in to change notification settings - Fork5
Commit31a8b77
committed
Improve pg_dump regression tests and code coverage
These improvements bring the lines-of-code coverage of pg_dump.c up to87.7% (at least using LCOV 1.12, 1.11 seems to differ slightly). Nearlyevery function is covered, three of the four which aren't are onlycalled when talking to older PG instances.There is more which can, and should, be done here to improve thecoverage but it's past time to see what the buildfarm thinks of this.What has been added:- Coverage for many more command-line options- Use command_fails_like instead of command_exit_is- Operator classes, operator families- Text search configuration, templates, parsers, dictionaries- FDWs, servers, foreign tables- Materialized views- Improved Publications / Subscriptions test (though this needs work, see PG10 open items and tests marked with XXX in 002_pg_dump.pl)- Unlogged tables- Partitioned tables- Additional ACL testing for various object typesThere is room for improvement, specifically:- Various type-based option (alignment, storage, etc)- Composite type collation- Extra Procedural language functions (inline, validator)- Different function options (SRF, Transform, config, security definer, cost, leakproof)- OpClass options (default, storage, order by, recheck)- OpFamily options (order by, recheck)- Aggregate functions (combinefunc, serialfunc, deserialfunc, etc)- Text Search parser 'headline'- Text Search template 'init'- FDW options (handler, validator, options)- Server options (type, version, options)- User mapping options- Default ACLs for sequences, types- Security labels- View circular dependencies (last function that needs coverage)- Toast table autovacuum options- Replica identity options- Independent indexes (plus marking them as clustered on)- Deferrable / initially deferred constraints- Independent domain constraintsThere's bits of extension pg_dump'ing also not covered, but those willneed to go into test_pg_dump (such as having a filter for configtables).Last, but not least, this approximately halves the number of tests runwith 'ok()' by removing the ok()-based checking of if all runs arecovered by each test. Instead, 002_pg_dump.pl will just exit out insuch a case (with a message in the log file). In general, when addingtests, cover all runs unless there is a very good reason not to (such asadding a 'catch-all' case). With these changes, the resulting outputand number of "tests" run is actually reduced.1 parent164bdbe commit31a8b77
2 files changed
+3340
-561
lines changedLines changed: 85 additions & 43 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 |
| - | |
32 |
| - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 |
| |
34 |
| - | |
35 |
| - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 |
| |
37 |
| - | |
38 |
| - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 |
| |
40 |
| - | |
| 46 | + | |
41 | 47 |
| |
42 |
| - | |
| 48 | + | |
43 | 49 |
| |
44 | 50 |
| |
45 | 51 |
| |
46 |
| - | |
| 52 | + | |
47 | 53 |
| |
48 |
| - | |
| 54 | + | |
49 | 55 |
| |
50 | 56 |
| |
51 | 57 |
| |
52 |
| - | |
53 |
| - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
54 | 61 |
| |
55 | 62 |
| |
56 |
| - | |
| 63 | + | |
57 | 64 |
| |
58 |
| - | |
| 65 | + | |
59 | 66 |
| |
60 | 67 |
| |
61 |
| - | |
| 68 | + | |
62 | 69 |
| |
63 |
| - | |
| 70 | + | |
64 | 71 |
| |
65 | 72 |
| |
66 |
| - | |
| 73 | + | |
67 | 74 |
| |
68 |
| - | |
| 75 | + | |
69 | 76 |
| |
70 | 77 |
| |
71 | 78 |
| |
72 |
| - | |
73 |
| - | |
74 |
| - | |
75 |
| - | |
76 |
| - | |
77 |
| - | |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
82 | 110 |
| |
83 |
| - | |
| 111 | + | |
84 | 112 |
| |
85 | 113 |
| |
86 |
| - | |
87 |
| - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
88 | 128 |
| |
89 | 129 |
| |
90 |
| - | |
| 130 | + | |
91 | 131 |
| |
92 |
| - | |
93 |
| - | |
| 132 | + | |
| 133 | + | |
94 | 134 |
| |
95 | 135 |
| |
96 |
| - | |
| 136 | + | |
97 | 137 |
| |
98 |
| - | |
99 |
| - | |
| 138 | + | |
| 139 | + | |
100 | 140 |
| |
101 | 141 |
| |
102 |
| - | |
| 142 | + | |
103 | 143 |
| |
104 |
| - | |
105 |
| - | |
| 144 | + | |
| 145 | + | |
106 | 146 |
| |
107 | 147 |
| |
108 |
| - | |
109 |
| - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + |
0 commit comments
Comments
(0)