Commit graph

1894 commits

Author SHA1 Message Date
Karel Zak
6462dbe2ef Merge branch 'clock' of https://github.com/t-8ch/util-linux
* 'clock' of https://github.com/t-8ch/util-linux:
  lsclocks: new util to interact with system clocks
  lib/timeutils: implement timespec formatting
  lib/timeutils: implement nanosecond formatting
  lib/timeutils: constify some arguments
  utmpdump: validate subsecond granularity
2023-07-03 12:47:08 +02:00
Karel Zak
96de80b659 Merge branch 'lsfd--xmode' of https://github.com/masatake/util-linux
* 'lsfd--xmode' of https://github.com/masatake/util-linux:
  lsfd: add 'D' flag for representing deleted files to XMODE column
  lsfd: introduce XMODE column, extensible variant of MODE
  test: (lsfd) add a subcase for testing NAME column for a deleted file
  test: (lsfd) add a case for testing DELETED column
  test: (mkfds) add "make-regular-file" factory
2023-07-03 12:41:04 +02:00
Karel Zak
3e2e4c32e8 Merge branch 'lsfd--misc-tun' of https://github.com/masatake/util-linux
* 'lsfd--misc-tun' of https://github.com/masatake/util-linux:
  tests: (lsfd) add a case testing TUN.IFACE column
  tests: (mkfds) add a factor for opening tun device
  lsfd: add TUN.IFFACE, a column for interfaces behind tun devices
  lsfd: (refactor) move miscdev specific code to cdev_misc_ops
  lsfd: (refactor) make the way to handle character devices extensible
  lsfd: (refactor) introduce a content data type for char devices
2023-07-03 12:38:48 +02:00
Thomas Weißschuh
e9ddea7912 lsclocks: new util to interact with system clocks
Usecases:
* Compare current monotonic time to timestamps reported by systemd
* Validate time namespace operations
* Inspect clock resolutions

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-06-30 14:12:48 +02:00
Thomas Weißschuh
a8d0195462 utmpdump: validate subsecond granularity
tv_usec is only valid in the range [0, 999999].
If the file contains garbage data replace interpret it as "0" instead.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-06-28 14:50:49 +02:00
Masatake YAMATO
0cac072b64 tests: (lsfd) add a case testing TUN.IFACE column
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-27 08:28:06 +09:00
Jakub Wilk
618dd71be4 cal: fix long option name for -c 2023-06-26 21:02:13 +02:00
Masatake YAMATO
369007a5b7 tests: (mkfds) add a factor for opening tun device
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-27 01:21:42 +09:00
Karel Zak
ceb13fa9e8 Merge branch 'test/builddir-pwd' of https://github.com/t-8ch/util-linux
* 'test/builddir-pwd' of https://github.com/t-8ch/util-linux:
  tests: (run.sh) detect builddir from working directory
2023-06-26 11:49:43 +02:00
Thomas Weißschuh
dc1d0f8dd1 tests: (run.sh) detect builddir from working directory
This makes it easier to run test.sh from the build directory as
everything will work without any parameters irrespective of the build
directories name.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-06-25 09:06:47 +02:00
Masatake YAMATO
ee72ea94c5 tests: (lsfd) add a case for verifying ENDPOINTS column output in JSON mode
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-23 01:07:04 +09:00
Karel Zak
ae62db7250 Merge branch 'lsfd--fix-separators-for-json-output' of https://github.com/masatake/util-linux
* 'lsfd--fix-separators-for-json-output' of https://github.com/masatake/util-linux:
  lsfd.1.adoc: fix a typo
  lsfd: use ARRAY_STRING and ARRAY_NUMBER json types in some columns
  lsfd: use \n as the separator in INOTIFY.INODES and INOTIFY.INODES.RAW columns
  lsfd: use \n as the separator in EVENTPOLL.TFDS column
  lsfd: (filter) weakly support ARRAY_STRING and ARRAY_NUMBER json types
2023-06-22 14:26:09 +02:00
Masatake YAMATO
42497e7d92 lsfd: use ARRAY_STRING and ARRAY_NUMBER json types in some columns
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-22 14:53:41 +09:00
Masatake YAMATO
c34f86326d lsfd: use \n as the separator in INOTIFY.INODES and INOTIFY.INODES.RAW columns
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-22 14:29:08 +09:00
Masatake YAMATO
92e0e017d8 lsfd: use \n as the separator in EVENTPOLL.TFDS column
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-22 14:29:08 +09:00
Masatake YAMATO
30ac13fa20 lsfd: add 'D' flag for representing deleted files to XMODE column
Now NAME column doesn't print "(deleted)" markers at the end of
file name.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-22 09:01:13 +09:00
Masatake YAMATO
92c00d7215 lsfd: introduce XMODE column, extensible variant of MODE
The original MODE column comes from three letters (rwx) may not be
enough for representing various aspects of file descriptors and memory
mappings. We want to add more items in the future.

However, the description of MODE in lsfd(1) doesn't wrote about its
extensibility. Adding more letters to the column can break
compatibility in someone's use case.

This change introduces XMODE column. Unlike MODE, XMODE is declared as
an extensible column in lsfd(1). Currently, it shows the same items as
the MODE column does.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-22 09:01:13 +09:00
Masatake YAMATO
cb233a3e03 test: (lsfd) add a subcase for testing NAME column for a deleted file
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-22 09:01:13 +09:00
Masatake YAMATO
9ac2c69dbd test: (lsfd) add a case for testing DELETED column
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-22 09:01:13 +09:00
Masatake YAMATO
251319838d test: (mkfds) add "make-regular-file" factory
With "delete" boolean parameter, you can delete the file just
after making it.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-22 09:01:13 +09:00
Karel Zak
d7f1fc1839 tests: add omitted files
Sorry, forgot in the previous commit ...

Signed-off-by: Karel Zak <kzak@redhat.com>
2023-06-19 14:59:15 +02:00
Karel Zak
b11005d90f tests: add user and user=name mount test
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-06-19 13:45:06 +02:00
Masatake YAMATO
6b58fb5f45 tests: (lsfd) add a case for testing INOTIFY.INODES.RAW column
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-13 19:18:54 +09:00
Masatake YAMATO
5e0e9730ca tests: (mkfds) add / and /etc/fstab as the monitoring targets to inotify
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-13 19:18:54 +09:00
Karel Zak
1c8a51701d Merge branch 'libmount/loop-rw' of https://github.com/t-8ch/util-linux
* 'libmount/loop-rw' of https://github.com/t-8ch/util-linux:
  libmount: (optlist) correctly detect ro status
2023-06-12 12:22:02 +02:00
Thomas Weißschuh
69e98d12a9 libmount: (optlist) correctly detect ro status
Fixes #2305

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-06-11 11:52:08 +02:00
Masatake YAMATO
6591ddf6b0 tests: (lsfd) add a case for testing signalfd related columns
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-09 07:51:00 +09:00
Masatake YAMATO
4012622ab4 tests: (mkfds) add a factory to make a signalfd
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-08 21:33:06 +09:00
Karel Zak
00f254a8f0 Merge branch 'lsfd--timerfd' of https://github.com/masatake/util-linux
* 'lsfd--timerfd' of https://github.com/masatake/util-linux:
  tests: (lsfd/filter) add a case for comparing floating point numbers
  tests: (lsfd) add a case for testing timerfd related columns
  tests: add ts_skip_capability
  tests: (mkfds) add a factory to make a timerfd
  lsfd.1.adoc: write about timerfd
  lsfd: print the detail of the timer associated with a timerfd
  lsfd: (filter) accept floating point numbers in expressions
  lsfd: (filter) support floating point number used in columns
  lsfd: (filter) reduce duplicated code in macro definitions
  lsfd: (filter) improve error message
  lsfd.1.adoc: revise type names for columns
  lsfd.1.adoc: fix typos
  lsfd: adjust coding style
  lsfd: fix a sentence in comment
2023-06-06 10:45:17 +02:00
Karel Zak
b7dd45f6c8 Merge branch 'libblkid/bcache-csum' of https://github.com/t-8ch/util-linux
* 'libblkid/bcache-csum' of https://github.com/t-8ch/util-linux:
  libblkid: (bcache) report block size
  libblkid: (bcache) report version
  libblkid: (bcache) report label
  libblkid: (bcache) also calculate checksum over journal buckets
  libblkid: (bcache) extend superblock definition
2023-06-05 11:45:37 +02:00
Masatake YAMATO
7816bcb9da tests: (lsfd/filter) add a case for comparing floating point numbers
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-04 17:19:34 +09:00
Masatake YAMATO
ed59afeefb tests: (lsfd) add a case for testing timerfd related columns
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-04 17:19:34 +09:00
Masatake YAMATO
63feafbae8 tests: add ts_skip_capability
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-04 17:19:34 +09:00
Masatake YAMATO
baadd080d3 tests: (mkfds) add a factory to make a timerfd
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-06-04 17:19:34 +09:00
Thomas Weißschuh
9bd8074862 libblkid: (bcache) report block size
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-06-03 13:51:36 +02:00
Thomas Weißschuh
1b2efad216 libblkid: (bcache) report version
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-06-03 13:51:22 +02:00
Thomas Weißschuh
11d0724f78 libblkid: (bcache) report label
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-06-03 13:51:09 +02:00
Thomas Weißschuh
7140635881 libblkid: (bcache) also calculate checksum over journal buckets
Fixes #2291

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-06-03 13:50:51 +02:00
Thomas Weißschuh
3a14fb35be tests: fix subtests containing spaces in their name
Previously these tests would silently fail to compare
$TS_OUTPUT / $TS_ERRLOG.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-06-03 09:19:44 +02:00
Thomas Weißschuh
d53284bb1e tests: skip broken tests on docker
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-05-31 18:14:28 +02:00
Thomas Weißschuh
023e77d26a tests: add ts_skip_docker
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-05-31 18:14:28 +02:00
Thomas Weißschuh
d975467d8f lsfd: (tests) fix typo
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-05-31 17:31:42 +02:00
Thomas Weißschuh
9ff6f9d9ab test_enosys: fix build on old kernels
Fixes #2277

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-05-30 20:10:02 +02:00
Karel Zak
ac2fc8b442 Merge branch 'mount/ntfs-segfault' of https://github.com/t-8ch/util-linux
* 'mount/ntfs-segfault' of https://github.com/t-8ch/util-linux:
  mount: (tests) test mount helper with multiple filesystems
  libmount: (tests) split helper tests
2023-05-29 11:29:19 +02:00
Masatake YAMATO
f271f09bd6 tests: (lsfd) add a case for testing EVENTPOLL.TFDS column
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-05-28 18:01:27 +09:00
Masatake YAMATO
bf416aeca3 tests: (mkfds) add a factory to make an eventpoll fd
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-05-28 18:01:27 +09:00
Thomas Weißschuh
36d4e61c65 mount: (tests) test mount helper with multiple filesystems
See #2267

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-05-25 12:44:19 +02:00
Thomas Weißschuh
63d4806055 libmount: (tests) split helper tests
This splits the test introduced in
commit 06e05eb0f7 ("libmount: don't pass option "defaults" to helper")
into its own subtest.

We will have more subtests.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-05-25 12:44:19 +02:00
Karel Zak
27675c5c62 Merge branch 'lsfd--sysvipc-shmem' of https://github.com/masatake/util-linux
* 'lsfd--sysvipc-shmem' of https://github.com/masatake/util-linux:
  tests: (lsfd) add a case for testing SOURCE column for SysV shmem mappings
  tests: (mkfds) add a factory to make SysV shmem
  lsfd: add tmpfs as source of sysvipc to the the nodev_table
  lsfd: initialize pagesize in an earlier stage
  lsfd: add "nsfs" to the nodev_table to fill SOURCE column for nsfs files
  lsfd: add a helper function for adding a nodev to the nodev_table
  lsfd: add a whitespace
  lsfd: write more about nsfs in comment
2023-05-24 11:41:42 +02:00
Masatake YAMATO
24a10f06e9 tests: (lsfd) add a case for testing SOURCE column for SysV shmem mappings
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-05-24 01:41:47 +09:00