-AT_SETUP([test unix socket, long pathname - Python])
-AT_SKIP_IF([test $HAVE_PYTHON = no || test "$IS_WIN32" = "yes"])
-dnl Linux sockaddr_un has a 108-byte limit, so this needs to be longer.
-dnl Linux "ecryptfs" has a 143-byte limit, so we use that many bytes.
-longname=01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012
-
-dnl Skip the test if the directory can't be created (presumably the file
-dnl system doesn't support such long names).
-AT_CHECK([mkdir $longname || exit 77])
+m4_define([UNIX_SOCKET_LONG_PATHNAME_PYN],
+ [AT_SETUP([test unix socket, long pathname - $1])
+ AT_SKIP_IF([test $2 = no || test "$IS_WIN32" = "yes"])
+ AT_KEYWORDS([python unixsocket])
+ dnl Linux sockaddr_un has a 108-byte limit, so this needs to be longer.
+ dnl Linux "ecryptfs" has a 143-byte limit, so we use that many bytes.
+ longname=01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012
+
+ dnl Skip the test if the directory can't be created (presumably the file
+ dnl system doesn't support such long names).
+ AT_CHECK([mkdir $longname || exit 77])
+ AT_CHECK([cd $longname && $3 $abs_srcdir/test-unix-socket.py ../$longname/socket socket])
+ AT_CLEANUP])