BA is probably the only Airline that makes it crystal clear as per the table attached
. For example Cathay states that mileage credit is for Sri Lankan flights marketed and operated by Sri Lankan. Although Cathay FF also partner with Gulf, it is not clear if the flights marketed by other airlines would be eligible. It says some flights or fares are not eligible incl. certain codeshares.