dlc

package
v0.0.0-...-683b059 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package dlc provides functionality used by several DLC tests but not necessary for tests that simply use DLC.

Index

Constants

View Source
const (
	DirPerm     = 0755
	FilePerm    = 0644
	ImageFile   = "dlc.img"
	SlotA       = "dlc_a"
	SlotB       = "dlc_b"
	TestDir     = "/usr/local/dlc"
	TestID1     = "test1-dlc"
	TestID2     = "test2-dlc"
	TestPackage = "test-package"
)

Constants used by DLC tests

Variables

This section is empty.

Functions

func ChownContentsToDlcservice

func ChownContentsToDlcservice(dir string) error

ChownContentsToDlcservice recursively changes the ownership of the directory contents to the uid and gid of dlcservice.

func CopyFileWithPermissions

func CopyFileWithPermissions(from, to string, perms os.FileMode) error

CopyFileWithPermissions copies file |from| to |to| and sets permissions.

func DumpAndVerifyInstalledDLCs

func DumpAndVerifyInstalledDLCs(ctx context.Context, dumpPath, tag string, ids ...string) error

DumpAndVerifyInstalledDLCs calls dlcservice's GetInstalled D-Bus method via dlcservice_util command.

Types

type ListOutput

type ListOutput struct {
	ID        string `json:"id"`
	Package   string `json:"package"`
	RootMount string `json:"root_mount"`
}

ListOutput holds the output from running `dlcservice_util --list`.

func GetInstalled

func GetInstalled(ctx context.Context) ([]ListOutput, error)

GetInstalled uses the dlcservice_util to get the installed DLCs. Will return an error when failing to retrieve and parse the output.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL