[MDEV-27721] rpl.rpl_relay_max_extension test is not FreeBSD-compatible Created: 2022-02-02  Updated: 2022-02-09  Resolved: 2022-02-03

Status: Closed
Project: MariaDB Server
Component/s: Platform FreeBSD, Replication, Tests
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7
Fix Version/s: 10.2.43, 10.3.34, 10.4.24, 10.5.15, 10.6.7, 10.7.3, 10.8.2

Type: Bug Priority: Trivial
Reporter: Elena Stepanova Assignee: Andrei Elkin
Resolution: Fixed Votes: 0
Labels: None
Environment:

FreeBSD 13



 Description   

$ perl ./mtr rpl.rpl_relay_max_extension --mem
 
sed: 1: "/usr/home/ec2-user/mari ...": extra characters at the end of h command
mysqltest: At line 52: exec of 'sed -i "s/slave-relay-bin.000002/slave-relay-bin.999997/g" /usr/home/ec2-user/mariadb-server/mysql-test/var/mysqld.2/data//relay-log.info' failed, error: 256, status: 1, errno: 22

In FreeBSD, -i requires an argument, which is apparently why things go wrong.
Something like this may fix the immediate problem

sed -i='' ...

and Linux seems to accept it too, but I don't know how much more portable it is, and anyway it looks hack-ish. Maybe it makes more sense to get rid of inline altogether, especially since it's apparently the only test that does it.
Or disable the test for freebsd if you so prefer.



 Comments   
Comment by Andrei Elkin [ 2022-02-02 ]

The latter option of the description is taken virtually harmlessly for a bug the test was
written for. Thanks elenst for spelling out the cause and suggestions!

Generated at Thu Feb 08 09:55:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.