• Bug#1103679: marked as done (unblock: autopkgtest/5.49) (2/2)

    From Debian Bug Tracking System@21:1/5 to Ian Jackson on Mon Apr 21 13:10:01 2025
    [continued from previous message]

    + metavar='CAPABILITY', default=[],
    + help='Declare capability CAPABILITY')
    args = parser.parse_args()
    if args.debug:
    adtlog.verbosity = 2
    + capabilities += args.fake_capability


    def hook_open():
    @@ -62,7 +64,7 @@ def hook_open():
    def hook_downtmp(path):
    global capabilities

    - d = VirtSubproc.downtmp_mktemp(path)
    + d = VirtSubproc.downtmp_mktemp(capabilities, path, '')
    capabilities.append('downtmp-host=' + d)
    return d

    @@ -71,8 +73,7 @@ def hook_cleanup():
    global capabilities

    if not args.retain_tmp:
    - VirtSubproc.downtmp_remove()
    - capabilities = [c for c in capabilities if not c.startswith('downtmp-host')]
    + VirtSubproc.downtmp_remove(capabilities)


    def hook_capabilities():
    diff --git a/virt/autopkgtest-virt-null.1 b/virt/autopkgtest-virt-null.1
    index 142a6719..ef399be1 100644
    --- a/virt/autopkgtest-virt-null.1
    +++ b/virt/autopkgtest-virt-null.1
    @@ -24,6 +24,21 @@ so as to reuse the same system as a testbed.
    .BR \-d " | " \-\-debug
    Enables debugging output. Probably not hugely interesting.

    +.TP
    +.BI \-\-fake-capability " CAPABILITY"
    +Advertise
    +.I CAPABILITY
    +in the list of capabilities,
    +regardless of whether the capability is implemented.
    +Note that this is hazardous -
    +tests may malfunction, or even mess up the system.
    +
    +In autopkgtest 5.47 and earlier,
    +autopkgtest\-virt\-null falsely advertises
    +.BR isolation\-machine .
    +This option can be used to restore that behaviour:
    +.BR \-\-fake\-capability=isolation\-machine .
    +
    .TP
    .BR \-\-retain-tmp
    Do not delete the temporary directory on exit.
    diff --git a/virt/autopkgtest-virt-qemu b/virt/autopkgtest-virt-qemu
    index 72799332..0a86f209 100755
    --- a/virt/autopkgtest-virt-qemu
    +++ b/virt/autopkgtest-virt-qemu
    @@ -65,6 +65,13 @@ args = None
    factory: Optional[QemuFactory] = None
    qemu: Optional[Qem