socket-util: add new helper socket_xattr_supported()
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <grp.h>
|
||||
#include <linux/pkt_sched.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
@@ -550,4 +551,16 @@ TEST(tos_to_priority) {
|
||||
ASSERT_EQ(tos_to_priority(0xff), TC_PRIO_CONTROL);
|
||||
}
|
||||
|
||||
TEST(socket_xattr_supported) {
|
||||
int r;
|
||||
|
||||
r = socket_xattr_supported();
|
||||
ASSERT_OK(r);
|
||||
|
||||
log_info("Extended attributes on socket inodes supported: %s", yes_no(r));
|
||||
|
||||
/* A second call must agree with the first. */
|
||||
ASSERT_EQ(socket_xattr_supported(), r);
|
||||
}
|
||||
|
||||
DEFINE_TEST_MAIN(LOG_DEBUG);
|
||||
|
||||
Reference in New Issue
Block a user