NetBSD-Bugs archive

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

toolchain/58259: mtree should off optional/alternative entries



>Number:         58259
>Category:       toolchain
>Synopsis:       mtree should off optional/alternative entries
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed May 15 12:40:00 +0000 2024
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.10
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD h-pulse.aprisoft.de 10.99.10 NetBSD 10.99.10 (GENERIC64) #441: Wed May 15 07:59:11 CEST 2024 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/evbarm/compile/GENERIC64 evbarm
Architecture: aarch64
Machine: evbarm
>Description:

Most of my "embedded" test machines have

	var_shm_symlink="/tmp/.shm"

in /etc/rc.conf to avoid mounting another tmpfs instance (and instead sharing
a single one on /tmp, with a single ram limit).

It is unfortunately impossible to express this properly in /etc/mtree/set.base,
so the mtree sets test fails:

tc-start: 1715767896.927918, set_base
tc-so:Executing command [ mtree -e ]
tc-se:Fail: incorrect exit status: 2, expected: 0
tc-se:stdout:
tc-se:bin/[:  sha256 (0xce23e5de0cf34f18c332708ec5bbd8380b5448e5b94eaa4a609ba3a17dac75ae, 0x2499d6f817197cbc0f5557c48e376023582ba54a3316dc3544a9eb5b91bf7b57)
tc-se:var/shm: 
tc-se:  type (dir, link)
tc-se:
tc-se:stderr:
tc-se:
tc-end: 1715767923.512824, set_base, failed, atf-check failed; see the output of the test for details


>How-To-Repeat:
s/a

>Fix:
Add an "alternative" keyword to mtree specs (simmilar to "optional") marking
an entry that is part of a group of lines/entries describing the same
item, but in different, alternative incarnations - where strictly one of them
has to present and match the spec.

Like:

./var/shm type=dir uname=root gname=wheel mode=01777 alternative
./var/shm type=link uname=root gname=wheel mode=01777

(and also allow the second line to match a link with arbitrary target
since no link= is given).



Home | Main Index | Thread Index | Old Index