1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/test/lib
Zdenek Kabelac fe68fb0525 tests: fix wrong pos with CONFIG_PRINTK_CALLER
SUSE kernels distribution enables CONFIG_PRINTK_CALLER by default.

One line of cat /dev/kmsg is like:

6,904,9506214456,-,caller=T24012;loop8: detected capacity change from 0
to 354304

If CONFIG_PRINTK_CALLER is off:

6,721,53563833,-;loop0: detected capacity change from 0 to 354304

',caller=T24012' is the redundant part needed to be handled.
Otherwise pos will be lager than buf size causing sz underflowed.
Then constructor of std::string will throw a exception to break
tests:
$ make  check_local  T=shell/000-basic.sh
VERBOSE=0 ./lib/runner \
        --testdir . --outdir results \
        --flavours ndev-vanilla --only shell/000-basic.sh --skip @

running 1 tests
running: [ndev-vanilla] shell/000-basic.sh
            0:00.000Exception: basic_string::_M_create
make[1]: *** [Makefile:148: check_local] Error 1
make[1]: Leaving directory '/root/lvm2/test'
make: *** [Makefile:89: check_local] Error 2

Fix it with strchr for ';' as delimiter to get pos.

Reported-by: Su Yue <glass.su@suse.com>
2024-06-03 15:30:05 +02:00
..
aux.sh tests: update aux for vdo checking 2024-04-16 21:17:42 +02:00
brick-shelltest.h tests: fix wrong pos with CONFIG_PRINTK_CALLER 2024-06-03 15:30:05 +02:00
check.sh tests: check vg fields with one command 2024-05-10 22:04:06 +02:00
dmsecuretest.c tests: add another explicit barrier 2024-04-16 21:17:42 +02:00
flavour-ndev-cluster-lvmpolld.sh lvmpolld: Add standalone polldaemon. 2015-05-09 00:59:18 +01:00
flavour-ndev-cluster.sh disable LVM1 tests 2018-04-20 11:22:46 -05:00
flavour-ndev-devicesfile.sh tests: check_devicesfile 2021-03-08 17:19:26 -06:00
flavour-ndev-lvmpolld.sh lvmpolld: Add standalone polldaemon. 2015-05-09 00:59:18 +01:00
flavour-ndev-vanilla.sh disable LVM1 tests 2018-04-20 11:22:46 -05:00
flavour-udev-cluster-lvmpolld.sh lvmpolld: Add standalone polldaemon. 2015-05-09 00:59:18 +01:00
flavour-udev-cluster.sh disable LVM1 tests 2018-04-20 11:22:46 -05:00
flavour-udev-lvmlockd-dlm.sh tests: some fixes for lvmlockd testing 2023-07-12 15:18:38 +02:00
flavour-udev-lvmlockd-idm.sh tests: Enable the testing for IDM locking scheme 2021-06-03 09:39:32 -05:00
flavour-udev-lvmlockd-sanlock.sh tests: separate lvmlockd tests with or without lvmetad 2018-05-30 09:25:45 -05:00
flavour-udev-lvmlockd-test.sh tests: separate lvmlockd tests with or without lvmetad 2018-05-30 09:25:45 -05:00
flavour-udev-lvmpolld.sh lvmpolld: Add standalone polldaemon. 2015-05-09 00:59:18 +01:00
flavour-udev-vanilla.sh disable LVM1 tests 2018-04-20 11:22:46 -05:00
get.sh tests: cleanup some shellcheck warns 2023-02-10 17:50:27 +01:00
harness.c configure.ac: define DEFAULT_PROC_DIR in one place 2024-04-15 13:38:44 +02:00
idm_inject_failure.c tests: Support idm failure injection 2021-06-03 09:39:32 -05:00
inittest.sh tests: fallback to normal hostname on older machines 2024-04-12 00:21:45 +02:00
lvm_vdo_wrapper.sh tests: vdo wrapper support symlinks 2023-09-03 22:33:11 +02:00
lvm-wrapper.sh tests: scripts double quote 2017-07-10 14:23:53 +02:00
mke2fs.conf tests: add mke2fs.conf 2016-07-04 17:40:25 +02:00
not.c cov: ignoring 2021-09-27 18:56:14 +02:00
runner.cpp tests: skip running tests for non root user 2022-06-07 17:14:09 +02:00
test-corosync-conf fix corosync.conf: no interface error 2020-01-15 09:46:54 -06:00
test-dlm-conf Add lvmlockd 2015-07-02 15:42:26 -05:00
test-sanlock-conf test: add make check_lvmlockd_test 2016-02-22 09:36:35 -06:00
utils.sh tests: utils use read without slash mangling 2023-10-04 23:58:54 +02:00