Re: [PATCH blktests] loop/009: add test for loop partition uvents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Apr 06, 2023 / 19:30, Shin'ichiro Kawasaki wrote:
[...]
> > +	# The default udev behavior is to watch loop devices, which means that
> > +	# udevd will explicitly prompt the kernel to rescan the partitions with
> > +	# ioctl(BLKRRPART).  We want to make sure we're getting uevents from
> > +	# ioctl(LOOP_CONFIGURE), so disable this udev behavior for our device to
> > +	# avoid false positives.
> > +	echo "ACTION!=\"remove\", KERNEL==\"${dev#/dev/}\", OPTIONS+=\"nowatch\"" \
> > +		>/run/udev/rules.d/99-blktests-$$.rules
> 
> On Fedora Server 37, the line above prints a failure message because the
> directory /run/udev/rules.d/ does not exist. To avoid it, I needed the change
> below. I suggest to apply this change.
> 
> diff --git a/tests/loop/009 b/tests/loop/009
> index dfa9de3..2b7a042 100755
> --- a/tests/loop/009
> +++ b/tests/loop/009
> @@ -36,6 +36,7 @@ EOF
>         # ioctl(BLKRRPART).  We want to make sure we're getting uevents from
>         # ioctl(LOOP_CONFIGURE), so disable this udev behavior for our device to
>         # avoid false positives.
> +       [[ ! -d /run/udev/rules.d ]] && mkdir -p /run/udev/rules.d
>         echo "ACTION!=\"remove\", KERNEL==\"${dev#/dev/}\", OPTIONS+=\"nowatch\"" \
>                 >/run/udev/rules.d/99-blktests-$$.rules
>         udevadm control -R
>

I've applied the patch with the edit above. Thanks!



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux