# Network namespaces is a feature of Linux. # So, ignore this test on any platform except Linux. --source include/linux.inc --source ../include/have_network_namespaces.inc --let $restart_parameters = restart: --skip-name-resolve --mysqlx-bind-address=10.0.2.1/red --source include/restart_mysqld.inc --source include/xplugin_wait_for_interfaces.inc --source include/xplugin_preamble.inc CREATE USER 'x_root' @'10.0.2.1' IDENTIFIED WITH 'mysql_native_password'; GRANT ALL ON *.*TO 'x_root' @'10.0.2.1' WITH GRANT OPTION; --echo # Check that X-protocol client can establish connection to the address 10.0.2.1 from the network namespace 'red' --write_file $MYSQL_TMP_DIR/mysqlx-connected-user-info.tmp -->sql SELECT USER(); -->endsql EOF --exec $MYSQLXTEST -h 10.0.2.1 --network-namespace=red -u x_root --password='' --file=$MYSQL_TMP_DIR/mysqlx-connected-user-info.tmp 2>&1 --echo # Non existing namespace --error 1 --exec $MYSQLXTEST -h 10.0.2.1 --network-namespace=green -u x_root --password='' --file=$MYSQL_TMP_DIR/mysqlx-connected-user-info.tmp 2>&1 --echo # Simulate case where cap_sys_nice is not granted to mysqlxtest --copy_file $exe_mysqlxtest $MYSQLTEST_VARDIR/tmp/mysqlxtest --error 1 --exec $MYSQLTEST_VARDIR/tmp/mysqlxtest -h 10.0.2.1 --network-namespace=red -u x_root --password='' --file=$MYSQL_TMP_DIR/mysqlx-connected-user-info.tmp 2>&1 REVOKE ALL ON *.* FROM 'x_root' @'10.0.2.1'; DROP USER 'x_root' @'10.0.2.1'; --remove_file $MYSQL_TMP_DIR/mysqlx-connected-user-info.tmp --remove_file $MYSQLTEST_VARDIR/tmp/mysqlxtest --let $restart_parameters= --source include/restart_mysqld.inc