Commit 36343f19 authored by Pavel Emelyanov's avatar Pavel Emelyanov

unix: Test the --external instead of --ext-unix-sk

The latter option should hide, the official API is the --external.
This patch tests the option, thus completing the deprecation.

The legacy -x|--ext-unix-sk test is still in zdtm/static/socket-ext.

travis-ci: success for unix: Test the --external instead of --ext-unix-sk
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 31a20bb7
......@@ -694,16 +694,17 @@ static int dump_external_sockets(struct unix_sk_desc *peer)
ret = run_plugins(DUMP_UNIX_SK, sk->fd, sk->sd.ino);
if (ret == -ENOTSUP) {
if (!opts.ext_unix_sk) {
show_one_unix("Runaway socket", peer);
pr_err("External socket is used. "
"Consider using --" USK_EXT_PARAM " option.\n");
return -1;
}
if (unix_sk_exception_lookup_id(sk->sd.ino)) {
pr_debug("found exception for unix name-less external socket.\n");
} else {
/* Legacy -x|--ext-unix-sk option handling */
if (!opts.ext_unix_sk) {
show_one_unix("Runaway socket", peer);
pr_err("External socket is used. "
"Consider using --" USK_EXT_PARAM " option.\n");
return -1;
}
if (peer->type != SOCK_DGRAM) {
show_one_unix("Ext stream not supported", peer);
pr_err("Can't dump half of stream unix connection.\n");
......
......@@ -12,4 +12,4 @@ def filename(sockf):
return 'socket:[%d]' % __sock_ino(sockf)
def dump_opts(sockf):
return ['--ext-unix-sk=%d' % __sock_ino(sockf)]
return ['--external', 'unix[%d]' % __sock_ino(sockf)]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment