aarch64 lib32 vs. armv7 mdconfig behavior: "mdconfig: ioctl(/dev/mdctl): Inappropriate ioctl for device"

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm,gmane.os.freebsd.current
Message-ID <[email protected]>
Not via a chroot'd context, but using the files from a
directory tree that allows an armv7 chroot:

# /usr/obj/DESTDIRs/main-CA7-chroot/sbin/mdconfig -s40m
mdconfig: ioctl(/dev/mdctl): Inappropriate ioctl for device

This sort of thing messes up the operation of the likes
of the /usr/tests/sbin/growfs/legacy_test logic:

#! /usr/local/bin/perl
# $FreeBSD$

use strict;
use warnings;
use POSIX;
use Test::More tests => 19;
use Fcntl qw(:DEFAULT :seek);
. . .
SKIP: {
    skip "Cannot test without UID 0", 19 if $<;

    chomp(my $md = `mdconfig -s40m`);
    like($md, qr/^md\d+$/, "Created $md with size 40m") or die;
    $unit = substr $md, 2;
. . .


Other ioctl complaints:

sys/aio/aio_test:md_kq  ->  failed: ioctl MDIOCATTACH failed: Inappropriate ioctl for device
sys/aio/aio_test:md_poll  ->  failed: ioctl MDIOCATTACH failed: Inappropriate ioctl for device
sys/aio/aio_test:md_signal  ->  failed: ioctl MDIOCATTACH failed: Inappropriate ioctl for device
sys/aio/aio_test:md_suspend  ->  failed: ioctl MDIOCATTACH failed: Inappropriate ioctl for device
sys/aio/aio_test:md_thread  ->  failed: ioctl MDIOCATTACH failed: Inappropriate ioctl for device
sys/aio/aio_test:md_waitcomplete  ->  failed: ioctl MDIOCATTACH failed: Inappropriate ioctl for device
sys/aio/aio_test:vectored_md_poll  ->  failed: ioctl MDIOCATTACH failed: Inappropriate ioctl for device


For reference:

# uname -apKU
FreeBSD CA78C-WDK23-ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT aarch64 1400093 #5 main-n264334-215bab7924f6-dirty: Wed Jul 26 02:13:44 PDT 2023     root@CA78C-WDK23-ZFS:/usr/obj/BUILDs/main-CA78C-nodbg-clang/usr/main-src/arm64.aarch64/sys/GENERIC-NODBG-CA78C arm64 aarch64 1400093 1400093


===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.