SIGN IN SIGN UP

libcephsqlite: fix FileSize()/Access() returning wrong error on stat() failure

FileSize() returned SQLITE_NOTFOUND instead of SQLITE_IOERR_FSTAT on a
failed stat(), which Python's sqlite3 module can't map and surfaces as
an unhandled sqlite3.InternalError, crashing the calling mgr module.
Access() had the same gap, silently reporting an existing file as
missing instead of returning an I/O error.

Add cephsqlite_inject_stat_error_probability plus a regression test
that exercises this deterministically.

Fixes: https://tracker.ceph.com/issues/79526
Signed-off-by: Nitzan Mordechai <nmordech@ibm.com>
Assisted-by: IBM-Bob:ClaudeSonnet
N
Nitzan Mordechai committed
3a023c6a6648196c2112843efff91b556e75780b
Parent: 7278b96