]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/rgw_dencoder: set identity_type when creating samples
authorKefu Chai <kchai@redhat.com>
Mon, 16 Aug 2021 08:01:42 +0000 (16:01 +0800)
committerKefu Chai <tchaikov@gmail.com>
Thu, 1 Sep 2022 17:08:25 +0000 (01:08 +0800)
commit230be0fc97128c8ecbcbcec51e8a80ec5e5ec7b5
treec228d67d79032a2a46656c2e2ab1dd3cc48f48ba
parent3808a34859d0e0a811804b3be2eadd375061601e
rgw/rgw_dencoder: set identity_type when creating samples

otherwise identity_type is a random number on stack. and there is good
chance that it does not match with the one decoded from the encoded
blob.

this change should address the failures like:

**** rgw_log_entry test 2 binary reencode check failed ****
   ceph-dencoder type rgw_log_entry select_test 2 encode export /tmp/typ-O8hVYK2Gb
   ceph-dencoder type rgw_log_entry select_test 2 encode decode encode export /tmp/typ-G09itHHIC
   cmp /tmp/typ-O8hVYK2Gb /tmp/typ-G09itHHIC

The following tests FAILED:
132 - check-generated.sh (Failed)
..

Fixes: https://tracker.ceph.com/issues/52278
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 22095f4bd831f0d736ba364ea9e46febe06576f9)
src/rgw/rgw_dencoder.cc