Skip to contentSkip to conversation

osstest: initial FreeBSD support

PATCH In review Roger Pau Monne 2 participants 9 messages Dec 1, 2017 – Dec 5, 2017

lore
Share & tools
lore
#0 lore raw

v17 cover osstest: initial FreeBSD support

Hello,

This are again the remaining non-acked patches of the FreeBSD osstest series. The two patches sent with this cover letter fix two issues found on the Mass colo.

Patch 17 fixes an issue where the FreeBSD installer bootloader receives random keystrokes on the console, thus aborting the automatic boot. The solution is to create an installer that doesn't wait for any keystrokes and just boots into the default kernel. FWIW this only happens when booting the installer image from pxelinux + memdisk, I haven't seen it happening when booting FreeBSD once installed to disk. In some spare free time I might try to figure out what's actually going on, but this bodge seems like the easiest solution ATM.

Patch 18 adds more disk controllers to the list of proved devices in order to find the hard drive. This was found while trying to install on nobling, which has some kind of RAID controller. Now all the possible disk drivers have been added to the list, so we shouldn't expect further problems for the time being.

Finally patch 19 fixes an issue when using recent FreeBSD sources, that changed the default position of the output produced by the release targets.

I've pushed the whole series to:

git://xenbits.xen.org/people/royger/osstest.git freebsd_v17

A successful FreeBSD flight can be found in the Massachusetts colo, it's flight 116709 (not public) which is based on the same code found in the freebsd_v17 branch.

Let me know if there's anything missing.

Thanks, Roger.

Roger Pau Monne (19):
osstest: make built_stash_file store a path_ runvar for each file
osstest: move known_hosts generation to TestSupport
osstest: add executive prefix to resource_shared_mark_ready
osstest: introduce host_shared_mark_ready
osstest: introduce build helpers for FreeBSD
osstest: add prototypes to target_install_packages{_norec}
osstest: introduce an OS $ho field
osstest: add support for the FreeBSD package manager
osstest: introduce a FreeBSD build script
osstest: add support for runtime_IDENT_hostflags
osstest: introduce a script to set the runtime hostflags runvar for
FreeBSD jobs
osstest: add script to install build dependencies on FreeBSD
osstest: change the meaning of need_build_host
osstest: add support for FreeBSD buildjobs to sg-run-job
osstest: introduce a script to create a FreeBSD flight
osstest: hook FreeBSD flight into cr-daily-branch
osstest: remove the loader timeout from the install image
osstest: expand the list of tested disk controllers
osstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets

 Osstest/BuildSupport.pm                |  26 +++-
 Osstest/Debian.pm                      |  36 +----
 Osstest/Executive.pm                   |   5 +-
 Osstest/JobDB/Executive.pm             |   2 +-
 Osstest/TestSupport.pm                 | 139 ++++++++++++++++---
 README                                 |  16 +++
 ap-common                              |   5 +
 ap-fetch-version                       |   8 ++
 ap-fetch-version-old                   |   9 ++
 ap-print-url                           |   3 +
 ap-push                                |   9 ++
 cr-daily-branch                        |  17 +++
 cr-for-branches                        |   2 +-
 cri-common                             |   1 +
 daily-cron-email-adhoc--freebsd-master |   1 +
 daily-cron-email-play--freebsd-master  |   1 +
 daily-cron-email-real--freebsd-master  |   4 +
 make-freebsd-flight                    |  95 +++++++++++++
 sg-run-job                             |  50 ++++---
 ts-build-prep-freebsd                  |  37 +++++
 ts-freebsd-build                       | 240 +++++++++++++++++++++++++++++++++
 ts-freebsd-host-install                |   6 +-
 ts-freebsd-set-hostflags               |  78 +++++++++++
 ts-kernel-build                        |   4 +-
 ts-xen-build                           |   8 +-
 ts-xen-build-prep                      |   4 +-
 26 files changed, 716 insertions(+), 90 deletions(-)
 create mode 100644 daily-cron-email-adhoc--freebsd-master
 create mode 100644 daily-cron-email-play--freebsd-master
 create mode 100644 daily-cron-email-real--freebsd-master
 create mode 100755 make-freebsd-flight
 create mode 100755 ts-build-prep-freebsd
 create mode 100755 ts-freebsd-build
 create mode 100755 ts-freebsd-set-hostflags
Signature · 7 lines
2.13.6 (Apple Git-96)


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw

PATCH v17 17/19 osstest: remove the loader timeout from the install image

When the FreeBSD installer is booted on the godello{0/1} boxes it receives spurious key strokes. This doesn't happen so far when booted from disk, or with any other boxes.

In order to cope with this remove the loader timeout on the install image. Note that failure to boot will still drop the loader into a manual prompt.

---
 ts-freebsd-build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
ts-freebsd-build +2 -1
index 54cb5902..5e7e1078 100755
@@ -135,7 +135,7 @@ chmod 0600 etc/ssh/ssh_host_*_key
 chmod 0644 etc/ssh/ssh_host_*_key.pub
 
 # Setup serial console output for stage1
-printf "%s" "-h -S$bauds" >> boot.config
+printf "%s" "-hn -S$bauds" >> boot.config
 cat << ENDBOOT >> boot/loader.conf
 # Serial console configuration
 boot_serial="YES"
@@ -143,6 +143,7 @@ comconsole_speed="$bauds"
 console="comconsole"
 boot_verbose="YES"
 beastie_disable="YES"
+autoboot_delay="-1"
 
 # mfs boot parameters
 mfs_load="YES"
Signature · 7 lines
2.13.6 (Apple Git-96)


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v17 17/19
#2 lore raw

Re: [PATCH v17 17/19] osstest: remove the loader timeout from the install image

Roger Pau Monne writes ("[PATCH v17 17/19] osstest: remove the loader timeout from the install image"):

Quoted 7 lines

When the FreeBSD installer is booted on the godello{0/1} boxes it receives spurious key strokes. This doesn't happen so far when booted from disk, or with any other boxes.

In order to cope with this remove the loader timeout on the install image. Note that failure to boot will still drop the loader into a manual prompt.

I don't feel qualified to review this and it is confined to FreeBSD bootloader stuff, so

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw

PATCH v17 18/19 osstest: expand the list of tested disk controllers

In reply to Roger Pau Monne

The Mass osstest instance has a more diverse list of hardware disk controllers, so expand the list in order to include all the possible disk drivers.

For the record, this list can be found at:

usr.sbin/bsdconfig/share/device.subr

In the FreeBSD source tree.

---
 ts-freebsd-host-install | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
ts-freebsd-host-install +2 -1
index 573245ad..a12591cb 100755
@@ -122,7 +122,8 @@ sub install () {
     my $authkeys = authorized_keys();
     my $knownhosts = known_hosts();
     my $sshd_keys_url = create_ssh_overlay();
-    my @disk_names = qw(ada0 da0 ad0);
+    my @disk_names =
+        qw(ada0 da0 ad0 aacd0 amrd0 idad0 ipsd0 mfid0 mlxd0 twed0);
     my $target_sets = "/root/osstest_sets";
     my $disk;
     my $nic;
Signature · 7 lines
2.13.6 (Apple Git-96)


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v17 18/19
#4 lore raw

Re: [PATCH v17 18/19] osstest: expand the list of tested disk controllers

Roger Pau Monne writes ("[PATCH v17 18/19] osstest: expand the list of tested disk controllers"):

Quoted 3 lines

The Mass osstest instance has a more diverse list of hardware disk controllers, so expand the list in order to include all the possible disk drivers.

On the same basis as 17/

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw

PATCH v17 19/19 osstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets

In reply to Roger Pau Monne

Due to a recent FreeBSD change the default output directory of the release targets is changed to the object directory instead of the source directory. Use WITHOUT_AUTO_OBJ to restore previous behavior. This is harmless if used with previous versions, it will be ignored.

---
 ts-freebsd-build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ts-freebsd-build +1 -1
index 5e7e1078..5d82d809 100755
@@ -78,7 +78,7 @@ sub build_release ($$$) {
 
     buildcmd_stamped_logged_root($time, 'freebsd', "release-$target",
                                  $prefix, <<END, '');
-make -C release $target
+make -C release $target -DWITHOUT_AUTO_OBJ
 END
 }
 
Signature · 7 lines
2.13.6 (Apple Git-96)


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#6 lore raw

Re: [PATCH v17 19/19] osstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets

Roger Pau Monne writes ("[PATCH v17 19/19] osstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets"):

Quoted 4 lines

Due to a recent FreeBSD change the default output directory of the release targets is changed to the object directory instead of the source directory. Use WITHOUT_AUTO_OBJ to restore previous behavior. This is harmless if used with previous versions, it will be ignored.

So the purpose of this is to make both versions of the build do the same thing, so osstest doesn't have to care ?

Is that why you're not just updating osstest to expect the new behaviour ?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#7 lore raw

Re: [PATCH v17 19/19] osstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets

Quoted 11 lines · Ian Jackson

Roger Pau Monne writes ("[PATCH v17 19/19] osstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets"):

Quoted 4 lines

Due to a recent FreeBSD change the default output directory of the release targets is changed to the object directory instead of the source directory. Use WITHOUT_AUTO_OBJ to restore previous behavior. This is harmless if used with previous versions, it will be ignored.

So the purpose of this is to make both versions of the build do the same thing, so osstest doesn't have to care ?

Is that why you're not just updating osstest to expect the new behaviour ?

Yes, I think it's more sensible to restore the previous behavior so that the same osstest script can be used to build FreeBSD from the master branch or the stable branches.

Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by
#8 lore raw

Re: [PATCH v17 19/19] osstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets

Roger Pau Monné writes ("Re: [PATCH v17 19/19] osstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets"):

Quoted 7 lines · Ian Jackson
Quoted 2 lines

Is that why you're not just updating osstest to expect the new behaviour ?

Yes, I think it's more sensible to restore the previous behavior so that the same osstest script can be used to build FreeBSD from the master branch or the stable branches.

OK, jolly good.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel