Linux 5.15 and later include new media csi drivers. Rename the test files to be a bit more descriptive. we test raw i2c communication in test_cameras_i2c.py and test the (new) media control and v4l2 interface in test_cameras_api.py.
and yes, this looks like it randomly tests that analogue_gain is available. That control is random, it should rather test that there is valid data output from that call. The long way of doing the v4l2-ctl call is:
media-ctl -d "platform:30b80000.csi" --entity "S5K3L6-CIS 3-002d" /dev/v4l-subdev2 v4l2-ctl -d /dev/v4l-subdev2 --all
and that is possible in one go in v4l2-ctl now, but requires all new drivers to be set up correctly.