From: J. Eric Ivancich Date: Tue, 25 Mar 2025 22:10:27 +0000 (-0400) Subject: rgw: fix bug with rgw-gap-list X-Git-Tag: testing/wip-vshankar-testing-20250611.085524-reef-debug~12^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5500bf18372ee046f933901d089ee9a0e8d03e1b;p=ceph-ci.git rgw: fix bug with rgw-gap-list rgw-gap-list would fail if it it reached the end of the second file before the first, thereby causing an infinite loop. Signed-off-by: J. Eric Ivancich Signed-off-by: Michael J. Kidd (cherry picked from commit 0cfbc57d2c43ea88845561f14e295d0d48e44b32) --- diff --git a/src/rgw/rgw-gap-list b/src/rgw/rgw-gap-list index 5018cedd7cb..3dc0e5def2f 100755 --- a/src/rgw/rgw-gap-list +++ b/src/rgw/rgw-gap-list @@ -400,9 +400,12 @@ BEGIN { f1_count++ if(f2_eof==0) { if(test_lines()==2) { - while ($1>b[1]) { + while ($1>b[1] && !f2_eof) { advance_f2() } + if (f2_eof) { + line_out() + } test_lines() } } else {