It would be good to ensure in MTR that mysql_upgrade works from any recent version of MariaDB.
The task would be to add an upgrade tests to MTR that checks that one can run mysql_upgrade on any version of MariaDB, starting from 5.5, to the current version.
For example, MariaDB 10.5, should run upgrade test on mysql database tables that comes from
5.5, 10.0, 10.1, 10.2, 10.3 and 10.4.
The main focus here is to ensure that mysql_upgrade works, not that database on disk format is compatible (it should be, but that is another problem not covered by this task).
One suggestion of how to do this is having in the mtr suite, mysqldump's of all the previous versions of the mysql database and check that one can run mysql_upgrade on all of these.