#!/usr/bin/env bats -*- bats -*- # # Tests for podman update # load helpers LOOPDEVICE= function teardown() { if [[ -n "$LOOPDEVICE" ]]; then losetup -d $LOOPDEVICE LOOPDEVICE= fi basic_teardown } @test "podman update - test all options" { local cgv=1 if is_cgroupsv2; then cgv=2; fi # Need a block device for blkio-weight-device testing local pass_loop_device= if ! is_rootless; then if is_cgroupsv2; then lofile=${PODMAN_TMPDIR}/disk.img fallocate -l 1k ${lofile} LOOPDEVICE=$(losetup --show -f $lofile) pass_loop_device="--device $LOOPDEVICE" # Get maj:min (tr needed because losetup seems to use %2d) lomajmin=$(losetup -l --noheadings --output MAJ:MIN $LOOPDEVICE | tr -d ' ') fi fi # Shortcuts to make the table narrower local -a gig=(0 1073741824 2147483648 3221225472) local devicemax="1:5 rbps=10485760 wbps=31457280 riops=2000 wiops=4000" local mm=memory/memory # Format: # --