- Notifications
You must be signed in to change notification settings - Fork28
Commitf65eced
committed
pg_waldump: Fix invalid option handling
Previously, running pg_waldump with an invalid option (pg_waldump--foo) would print the help output and exit successfully. This wasbecause it tried to process the option letter '?' as a normal option,but that letter is used by getopt() to report an invalid option.To fix, process help and version options separately, like we doeverywhere else. Also add a basic test suite for pg_waldump and runthe basic option handling tests, which would have caught this.1 parentcd96389 commitf65eced
File tree
4 files changed
+34
-9
lines changed- src/bin/pg_waldump
- t
4 files changed
+34
-9
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| 5 | + | |
| 6 | + | |
| 7 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
806 | 806 |
| |
807 | 807 |
| |
808 | 808 |
| |
| 809 | + | |
809 | 810 |
| |
810 | 811 |
| |
811 | 812 |
| |
| |||
844 | 845 |
| |
845 | 846 |
| |
846 | 847 |
| |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
847 | 862 |
| |
848 | 863 |
| |
849 | 864 |
| |
| |||
869 | 884 |
| |
870 | 885 |
| |
871 | 886 |
| |
872 |
| - | |
| 887 | + | |
873 | 888 |
| |
874 | 889 |
| |
875 | 890 |
| |
| |||
889 | 904 |
| |
890 | 905 |
| |
891 | 906 |
| |
892 |
| - | |
893 |
| - | |
894 |
| - | |
895 |
| - | |
896 | 907 |
| |
897 | 908 |
| |
898 | 909 |
| |
| |||
947 | 958 |
| |
948 | 959 |
| |
949 | 960 |
| |
950 |
| - | |
951 |
| - | |
952 |
| - | |
953 |
| - | |
954 | 961 |
| |
955 | 962 |
| |
956 | 963 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + |
0 commit comments
Comments
(0)