Michael Trapp [Mon, 6 Mar 2023 10:40:20 +0000 (10:40 +0000)]
libuuid: fix lib internal cache size
The lib internal cache improves throughput in high load
scenarios but for applications with a low request rate,
the cache size must be adapted to this situation.
Therefore the cache size should be changed to the current
requirements of the application during runtime.
Karel Zak [Thu, 9 Mar 2023 11:17:46 +0000 (12:17 +0100)]
Merge branch 'lsfd-packet' of https://github.com/masatake/util-linux
* 'lsfd-packet' of https://github.com/masatake/util-linux:
tests: (lsfd) add more cases for packet sockets
tests: (mkfds) don't specify a protocol in connect(2) for AF_PACKET socket
lsfd: (man) write more about NAME column
lsfd: use extra information loaded from /proc/net/packet
lsfd: add a helper function decoding interface indexes
lsfd: make items in netns_tree extensible
lsfd: simplify functions for comparing items
lsfd: (style) reformat colinfo array
Karel Zak [Thu, 9 Mar 2023 11:15:51 +0000 (12:15 +0100)]
Merge branch 'fix_cal_num_months' of https://github.com/JadingTsunami/util-linux
* 'fix_cal_num_months' of https://github.com/JadingTsunami/util-linux:
cal: Update column test to show full year output in 5-column mode.
cal: fix multi-month printing.
Toomas Losin [Sun, 5 Mar 2023 23:57:55 +0000 (15:57 -0800)]
libfdisk: Fix randomly generated GPT UUID's
Fdisk commands that create random GPT UUID's result in values that are
not UEFI-compliant being written to disk: The "g" command creates a
new GPT whose in-core DiskGUID value is entirely big-endian; the "n"
command creates a GPT partition whose in-core UniquePartitionGUID
value is entirely big-endian. Those big-endian values are written to
disk by the "w" command rather than the mix of little- and big-endian
spec'd by UEFI.
This was caused by a libfdisk patch in 2017 that was addressing
warnings about "taking address of packed member". Reading gpt.c finds
two instances of dead code which suggests that perhaps there was some
confusion between a struct and a pointer to a struct. The intent must
have been to convert the randomly generated big-endian RFC 4122 UUID
values to UEFI's mixed-endian but the confusion(?) resulted in some
dead code and non-conversion of the UUID's.
This patch corrects the breakage while still avoiding "taking address
of packed member" warnings. The "w" command will once again write
UEFI-compliant values to disk.
Fixes: 92e486f80ef8 ("libfdisk: fix guid usage of packed struct gpt_entry") Signed-off-by: Toomas Losin <tlo@lenrek.net>
Enter the namespace:
$ nsenter --all -t 470012 --env env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=cb0b69aa7aec
PROJECT=util linux
HOME=/root
Reviewed-by: Thomas Weißschuh <thomas@t-8ch.de> Reviewed-by: Karel Zak <kzak@redhat.com> Signed-off-by: u2386 <hugo.cavan2386@gmail.com>
Karel Zak [Thu, 2 Mar 2023 13:08:38 +0000 (14:08 +0100)]
libmount: (optstr) do not use xalloc.h in test
It's technically valid to use xalloc.h in the tests, but then we mix
regular malloc and xalloc in the same source file, and it makes
"make checkxalloc" using difficult.
Karel Zak [Thu, 2 Mar 2023 11:34:04 +0000 (12:34 +0100)]
Merge branch 'lsfds-netlink' of https://github.com/masatake/util-linux
* 'lsfds-netlink' of https://github.com/masatake/util-linux:
tests: (lsfd) add cases for NETLINK sockets
lsfd: use extra information loaded from /proc/net/netlink
tests: (mkfds) add netlink factory
tests: (lsfd,mkfds) define new error code for EPROTONOSUPPORT
tests: (mkfds) add unsigned int parameter type
tests: (lsfd) use ${PIPESTATUS[]} instead of $?
Pedro Tammela [Wed, 1 Mar 2023 16:09:47 +0000 (17:09 +0100)]
libmount: idmap: fix sock write to child
The current code writes to sock_fds[0], which is set to -1 on line 227, instead of the correct sock_fds[1].
As a cause, a simple `mount` command which uses idmapping and doesn't specify a user ns hangs indefinitely.
Karel Zak [Wed, 1 Mar 2023 11:53:02 +0000 (12:53 +0100)]
Merge branch 'lsfd--inet-option' of https://github.com/masatake/util-linux
* 'lsfd--inet-option' of https://github.com/masatake/util-linux:
tests: (lsfd) add a case for testing -i/--inet options
lsfd: implement -i/--inet option
lsfd: adjust whitespaces in the help message
Thomas Weißschuh [Tue, 28 Feb 2023 18:24:16 +0000 (18:24 +0000)]
hardlink: (tests) do not assert amount of compared files
Depending on external circumstances the exact amount of compared files
can vary.
So don't test for this statistics as otherwise spurious test failures
will occurr.
Karel Zak [Mon, 27 Feb 2023 13:51:39 +0000 (14:51 +0100)]
Merge branch 'lsfd-more-inet-1' of https://github.com/masatake/util-linux
* 'lsfd-more-inet-1' of https://github.com/masatake/util-linux: (26 commits)
tests: (lsfd) skip if the platform doesn't permit to use ioctl(fd, SIOCGSKNS)
tests: (lsfd) skip if the platform doesn't permit to use unshare(2)
tests: (lsfd) skip if the platform doesn't attach a buffer to a packet socket
tests: (lsfd) skip if the platform doesn't provide pidfd_open(2)
tests: (mkfds) introduce constants representing the limitation of the test environment
tests: (lsfd) send a signal only if the target PID is know
tests: (lsfd) add comments about the reason using ts_skip_qemu_user()
tests: (mkfds) fix minor typo in comment
tests: (lsfd) add a case for PING and PINGv6 sockets
lsfd: use extra information loaded from /proc/net/icmp6
lsfd: use extra information loaded from /proc/net/icmp
tests: (mkfds) add ping and ping6 factories
tests: (lsfd) add a case for UDPLITEv6 sockets
tests: (lsfd) add a case for UDP-Lite sockets
lsfd: use extra information loaded from /proc/net/udplite6
lsfd: use extra information loaded from /proc/net/udplite
tests: (mkfds) add "lite" parameter to udp and udp6 factories
tests: (lsfd) add a case for RAWv6 sockets
tests: (mkfds) add raw6 factory
lsfd: use extra information loaded from /proc/net/raw6
...