[LTP] [PATCH 1/1 1/1] Add ioctl_loop08 test for LOOP_GET_STATUS lock imbalance

Cyril Hrubis chrubis@suse.cz
Fri Feb 10 13:13:45 CET 2023


Hi!
> Sincere thanks for your advice.
> Based on my tests,the lockdep will block the ioctl request thread return to
> userspace when it detect a lock imbalance. Place ioctl request in the main
> thread, there is no chance to execute find_kmsg for determining what
> exactly a lock problem happaned and printing the test result.

Hmm, then maybe it would be easier and more reliable to run the ioctl()
in a child processes and fail the test when the parent detects the
child to lockup.

I suppose that the process that called the ioctl() ends up in the D
state, right? In that case the parent read the /proc/pid/stat a few
times with slight delays between them and if the process keeps hanging
in D state we declare it blocked forever.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list