public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
f66c7e7ec3cc32dab70784f8814c2ebb130ad536 blob 8887 bytes (raw)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
 
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Tests makefile
#
# Copyright Red Hat
# Author: David Gibson <david@gibson.dropbear.id.au>

BATS = bats -j $(shell nproc)
EXETOOL = exeter/exetool/exetool
WGET = wget -c
FLAKE8 = flake8
MYPY = mypy --strict

DEBIAN_IMGS = debian-8.11.0-openstack-amd64.qcow2 \
	debian-10-nocloud-amd64.qcow2 \
	debian-10-generic-arm64.qcow2 \
	debian-10-generic-ppc64el-20220911-1135.qcow2 \
	debian-11-nocloud-amd64.qcow2 \
	debian-11-generic-arm64.qcow2 \
	debian-11-generic-ppc64el-20250703-2162.qcow2 \
	debian-sid-nocloud-amd64-daily.qcow2 \
	debian-sid-nocloud-arm64-daily.qcow2 \
	debian-sid-nocloud-ppc64el-daily.qcow2

FEDORA_IMGS = Fedora-Cloud-Base-26-1.5.x86_64.qcow2 \
	Fedora-Cloud-Base-27-1.6.x86_64.qcow2 \
	Fedora-Cloud-Base-28-1.1.x86_64.qcow2 \
	Fedora-Cloud-Base-28-1.1.aarch64.qcow2 \
	Fedora-Cloud-Base-29-1.2.x86_64.qcow2 \
	Fedora-Cloud-Base-29-1.2.aarch64.qcow2 \
	Fedora-Cloud-Base-30-1.2.x86_64.qcow2 \
	Fedora-Cloud-Base-30-1.2.aarch64.qcow2 \
	Fedora-Cloud-Base-31-1.9.x86_64.qcow2 \
	Fedora-Cloud-Base-31-1.9.aarch64.qcow2 \
	Fedora-Cloud-Base-32-1.6.x86_64.qcow2 \
	Fedora-Cloud-Base-32-1.6.aarch64.qcow2 \
	Fedora-Cloud-Base-33-1.2.x86_64.qcow2 \
	Fedora-Cloud-Base-33-1.2.aarch64.qcow2 \
	Fedora-Cloud-Base-34-1.2.x86_64.qcow2 \
	Fedora-Cloud-Base-34-1.2.aarch64.qcow2 \
	Fedora-Cloud-Base-35-1.2.x86_64.qcow2 \
	Fedora-Cloud-Base-35-1.2.aarch64.qcow2

OPENSUSE_IMGS = openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2 \
	openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2 \
	openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2 \
	openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz \
	openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz

UBUNTU_OLD_IMGS = trusty-server-cloudimg-amd64-disk1.img \
	trusty-server-cloudimg-i386-disk1.img \
	trusty-server-cloudimg-ppc64el-disk1.img
UBUNTU_NEW_IMGS = xenial-server-cloudimg-powerpc-disk1.img \
	jammy-server-cloudimg-s390x.img
UBUNTU_IMGS = $(UBUNTU_OLD_IMGS) $(UBUNTU_NEW_IMGS)

DOWNLOAD_ASSETS = $(EXETOOL) tunbridge mbuto podman \
	$(DEBIAN_IMGS) $(FEDORA_IMGS) $(OPENSUSE_IMGS) $(UBUNTU_IMGS)
TESTDATA_ASSETS = small.bin big.bin medium.bin \
	rampstream
LOCAL_ASSETS = mbuto.img mbuto.mem.img podman/bin/podman QEMU_EFI.fd \
	$(DEBIAN_IMGS:%=prepared-%) $(FEDORA_IMGS:%=prepared-%) \
	$(UBUNTU_NEW_IMGS:%=prepared-%) \
	nstool guest-key guest-key.pub $(TESTDATA_ASSETS)

ASSETS = $(DOWNLOAD_ASSETS) $(LOCAL_ASSETS)

EXETER_SH = smoke/smoke.sh build/static_checkers.sh
EXETER_PYPATH = exeter/py3:tunbridge/:.
EXETER_PYTHON = smoke/smoke.py build/build.py
EXETER_BATS = $(EXETER_SH:%=%.bats) $(EXETER_PYTHON:%=%.bats)
BATS_FILES = $(EXETER_BATS) \
	podman/test/system/505-networking-pasta.bats

# Python test code (for linters)
PYPKGS = $(EXETER_PYTHON) tasst

CFLAGS = -Wall -Werror -Wextra -pedantic -std=c99

assets: $(ASSETS)

.PHONY: pull-%
pull-%: %
	git -C $* pull

exeter:
	git clone https://gitlab.com/dgibson/exeter.git

exeter/exetool/exetool: pull-exeter

tunbridge:
	git clone https://gitlab.com/dgibson/tunbridge.git

mbuto:
	git clone git://mbuto.sh/mbuto

mbuto/mbuto: pull-mbuto

podman:
	git clone https://github.com/containers/podman.git

# To succesfully build podman, you will need gpgme and systemd
# development packages
podman/bin/podman: pull-podman
	$(MAKE) -C podman

guest-key guest-key.pub:
	ssh-keygen -f guest-key -N ''

mbuto.img: passt.mbuto mbuto/mbuto guest-key.pub rampstream-check.sh $(TESTDATA_ASSETS)
	./mbuto/mbuto -p ./$< -c lz4 -f $@

mbuto.mem.img: passt.mem.mbuto mbuto ../passt.avx2
	./mbuto/mbuto -p ./$< -c lz4 -f $@

nstool: nstool.c
	$(CC) $(CFLAGS) -o $@ $^

QEMU_EFI.fd:
	./find-arm64-firmware.sh $@

prepared-%.qcow2: %.qcow2 ./prepare-distro-img.sh
	qemu-img create -f qcow2 -F qcow2 -b $< $@
	./prepare-distro-img.sh $@

prepared-%.img: %.img ./prepare-distro-img.sh
	qemu-img create -f qcow2 -F qcow2 -b $< $@
	./prepare-distro-img.sh $(IMGTYPE) $@

small.bin:
	dd if=/dev/urandom bs=2k count=1 of=$@

medium.bin:
	dd if=/dev/urandom bs=1k count=5 of=$@

big.bin:
	dd if=/dev/urandom bs=1M count=10 of=$@

flake8: pull-exeter
	PYTHONPATH=$(EXETER_PYPATH) $(FLAKE8) $(PYPKGS)

mypy: pull-exeter
	PYTHONPATH=$(EXETER_PYPATH) $(MYPY) $(PYPKGS)

$(EXETER_BATS): %.bats: % $(EXETOOL) pull-tunbridge
	PYTHONPATH=$(EXETER_PYPATH) $(EXETOOL) bats -- $< > $@

bats: $(BATS_FILES) pull-podman
	PYTHONPATH=$(EXETER_PYPATH) CONTAINERS_HELPER_BINARY_DIR=.. $(BATS) $(BATS_FILES)

check: assets
	./run

debug: assets
	DEBUG=1 ./run

clean:
	rm -f perf.js *~
	rm -rf .mypy_cache __pycache__
	rm -f $(LOCAL_ASSETS)
	rm -f $(EXETER_BATS)
	rm -rf test_logs
	rm -f prepared-*.qcow2 prepared-*.img

realclean: clean
	rm -rf $(DOWNLOAD_ASSETS)

# Debian downloads
debian-8.11.0-openstack-%.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/OpenStack/archive/8.11.0/debian-8.11.0-openstack-$*.qcow2

debian-10-nocloud-%.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/buster/latest/debian-10-nocloud-$*.qcow2

debian-10-generic-ppc64el-20220911-1135.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/buster/20220911-1135/debian-10-generic-ppc64el-20220911-1135.qcow2

debian-10-generic-%.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/buster/latest/debian-10-generic-$*.qcow2

debian-11-nocloud-%.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-nocloud-$*.qcow2

debian-11-generic-%.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-$*.qcow2

debian-11-generic-ppc64el-20250703-2162.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/bullseye/20250703-2162/debian-11-generic-ppc64el-20250703-2162.qcow2

debian-sid-nocloud-%-daily.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/sid/daily/latest/debian-sid-nocloud-$*-daily.qcow2

# Fedora downloads
Fedora-Cloud-Base-26-1.5.%.qcow2:
	$(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/26/CloudImages/$*/images/Fedora-Cloud-Base-26-1.5.$*.qcow2

Fedora-Cloud-Base-27-1.6.%.qcow2:
	$(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/27/CloudImages/$*/images/Fedora-Cloud-Base-27-1.6.$*.qcow2

Fedora-Cloud-Base-28-1.1.%.qcow2:
	$(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/28/Cloud/$*/images/Fedora-Cloud-Base-28-1.1.$*.qcow2

Fedora-Cloud-Base-29-1.2.%.qcow2:
	$(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/29/Cloud/$*/images/Fedora-Cloud-Base-29-1.2.$*.qcow2

Fedora-Cloud-Base-30-1.2.%.qcow2:
	$(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Cloud/$*/images/Fedora-Cloud-Base-30-1.2.$*.qcow2

Fedora-Cloud-Base-31-1.9.%.qcow2:
	$(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Cloud/$*/images/Fedora-Cloud-Base-31-1.9.$*.qcow2

Fedora-Cloud-Base-32-1.6.%.qcow2:
	$(WGET) -O $@ https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/32/Cloud/$*/images/Fedora-Cloud-Base-32-1.6.$*.qcow2

Fedora-Cloud-Base-33-1.2.%.qcow2:
	$(WGET) -O $@ https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/33/Cloud/$*/images/Fedora-Cloud-Base-33-1.2.$*.qcow2

Fedora-Cloud-Base-34-1.2.%.qcow2:
	$(WGET) -O $@ https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/34/Cloud/$*/images/Fedora-Cloud-Base-34-1.2.$*.qcow2

Fedora-Cloud-Base-35-1.2.%.qcow2:
	$(WGET) -O $@ https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/35/Cloud/$*/images/Fedora-Cloud-Base-35-1.2.$*.qcow2

# OpenSuSE downloads
openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2:
	$(WGET) -O $@ https://download.opensuse.org/distribution/leap/15.1/jeos/openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2

openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2:
	$(WGET) -O $@ https://download.opensuse.org/distribution/leap/15.2/appliances/openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2

openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2:
	$(WGET) -O $@ https://download.opensuse.org/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2

openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz:
	$(WGET) -O $@ http://download.opensuse.org/ports/aarch64/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz

openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz:
	$(WGET) -O $@ http://download.opensuse.org/ports/armv7hl/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz

# Ubuntu downloads
trusty-server-cloudimg-%-disk1.img:
	$(WGET) -O $@ https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-$*-disk1.img

xenial-server-cloudimg-powerpc-disk1.img:
	$(WGET) -O $@ https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-powerpc-disk1.img

jammy-server-cloudimg-s390x.img:
	$(WGET) -O $@ https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-s390x.img
debug log:

solving f66c7e7e ...
found f66c7e7e in https://archives.passt.top/passt-dev/20251002075708.461931-2-david@gibson.dropbear.id.au/
found 5b5f0fc1 in https://archives.passt.top/passt-dev/20251002050437.4175553-7-david@gibson.dropbear.id.au/
found 3800a0a9 in https://archives.passt.top/passt-dev/20251002050437.4175553-6-david@gibson.dropbear.id.au/
found 49388276 in https://passt.top/passt
preparing index
index prepared:
100644 49388276c9d2c3dfaafb024b6e43779ab2794104	test/Makefile

applying [1/3] https://archives.passt.top/passt-dev/20251002050437.4175553-6-david@gibson.dropbear.id.au/
diff --git a/test/Makefile b/test/Makefile
index 49388276..3800a0a9 100644


applying [2/3] https://archives.passt.top/passt-dev/20251002050437.4175553-7-david@gibson.dropbear.id.au/
diff --git a/test/Makefile b/test/Makefile
index 3800a0a9..5b5f0fc1 100644


applying [3/3] https://archives.passt.top/passt-dev/20251002075708.461931-2-david@gibson.dropbear.id.au/
diff --git a/test/Makefile b/test/Makefile
index 5b5f0fc1..f66c7e7e 100644

Checking patch test/Makefile...
Applied patch test/Makefile cleanly.
Checking patch test/Makefile...
Applied patch test/Makefile cleanly.
Checking patch test/Makefile...
Applied patch test/Makefile cleanly.

index at:
100644 f66c7e7ec3cc32dab70784f8814c2ebb130ad536	test/Makefile

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).