File-Tunnel/provisioning/mac
fiddyschmitt 4f105ba913 Replace ft_test_env with a Vagrant + Ansible lab in provisioning/
The test machines are now defined as code in provisioning/ and built from
public images: settings.yml (the one file to edit), a Vagrantfile for the
VirtualBox VMs, an Ansible playbook for the Linux VMs, a PowerShell
provisioner for the Windows VMs, and scripts that set up the Mac and its two
Android emulators over SSH. Everything is defined on this PC and pushed to
the machines, and any machine can be rebuilt identically.
provisioning/README.md covers how to use it and why it's built this way.

The tests read every machine's role, address and login from settings.yml
(ft_tests/Lab.cs, checked by LabTests) instead of hard-coded addresses and
user-secrets. Only the Dropbox keys stay in user-secrets.

What replaced what:
- ft_test_env's menus: vagrant up / halt / reload / destroy, .\mac.ps1
  up / halt and .\check.ps1. The Linux VMs persist instead of resetting at
  every boot, and every VM runs a smoke test after each up and provision.
- setup_debian.sh, the cloud-init seeds and mounts.sh: ansible/. The shares
  are mounted at boot and again whenever the tests start.
- the hand-built Windows gold image, its re-addressed clones and the
  hand-built server: the public gusztavvargadr/windows-11 box and
  windows/provision.ps1. Every VM made from the box has its own machine
  SID, which SMB and RDP between the VMs need.
- mac_android_setup.sh, MacEmulator.cs and the tests' own setup of the
  Mac's SMB share: mac/setup.sh, mac/emulators.sh and mac.ps1.
- build_host_setup.sh and build-bionic.sh: the build VM's role and
  build-android.ps1, which build this working tree rather than GitHub's.
- the Linux VMs' SMB mount of this PC's r share, for ft's logs: a
  VirtualBox shared folder, so the VMs need no login to this PC.
- Windows client2 moves from .85, which another lab on this PC uses, to .88.

Found while bringing it up:
- The Windows box logs on automatically only twice, then switches
  autologon off. The provisioner keeps it on, so RunRemote always runs.
- Android 14's emulator kernel (6.1) lacks the 2023 Linux fix "tcp: tsq:
  relax tcp_small_queue_check() when rtx queue contains a single skb".
  After any retransmission timeout, a connection out of the emulator sent
  one segment per ACK for the rest of its life, which now and then stalled
  the Android sshfs rows. The emulators now run Android 16 (kernel 6.6).
  It lands an adb-pushed tree without execute bits, so the tests chmod the
  sshfs toolchain after pushing it.
- Both emulators' eth0 have QEMU's default MAC and answered ARP for their
  Wi-Fi address too, so the LAN sometimes sent one emulator's traffic to
  the other. .\mac.ps1 up sets arp_ignore and arp_announce.
- The lab runs its own pinned emulator (37.2.12, with -feature
  -WiFiPacketStream so Wi-Fi uses the bridge) and never updates the Mac
  SDK's, which other emulators run from. Nor does it restart the shared
  adb server.

A full run on this lab (Debian 6.12.111, Android 16) passed 286 of 287
tests. The one failure, S3 Mac-Linux-Mac, passed 3 of 3 when run again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjajJ7d3BhSZGfsMrGRS5S
2026-10-16 11:07:37 +10:00
..
emulators.sh Replace ft_test_env with a Vagrant + Ansible lab in provisioning/ 2026-10-16 11:07:37 +10:00
setup.sh Replace ft_test_env with a Vagrant + Ansible lab in provisioning/ 2026-10-16 11:07:37 +10:00
stage-termux-sshfs.py Replace ft_test_env with a Vagrant + Ansible lab in provisioning/ 2026-10-16 11:07:37 +10:00