jjb: babeltrace: use clang-format-16 master
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 27 May 2024 13:52:15 +0000 (09:52 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 29 May 2024 20:23:39 +0000 (16:23 -0400)
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Change-Id: I97e7719f478fe9305ee420bb41176df57e78b813

31 files changed:
automation/ansible/group_vars/node_armhf.yml [deleted file]
automation/ansible/group_vars/node_standalone.yml
automation/ansible/group_vars/node_wandboard.yml [new file with mode: 0644]
automation/ansible/host_vars/ci-rootnode-deb12-amd64-1c-02.yml
automation/ansible/hosts
automation/ansible/hosts.yml
automation/ansible/playbooks/ci-instances.yml
automation/ansible/roles/common/tasks/setup-Windows.yml
automation/ansible/roles/compilers/vars/Debian-12.yml
automation/ansible/roles/cross-compilers/defaults/main.yml
automation/ansible/roles/cross-compilers/tasks/setup-Alpine.yml
automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml
automation/ansible/roles/cross-compilers/tasks/setup-RedHat.yml
automation/ansible/roles/libvirt/tasks/main.yml
automation/ansible/roles/lttng-tools/vars/Debian.yml
automation/ansible/roles/lttng-tools/vars/RedHat.yml
automation/ansible/roles/lttng-tools/vars/Suse.yml
automation/ansible/roles/lxd/defaults/main.yml
automation/ansible/roles/lxd/tasks/container.yml
automation/ansible/roles/requirements.yml
automation/ansible/roles/suse/tasks/product.yml
automation/ansible/vars/ci-instances.yml
jobs/babeltrace.yaml
jobs/binutils-gdb.yaml
jobs/lttng-modules.yaml
scripts/babeltrace/build.sh
scripts/babeltrace/lint.sh
scripts/binutils-gdb/build.sh
scripts/liburcu/build.sh
scripts/lttng-modules/param-build.sh
scripts/lttng-tools/build.sh

diff --git a/automation/ansible/group_vars/node_armhf.yml b/automation/ansible/group_vars/node_armhf.yml
deleted file mode 100644 (file)
index 27c2931..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
----
-# The SATA controllers on the boards that are running the armhf
-# nodes are somewhat flaky, and the root filesystem often ends
-# up readonly due to errors. When the FS goes read-only, jobs
-# will fail so the easiest action is to have the node reboot.
-common_node_rootfs_readonly_reboot: true
index d6f5adbb09c2eff1dea7a9452477dcfcd544acec..ab43b4c654a05a2c45355c0203745c07d7c7aadb 100644 (file)
@@ -1,4 +1,8 @@
 ---
+
+# Jenkins connects to the standalone nodes as the root user
+jenkins_user: false
+
 # jenkins connects to standalone nodes as the root user
 extra_root_ssh_authorized_keys:
   # yamllint disable-line rule:line-length
diff --git a/automation/ansible/group_vars/node_wandboard.yml b/automation/ansible/group_vars/node_wandboard.yml
new file mode 100644 (file)
index 0000000..27c2931
--- /dev/null
@@ -0,0 +1,6 @@
+---
+# The SATA controllers on the boards that are running the armhf
+# nodes are somewhat flaky, and the root filesystem often ends
+# up readonly due to errors. When the FS goes read-only, jobs
+# will fail so the easiest action is to have the node reboot.
+common_node_rootfs_readonly_reboot: true
index 2a872070d9f73dae33f9c988df1684be05918a6c..4abe413a9970c82896480eb4836ec35b0a61bbbb 100644 (file)
@@ -1,4 +1,10 @@
 ---
+# This node uses an older linux kernel for u32/u64 integration tests
+# which creates conflicting package dependencies
+#
+cross_compilers_debian_bookworm_snapshot: false
+cross_compilers_install: false
+
 netplan_manage: true
 netplan_content: |
   network:
index 793f4a45720c981267ec9852bc73c1714d2dd0d9..345e21c2617e31f7e780a68309f2b07325915bed 100644 (file)
@@ -33,6 +33,9 @@ ci-host-win11-arm64-01.internal.efficios.com
 [infra_lava]
 lava-master-03.internal.efficios.com
 
+[node_wandboard]
+ci-node-deb12-armhf-[01:08]
+
 [node_armhf]
 ci-node-deb12-armhf-01
 ci-node-deb12-armhf-02
@@ -193,9 +196,18 @@ ci-rootnode-el8-amd64-1d-01
 # While ci-node-sles12sp5-amd64-1b-01 has python 3.4, more recent
 # versions of ansible require python 3.5. Therefore python2 is used.
 ci-node-sles12sp5-amd64-1b-01 ansible_python_interpreter=python2
+ci-node-sles12sp5-amd64-2a-01 ansible_python_interpreter=python2
+ci-node-sles12sp5-amd64-2b-01 ansible_python_interpreter=python2
+ci-node-sles12sp5-amd64-2c-01 ansible_python_interpreter=python2
 ci-node-sles15sp4-amd64-1b-01
+ci-node-sles15sp4-amd64-2a-01
+ci-node-sles15sp4-amd64-2b-01
+ci-node-sles15sp4-amd64-2c-01
 ci-rootnode-sles15sp4-amd64-1d-01
 ci-node-sles15sp5-amd64-1b-01
+ci-node-sles15sp5-amd64-2a-01
+ci-node-sles15sp5-amd64-2b-01
+ci-node-sles15sp5-amd64-2c-01
 
 [node_el]
 ci-node-el7-amd64-02-01 ansible_python_interpreter=python2
index 33b9062a953359ddfb31cf39a18d48880e27d643..1cb9dd06bc2770b4129c8ffc40e77c78f365b3f8 100644 (file)
@@ -1,10 +1,14 @@
 ---
-- hosts: hosts
+- hosts: hosts:!windows
   roles:
     # Setup filesystem and network configuration before other roles
     - zfs
     - netplan
+- hosts: hosts
+  roles:
     - common
+- hosts: hosts:!windows
+  roles:
     - libvirt
     - lxd
     - rasdaemon
index 1259a7a724d71c282032badb465cb662f2f6e1a9..b4cfac57f8ff87553fe698239afbbc0947303a17 100644 (file)
@@ -36,7 +36,7 @@
         object: "{{item.vm}}"
       with_items: "{{containers}}"
     - name: Update DNS entries
-      when: not skip_dns and inventory_hostname == 'localhost'
+      when: not skip_dns and inventory_hostname == 'localhost' and item.meta|default(false)
       with_items: "{{containers}}"
       ansible.builtin.command:
         argv: [
index 2ef6c889f2455f39bc3028565e43bfd4a5b29627..5c81a81829c0c30f0808f4ed42d5707b7ce34dea 100644 (file)
     name: sshd
     start_mode: auto
     state: started
+- name: Allow Terminal Server connections
+  ansible.windows.win_regedit:
+    path: 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server'
+    name: 'fDenyTSConnections'
+    data: '0'
+    type: 'dword'
+- name: Run RDP automatically
+  ansible.windows.win_service:
+    name: 'TermService'
+    start_mode: 'auto'
+    state: 'started'
 - name: Turn off standy
   ansible.windows.win_command: 'C:\Windows\system32\powercfg.exe /change standby-timeout-ac 0'
 - name: Turn off hibernation
   ansible.windows.win_template:
     src: 'authorized_keys.j2'
     dest: 'c:\ProgramData\ssh\administrators_authorized_keys'
-
+# c.f. https://galaxy.ansible.com/ui/repo/published/community/windows/content/module/win_firewall_rule/
+- name: Firewall rule to alloc ICMP v4 on all type codes
+  community.windows.win_firewall_rule:
+    name: ICMP Allow incoming V4 echo request
+    enabled: true
+    state: present
+    profiles:
+      - domain
+      - private
+      - public
+    action: allow
+    direction: in
+    protocol: icmpv4
+    icmp_type_code: '*'
+- name: Firewall rule to allow RDP on TCP port 3389
+  community.windows.win_firewall_rule:
+    name: Remote Desktop
+    localport: 3389
+    action: allow
+    direction: in
+    protocol: tcp
+    profiles:
+      - domain
+      - private
+    state: present
+    enabled: true
 - name: Reboot if domain changed
   when: domain_state.reboot_required
   ansible.windows.win_reboot:
index 4c6c41ffb5103609573d6b46e92b51313d9e9c59..8e0ac5db3d926f4e56aa94036e77f3d9214fc4f4 100644 (file)
@@ -10,16 +10,20 @@ compilers_packages:
   - clang-13
   - clang-14
   - clang-15
+  - clang-16
   - libclang-dev
   - libclang-13-dev
   - libclang-14-dev
   - libclang-15-dev
+  - libclang-16-dev
   - clang-format
   - clang-format-13
   - clang-format-14
   - clang-format-15
+  - clang-format-16
   - clang-tidy
   - clang-tidy-13
   - clang-tidy-14
   - clang-tidy-15
+  - clang-tidy-16
   - bear
index d50918bc1b74f231fe293121b702071099347d33..0123d7bf36c3903a3730a6a0d75136f9c8e3354e 100644 (file)
@@ -1,3 +1,4 @@
 ---
 compilers_legacy_install: true
 cross_compilers_debian_bookworm_snapshot: false
+cross_compilers_install: true
index 64f96daf68767081c2cd1d9a547d7913ad27244e..a2162313de0d094875c30d640291c9c21e8da041 100644 (file)
@@ -3,4 +3,5 @@
   apk: update_cache=yes
 
 - name: Ensure cross-compilers packages are installed.
+  when: cross_compilers_install|default(true)
   apk: "name={{ cross_compilers_packages }} state=present"
index 95173f243d5e72196c3d5e3a214d678507e8556d..95add22384109a7e115861d25d48a8f0a7d0ae07 100644 (file)
@@ -16,6 +16,7 @@
         update_cache: true
 
 - name: Ensure cross-compilers packages are installed.
+  when: cross_compilers_install|default(true)
   ansible.builtin.apt:
     name: "{{ cross_compilers_packages | difference(lookup('vars', 'cross_compilers_packages_exclude_{{ansible_userspace_architecture|default(ansible_architecture)}}', default=[]))}}"
 
index c8429d20a37f2e9a1fd1f47424f46f36d9868583..dd410757309848010c89653425adf2f63fed87f3 100644 (file)
@@ -1,5 +1,6 @@
 ---
 - name: Ensure cross-compilers packages are installed.
+  when: cross_compilers_install|default(true)
   dnf:
     name: "{{ cross_compilers_packages }}"
     state: installed
index d773102ce8f1e9180ca063bfa220d7923d8edaf0..93569f8e57a5ed58b4f6710bbe39a8e57e4f3f11 100644 (file)
@@ -1,7 +1,7 @@
 ---
 - name: Install virtualization packages
   apt:
-    name: ['qemu-kvm', 'libvirt-daemon-system', 'python3-libvirt']
+    name: ['qemu-kvm', 'libvirt-daemon-system', 'python3-libvirt', 'python3-lxml']
 - name: Run libvirtd
   systemd:
     name: libvirtd
index b03ecdbdd68ecc06716e52a777285c0b8077277e..4e8423df0e30c7796f25c4163231086ed433ec93 100644 (file)
@@ -5,6 +5,7 @@ lttng_tools_packages:
   - libpopt-dev
   - libxml2-dev
   - shellcheck
+  - systemtap-sdt-dev
 
 lttng_tools_packages_no_recommends:
   - asciidoc
index 2f80ef9c9a95e4cd696919e183c834acce8579a2..85b79cc03da397f553f0a41d58e1dafc8bde2b60 100644 (file)
@@ -4,4 +4,5 @@ lttng_tools_packages:
   - bash-completion
   - libxml2-devel
   - popt-devel
+  - systemtap-sdt-devel
   - xmlto
index b41902c51a97fcb3a37060b9df4a98ccff998bc3..41f7ad3a4950f60e3755b679aeb13e084b5d2ffa 100644 (file)
@@ -3,6 +3,7 @@ lttng_tools_packages:
   - bash-completion
   - libxml2-devel
   - popt-devel
+  - systemtap-sdt-devel
 
 lttng_tools_packages_no_recommends:
   - asciidoc
index 3ce91fe90e88bf7699ead96a19f9184624f52855..d5dcf0513bd57df46f0ea5b8476efcfecd6b2360 100644 (file)
@@ -6,7 +6,7 @@ lxd_container_defaults:
   source:
     type: image
     mode: pull
-    server: https://images.linuxcontainers.org
-    protocol: simplestreams
-    alias: debian/bookworm/cloud/amd64
+    # Until the cluster is migrated to Incus, this source will not work
+    # server: https://images.linuxcontainers.org
+    alias: debian/bookworm/cloud/amd64/ci-node/lxd
   wait_for_container: true
index 1f68334ca761e0ecf0c94a3a7aff50b7b46bb599..2dfe552402a5e7d37abac78a60c7a3e001375ce3 100644 (file)
@@ -2,5 +2,5 @@
 - name: Merge defaults
   set_fact:
     lxd_container_config: "{{lxd_container_defaults|combine(object)}}"
-- name: Manage container
+- name: "Manage container {{lxd_container_config.name|default('Unknown')}}"
   community.general.lxd_container: "{{lxd_container_config}}"
index 649feecbb0a8ffc50c4c992035a94ffe2aad971f..583571d483c778ecd07fd39fbb3e84b9c7d9cea4 100644 (file)
@@ -3,3 +3,6 @@ collections:
   - name: community.general
     version: '>=5.4.0'
     type: galaxy
+  - name: community.windows
+    version: '>=2.2.0'
+    type: galaxy
index 0847a6c081fe580616570a370e557c294d98d998..2979582f5deabf3927ba651ed5619ad713893b2d 100644 (file)
@@ -1,12 +1,12 @@
 ---
 
-- name: Connect product using full version
+- name: "Connect product '{{product}}' using full version"
   ansible.builtin.command:
-    argv: ['suseconnect', '-p', "{{product}}/{{ansible_distribution_version}}/{{ansible_architecture}}"]
+    argv: ['SUSEConnect', '-p', "{{product}}/{{ansible_distribution_version}}/{{ansible_architecture}}"]
   register: connect
   ignore_errors: true
 # Some products don't use the full version, but only the major version
-- name: Connect production using major version
+- name: "Connect product '{{product}}' using major version"
   when: connect.rc != 0
   ansible.builtin.command:
-    argv: ['suseconnect', '-p', "{{product}}/{{ansible_distribution_major_version}}/{{ansible_architecture}}"]
+    argv: ['SUSEConnect', '-p', "{{product}}/{{ansible_distribution_major_version}}/{{ansible_architecture}}"]
index 0b5f27a798f04e61ad5c54944de90e0b43e419a2..c1c6ad7eb29876774fba0dff77dc0744be7fcf9f 100644 (file)
@@ -98,62 +98,6 @@ containers:
           #   zfs create -o mountpoint=/storage/git-mirror tank/lxd/custom/git-mirror
           source: /storage/git-mirror
           type: disk
-  - meta:
-      address: 172.18.16.1
-    lxd:
-      name: ci-node-deb12-amd64-01
-    jenkins:
-      label: 'deb12-amd64 deb12'
-      mode: EXCLUSIVE
-  - meta:
-      address: 172.18.16.2
-    lxd:
-      name: ci-node-deb12-amd64-02
-    jenkins:
-      label: 'deb12-amd64 deb12'
-      mode: EXCLUSIVE
-  - meta:
-      address: 172.18.16.3
-    lxd:
-      name: ci-node-deb12-amd64-03
-    jenkins:
-      label: 'deb12-amd64 deb12'
-      mode: EXCLUSIVE
-  - meta:
-      address: 172.18.16.4
-    lxd:
-      name: ci-node-deb12-amd64-04
-    jenkins:
-      label: 'deb12-amd64 deb12'
-      mode: EXCLUSIVE
-  - meta:
-      address: 172.18.16.5
-    lxd:
-      name: ci-node-deb12-amd64-05
-    jenkins:
-      label: 'deb12-amd64 deb12'
-      mode: EXCLUSIVE
-  - meta:
-      address: 172.18.16.6
-    lxd:
-      name: ci-node-deb12-amd64-06
-    jenkins:
-      label: 'deb12-amd64 deb12'
-      mode: EXCLUSIVE
-  - meta:
-      address: 172.18.16.7
-    lxd:
-      name: ci-node-deb12-amd64-07
-    jenkins:
-      label: 'deb12-amd64 deb12'
-      mode: EXCLUSIVE
-  - meta:
-      address: 172.18.16.8
-    lxd:
-      name: ci-node-deb12-amd64-08
-    jenkins:
-      label: 'deb12-amd64 deb12'
-      mode: EXCLUSIVE
   - meta:
       address: 172.18.16.9
     lxd:
@@ -785,6 +729,99 @@ containers:
     jenkins:
       label: 'deb12-i386 deb12'
       mode: EXCLUSIVE
+  - meta:
+      address: 172.18.16.91
+    lxd:
+      name: ci-node-sles15sp4-amd64-2a-01
+      target: ci-host-amd64-2a
+      source:
+        alias: 'sles/15.4/cloud/amd64/ci-node/lxd'
+        type: image
+    jenkins:
+      label: 'sles15sp4-amd64'
+      mode: EXCLUSIVE
+  - meta:
+      address: 172.18.16.92
+    lxd:
+      name: ci-node-sles15sp4-amd64-2b-01
+      target: ci-host-amd64-2b
+      source:
+        alias: 'sles/15.4/cloud/amd64/ci-node/lxd'
+        type: image
+    jenkins:
+      label: 'sles15sp4-amd64'
+      mode: EXCLUSIVE
+  - meta:
+      address: 172.18.16.93
+    lxd:
+      name: ci-node-sles15sp4-amd64-2c-01
+      target: ci-host-amd64-2c
+      source:
+        alias: 'sles/15.4/cloud/amd64/ci-node/lxd'
+        type: image
+    jenkins:
+      label: 'sles15sp4-amd64'
+      mode: EXCLUSIVE
+  - meta:
+      address: 172.18.16.94
+    lxd:
+      name: ci-node-sles15sp5-amd64-2a-01
+      target: ci-host-amd64-2a
+      source:
+        alias: 'sles/15.5/cloud/amd64/ci-node/lxd'
+        type: image
+    jenkins:
+      label: 'sles15sp5-amd64'
+      mode: EXCLUSIVE
+  - meta:
+      address: 172.18.16.95
+    lxd:
+      name: ci-node-sles15sp5-amd64-2b-01
+      target: ci-host-amd64-2b
+      source:
+        alias: 'sles/15.5/cloud/amd64/ci-node/lxd'
+        type: image
+    jenkins:
+      label: 'sles15sp5-amd64'
+      mode: EXCLUSIVE
+  - meta:
+      address: 172.18.16.96
+    lxd:
+      name: ci-node-sles15sp5-amd64-2c-01
+      target: ci-host-amd64-2c
+      source:
+        alias: 'sles/15.5/cloud/amd64/ci-node/lxd'
+        type: image
+    jenkins:
+      label: 'sles15sp5-amd64'
+      mode: EXCLUSIVE
+  - meta:
+      address: 172.18.16.97
+    jenkins:
+      label: 'sles12sp5-amd64'
+      mode: EXCLUSIVE
+    vm:
+      name: 'ci-node-sles12sp5-amd64-2a-01'
+      disk: '/var/lib/libvirt/images/ci-node-sles12sp5-amd64-2a-01.qcow'
+      host: 'ci-host-amd64-2a.internal.efficios.com'
+  - meta:
+      address: 172.18.16.98
+    jenkins:
+      label: 'sles12sp5-amd64'
+      mode: EXCLUSIVE
+    vm:
+      name: 'ci-node-sles12sp5-amd64-2b-01'
+      disk: '/var/lib/libvirt/images/ci-node-sles12sp5-amd64-2b-01.qcow'
+      host: 'ci-host-amd64-2b.internal.efficios.com'
+  - meta:
+      address: 172.18.16.99
+    jenkins:
+      label: 'sles12sp5-amd64'
+      mode: EXCLUSIVE
+    vm:
+      name: 'ci-node-sles12sp5-amd64-2c-01'
+      disk: '/var/lib/libvirt/images/ci-node-sles12sp5-amd64-2c-01.qcow'
+      host: 'ci-host-amd64-2c.internal.efficios.com'
   # "Root " nodes in libvirt, since Jenkins can use the "libvirt agents" plugin
   # to revert to a specific snapshot before running a job
   #
index e2806277c20828691fba1232295d52192f231e9d..fc8aae75371042f174be8dc979f467b12e59a853 100644 (file)
 
     publishers:
       - archive:
-          artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out'
+          artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out,check-include-guards.out'
           allow-empty: false
       - workspace-cleanup: *babeltrace_publisher_workspace-cleanup_defaults
 
     publishers:
       - workspace-cleanup: *babeltrace_publisher_workspace-cleanup_defaults
       - archive:
-          artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out'
+          artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out,check-include-guards.out'
           allow-empty: false
       - ircbot: *babeltrace_publisher_ircbot_defaults
       - email-ext: *babeltrace_publisher_email-ext_defaults
           filter: ''
           touchstone: ''
           warnings_status: FAILED
+      - 'dev_review_babeltrace_{version}_{buildtype}':
+          buildtype: slesbuild
+          platforms: !!python/tuple [sles12sp5-amd64, sles15sp4-amd64, sles15sp5-amd64]
+          builds: !!python/tuple [std]
+          confs: !!python/tuple [std]
+          filter: ''
+          touchstone: ''
+          warnings_status: FAILED
       - 'dev_review_babeltrace_{version}_{buildtype}':
           version: master
           buildtype: winbuild
index 28fcf9b92d9201685ec747faca53fd081d422088..2e2d9148bad1d2a43915567b760720e86b5a2020 100644 (file)
           platforms: !!python/tuple [deb12-amd64]
           target_boards: !!python/tuple ["unix", "native-gdbserver", "native-extended-gdbserver"]
       - 'binutils-gdb_{version}_macosbuild':
-          platforms: !!python/tuple [macos-amd64, macos-arm64]
+          platforms: !!python/tuple [macos-arm64]
           target_boards: !!python/tuple ["unix"]
 
 - project:
index 744a712e3b24a14debc33bce469d212605aca031..f5ce833751af6c44ef8a49e44a1f641840f0f8bf 100644 (file)
       - string:
           name: 'mversion'
           default: 'master'
-          description: 'The lttng-modules branch to build.'
+          description: 'The lttng-modules branch to build. Use `refs/XXX` for a specific ref, or a commit hash.'
       - string:
           name: 'mgitrepo'
           default: 'git://git-mirror.internal.efficios.com/lttng/lttng-modules.git'
           name: 'getsrc_version'
           default: 'main'
           description: 'The tag or commit to use when cloning the getsrc tool'
+      - bool:
+          name: 'DEBUG'
+          default: false
+          description: "Enable verbose builds"
+      - bool:
+          name: 'FAIL_ON_WARNINGS'
+          default: false
+          description: "Fail the lttng-modules build if there are any warnings"
 
     concurrent: true
 
index e09324cbc35cdb48b2bbb68f22b8e44fc5cf7f28..12900c74fe0e07c66ce6c649e9dd85fa31df4ec6 100755 (executable)
@@ -70,6 +70,25 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+mktemp_compat() {
+    case "$platform" in
+        macos*)
+            # On MacOSX, mktemp doesn't respect TMPDIR in the same way as many
+            # other systems. Use the final positional argument to force the
+            # tempfile or tempdir to be created inside $TMPDIR, which must
+            # already exist.
+            if [ -n "${TMPDIR}" ] ; then
+                mktemp "${@}" "${TMPDIR}/tmp.XXXXXXXXXX"
+            else
+                mktemp "${@}"
+            fi
+        ;;
+        *)
+            mktemp "${@}"
+        ;;
+    esac
+}
+
 print_header() {
     set +x
 
@@ -327,7 +346,7 @@ oot)
     print_header "Build: Out of tree"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
@@ -342,7 +361,7 @@ dist)
     $MAKE dist
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     # Extract the distribution tar in the build directory,
@@ -357,14 +376,14 @@ oot-dist)
     print_header "Build: Distribution Out of tree"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     # Run configure out of tree and generate the tar file
     "$SRCDIR/configure" || failed_configure
     $MAKE dist
 
-    dist_srcdir="$(mktemp -d)"
+    dist_srcdir="$(mktemp_compat -d)"
     cd "$dist_srcdir"
 
     # Extract the distribution tar in the new source directory,
@@ -372,7 +391,7 @@ oot-dist)
     $TAR xvf "$builddir"/*.tar.* --strip 1
 
     # Create and enter a second temporary build directory
-    builddir="$(mktemp -d)"
+    builddir="$(mktemp_compat -d)"
     cd "$builddir"
 
     # Run configure from the extracted distribution tar,
index e17799012f0686e8fe1753d246defc306b935577..5581c35fd0b1fb76a3fcc0be466071197ab0ce4f 100755 (executable)
@@ -61,7 +61,7 @@ else
 fi
 
 if [[ -f tools/format-cpp.sh ]]; then
-    FORMATTER="clang-format-15 -i" tools/format-cpp.sh
+    FORMATTER="clang-format-16 -i" tools/format-cpp.sh
     git diff --exit-code | tee ../../clang-format.out || exit_code=1
 fi
 
@@ -69,4 +69,8 @@ if [[ -f tools/shellcheck.sh ]]; then
     tools/shellcheck.sh | tee ../../shellcheck.out || exit_code=1
 fi
 
+if [[ -f tools/check-include-guards.sh ]]; then
+    tools/check-include-guards.sh | tee ../../check-include-guards.out || exit_code=1
+fi
+
 exit $exit_code
index e96422081d81eccc5dadad6de6fe1f3cdbc0150e..3d7c561a477f60e75105289a7c2f9ca803a8fe5a 100755 (executable)
 
 set -exu
 
+mktemp_compat() {
+    case "$platform" in
+        macos*)
+            # On MacOSX, mktemp doesn't respect TMPDIR in the same way as many
+            # other systems. Use the final positional argument to force the
+            # tempfile or tempdir to be created inside $TMPDIR, which must
+            # already exist.
+            if [ -n "${TMPDIR}" ] ; then
+                mktemp "${@}" "${TMPDIR}/tmp.XXXXXXXXXX"
+            else
+                mktemp "${@}"
+            fi
+        ;;
+        *)
+            mktemp "${@}"
+        ;;
+    esac
+}
+
+print_header() {
+    set +x
+
+    local message=" $1 "
+    local message_len
+    local padding_len
+
+    message_len="${#message}"
+    padding_len=$(( (80 - (message_len)) / 2 ))
+
+    printf '\n'; printf -- '#%.0s' {1..80}; printf '\n'
+    printf -- '-%.0s' {1..80}; printf '\n'
+    printf -- '#%.0s' $(seq 1 $padding_len); printf '%s' "$message"; printf -- '#%.0s' $(seq 1 $padding_len); printf '\n'
+    printf -- '-%.0s' {1..80}; printf '\n'
+    printf -- '#%.0s' {1..80}; printf '\n\n'
+
+    set -x
+}
+
 failed_configure() {
     # Assume we are in the configured build directory
     echo "#################### BEGIN config.log ####################"
@@ -264,7 +302,7 @@ case "$build" in
     echo "Out of tree build"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
index cc4d15c85462a00b004b7eeb8a3de9b6157bd13e..d7ae0d1641d75edf6c52d0a8935f4d681cca79bc 100755 (executable)
@@ -61,6 +61,25 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+mktemp_compat() {
+    case "$platform" in
+        macos*)
+            # On MacOSX, mktemp doesn't respect TMPDIR in the same way as many
+            # other systems. Use the final positional argument to force the
+            # tempfile or tempdir to be created inside $TMPDIR, which must
+            # already exist.
+            if [ -n "${TMPDIR}" ] ; then
+                mktemp "${@}" "${TMPDIR}/tmp.XXXXXXXXXX"
+            else
+                mktemp "${@}"
+            fi
+        ;;
+        *)
+            mktemp "${@}"
+        ;;
+    esac
+}
+
 print_header() {
     set +x
 
@@ -268,7 +287,7 @@ oot)
     print_header "Build: Out of tree"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
@@ -283,7 +302,7 @@ dist)
     $MAKE dist
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     # Extract the distribution tar in the build directory,
@@ -298,14 +317,14 @@ oot-dist)
     print_header "Build: Distribution Out of tree"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     # Run configure out of tree and generate the tar file
     "$SRCDIR/configure" || failed_configure
     $MAKE dist
 
-    dist_srcdir="$(mktemp -d)"
+    dist_srcdir="$(mktemp_compat -d)"
     cd "$dist_srcdir"
 
     # Extract the distribution tar in the new source directory,
@@ -313,7 +332,7 @@ oot-dist)
     $TAR xvf "$builddir"/*.tar.* --strip 1
 
     # Create and enter a second temporary build directory
-    builddir="$(mktemp -d)"
+    builddir="$(mktemp_compat -d)"
     cd "$builddir"
 
     # Run configure from the extracted distribution tar,
index ba93fd42148fb2165c9b4cee1e2a68e11e5453bf..310e22b1e5cf7c1beff22fb6943d13e43bb2598e 100644 (file)
@@ -27,6 +27,10 @@ mgitrepo=${mgitrepo:-}
 make_args=()
 
 DEBUG=${DEBUG:-}
+FAIL_ON_WARNINGS="${FAIL_ON_WARNINGS:-}"
+if [[ "${FAIL_ON_WARNINGS}" == "false" ]] ; then
+    FAIL_ON_WARNINGS=''
+fi
 
 # Derive arch from label if it isn't set
 if [ -z "${arch:-}" ] ; then
@@ -83,9 +87,10 @@ print_header() {
 git_clone_modules_sources() {
     mkdir -p "$MODULES_GIT_DIR"
 
-    # If the version starts with "refs/", checkout the specific git ref, otherwise treat it
-    # as a branch name.
-    if [ "${mversion:0:5}" = "refs/" ]; then
+    # If the version starts with "refs/" or looks like a commit hash,
+    # checkout the specific git ref, otherwise treat it as a branch name.
+    pattern="^[0-9a-f]{40}$"
+    if [ "${mversion:0:5}" = "refs/" ] || [[ "${mversion}" =~ $pattern ]]; then
         git clone --no-tags --depth=1 "${mgitrepo}" "$MODULES_GIT_DIR"
         (cd "$MODULES_GIT_DIR" && git fetch origin "${mversion}" && git checkout FETCH_HEAD)
     else
@@ -1006,13 +1011,18 @@ build_modules() {
 
     kversion=$(make -C "$LINUX_HDROBJ_DIR" -s kernelversion)
 
-    # Try to catch some compatibility problems by turning some
-    # warnings into errors.
-    #export KCFLAGS="$KCFLAGS -Wall -Werror"
-
     # Enter lttng-modules source dir
     cd "${MODULES_GIT_DIR}"
 
+    # Try to catch some compatibility problems by turning some
+    # warnings into errors, but only on -rc kernels.
+    pattern="rc[0-9]+$"
+    if [[ "${kversion}" =~ ${pattern} ]] || [[ -n "${FAIL_ON_WARNINGS:-}" ]] ; then
+        export KCFLAGS="${KCFLAGS} -Wall -Werror"
+        # Without the verbose build, the warnings aren't visible.
+        export V=1
+    fi
+
     # kernels 3.10 to 3.10.13 and 3.11 to 3.11.2 introduce a deadlock in the
     # timekeeping subsystem. We want those build to fail.
     if { vergte "$kversion" "3.10" && verlte "$kversion" "3.10.13"; } || \
index c241e7ba9d256cb86bf238c1449bcfc87a34c3ea..bb2b6b59e085e603b5c399c335469c299753468c 100755 (executable)
@@ -63,6 +63,25 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+mktemp_compat() {
+    case "$platform" in
+        macos*)
+            # On MacOSX, mktemp doesn't respect TMPDIR in the same way as many
+            # other systems. Use the final positional argument to force the
+            # tempfile or tempdir to be created inside $TMPDIR, which must
+            # already exist.
+            if [ -n "${TMPDIR}" ] ; then
+                mktemp "${@}" "${TMPDIR}/tmp.XXXXXXXXXX"
+            else
+                mktemp "${@}"
+            fi
+        ;;
+        *)
+            mktemp "${@}"
+        ;;
+    esac
+}
+
 print_header() {
     set +x
 
@@ -399,7 +418,7 @@ oot)
     print_header "Build: Out of tree"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
@@ -415,7 +434,7 @@ dist)
     $MAKE dist
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     # Extract the distribution tar in the build directory,
@@ -430,14 +449,14 @@ oot-dist)
     print_header "Build: Distribution Out of tree"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     # Run configure out of tree and generate the tar file
     "$SRCDIR/configure" "${DIST_CONF_OPTS[@]}" || failed_configure
     $MAKE dist
 
-    dist_srcdir="$(mktemp -d)"
+    dist_srcdir="$(mktemp_compat -d)"
     cd "$dist_srcdir"
 
     # Extract the distribution tar in the new source directory,
@@ -445,7 +464,7 @@ oot-dist)
     $TAR xvf "$builddir"/*.tar.* --strip 1
 
     # Create and enter a second temporary build directory
-    builddir="$(mktemp -d)"
+    builddir="$(mktemp_compat -d)"
     cd "$builddir"
 
     # Run configure from the extracted distribution tar,
This page took 0.044628 seconds and 4 git commands to generate.