`check-generated.sh` tests the dencoder of a class by:
ceph-dencoder type rgw_log_entry select_test 2 dump_json > /tmp/foo
ceph-dencoder type rgw_log_entry select_test 2 encode decode dump_json > /tmp/bar
cmp /tmp/foo /tmp/bar
but the second test instance created by
`rgw_log_entry::generate_test_instances` is created using the default
constructor of `rgw_log_entry`. if any of the member variable is created
using random bits in the heap, there is chance that the test fails like:
2 rgw_log_entry
/tmp/typ-l5omDhmDf /tmp/typ-4aoRVkoiV differ: char 315, line 15
**** rgw_log_entry test 2 dump_json check failed ****
ceph-dencoder type rgw_log_entry select_test 2 dump_json > /tmp/typ-l5omDhmDf
ceph-dencoder type rgw_log_entry select_test 2 encode decode dump_json > /tmp/typ-4aoRVkoiV
15c15
< "obj_size":
809908640,
---
> "obj_size":
1122974112,
Signed-off-by: Kefu Chai <kchai@redhat.com>
string uri;
string http_status;
string error_code;
- uint64_t bytes_sent;
- uint64_t bytes_received;
- uint64_t obj_size;
+ uint64_t bytes_sent = 0;
+ uint64_t bytes_received = 0;
+ uint64_t obj_size = 0;
Clock::duration total_time{};
string user_agent;
string referrer;