aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2022-11-15 18:13:37 -0500
committerTheodore Ts'o <tytso@mit.edu>2022-11-15 18:13:37 -0500
commitd0ec1913b90f51c09117736eaf354de85f750472 (patch)
treed9d3870b73ccb485eee2ce3cc96950516be99732
parent848625b8dcc0eb304b8fcd0b0862ae806f934c33 (diff)
downloadxfstests-bld-d0ec1913b90f51c09117736eaf354de85f750472.tar.gz
test-appliance: enable serial ports /dev/ttyAMA? on the ARM64 on GCE t2a VM's
The GCE ARM64 VM (when using the t2a machine type) have the AMBA PL011 UART, whose serial ports are exposed as /dev/ttyAMA{0,1,2,3} instead of /dev/ttyS{0,1,2,3}. Set up the serial ports appropraitely on for these VM type. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--test-appliance/gce-xfstests-bld.sh15
1 files changed, 6 insertions, 9 deletions
diff --git a/test-appliance/gce-xfstests-bld.sh b/test-appliance/gce-xfstests-bld.sh
index 44709040..999d5da9 100644
--- a/test-appliance/gce-xfstests-bld.sh
+++ b/test-appliance/gce-xfstests-bld.sh
@@ -165,12 +165,12 @@ sed -i -e '/ExecStart/s/agetty/agetty -a root/' \
-e 's/After=rc.local.service/After=network.target/' \
/etc/systemd/system/telnet-getty@.service
-systemctl enable telnet-getty@ttyS1.service
-systemctl enable telnet-getty@ttyS2.service
-systemctl enable telnet-getty@ttyS3.service
-systemctl start telnet-getty@ttyS1.service
-systemctl start telnet-getty@ttyS2.service
-systemctl start telnet-getty@ttyS3.service
+for i in ttyS1 ttyS2 ttyS3 ttyAMA1 ttyAMA2 ttyAMA3 ; do
+ if stty -a < /dev/$i >& /dev/null ; then
+ systemctl enable telnet-getty@$i.service
+ systemctl start telnet-getty@$i.service
+ fi
+done
apt-get update
apt-get install -y debconf-utils curl
@@ -376,9 +376,6 @@ systemctl enable gce-fetch-gs-files.service
systemctl enable gce-finalize-wait.service
systemctl enable gce-finalize.timer
systemctl enable gen-ssh-keys.service
-systemctl enable telnet-getty@ttyS1.service
-systemctl enable telnet-getty@ttyS2.service
-systemctl enable telnet-getty@ttyS3.service
systemctl stop multipathd
systemctl disable multipathd
cp /usr/share/systemd/tmp.mount /etc/systemd/system/