lmbench patches
v2 cover lmbench patches
We recently stumbled upon two lmbench issues, one being discovered while investigating the other.
- lmbench's scripts/build script is declared as /bin/sh script, but uses bash only syntax which can lead to errors
- lmbench's install routine doesn't install the lmbench script itself
Here are two patches to address both issues.
Changes since v2:
- used GIT to generate the lmbench patch files, so they contain a description and a signed-off-by line
- no changes to the actual code
Markus Mayer (2):
lmbench: mark scripts/build as bash script
lmbench: install the lmbench script on the target
...-scripts-build-use-bin-bash-as-shell.patch | 28 ++++++++++++++++++ ...e-add-lmbench-to-list-of-executables.patch | 29 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 package/lmbench/0001-scripts-build-use-bin-bash-as-shell.patch create mode 100644 package/lmbench/0002-src-Makefile-add-lmbench-to-list-of-executables.patch
Signature · 1 line
2.17.1
PATCH v2 1/2 lmbench: mark scripts/build as bash script
scripts/build makes use of the "+=" operator which is not supported by /bin/sh. We switch to /bin/bash in order to avoid errors of the form
../scripts/build: 21: ../scripts/build: LDLIBS+= -lm: not found
--- ...-scripts-build-use-bin-bash-as-shell.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/lmbench/0001-scripts-build-use-bin-bash-as-shell.patch
package/lmbench/0001-scripts-build-use-bin-bash-as-shell.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 02a538c2b4b54b41d23dbd7668714ea4d2016131 Mon Sep 17 00:00:00 2001 +From: Markus Mayer <[email protected]> +Date: Thu, 13 Jun 2019 12:27:04 -0700 +Subject: [PATCH 1/2] scripts/build: use /bin/bash as shell + +scripts/build makes use of the "+=" operator which is not supported by +/bin/sh. We switch to /bin/bash in order to avoid errors of the form + + ../scripts/build: 21: ../scripts/build: LDLIBS+= -lm: not found + +Signed-off-by: Markus Mayer <[email protected]> +--- + scripts/build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/build b/scripts/build +index 34a1371d0056..60b755cd2320 100755 +--- a/scripts/build ++++ b/scripts/build +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + + CC=${CC-`../scripts/compiler`} + MAKE=${MAKE-`../scripts/make`} +-- +2.17.1 +
Signature · 1 line
2.17.1
PATCH v2 1/2 lmbench: mark scripts/build as bash script
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Markus" == Markus Mayer <[email protected]> writes:
scripts/buildmakes use of the "+=" operator which is not supported by/bin/sh. We switch to/bin/bashin order to avoid errors of the form../scripts/build: 21: ../scripts/build: LDLIBS+= -lm: not foundSigned-off-by Markus Mayer <[email protected]>
Committed to 2019.02.x and 2019.05.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 2/2 lmbench: install the lmbench script on the target
In reply to Markus MayerWe want to install the lmbench script along with the other executables, so we add it to the appropriate list.
--- ...e-add-lmbench-to-list-of-executables.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/lmbench/0002-src-Makefile-add-lmbench-to-list-of-executables.patch
package/lmbench/0002-src-Makefile-add-lmbench-to-list-of-executables.patch new file +29 -0
@@ -0,0 +1,29 @@ +From c158a02561c64d0cd236f86db24cc20d0378eb72 Mon Sep 17 00:00:00 2001 +From: Markus Mayer <[email protected]> +Date: Thu, 13 Jun 2019 12:28:54 -0700 +Subject: [PATCH 2/2] src/Makefile: add lmbench to list of executables + +We want to install the lmbench script along with the other executables, +so we add it to the appropriate list. + +Signed-off-by: Markus Mayer <[email protected]> +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 4962815b5fe7..70dbc6794898 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -98,7 +98,7 @@ EXES = $O/bw_file_rd $O/bw_mem $O/bw_mmap_rd $O/bw_pipe $O/bw_tcp \ + $O/lat_select $O/lat_pipe $O/lat_rpc $O/lat_syscall $O/lat_tcp \ + $O/lat_udp $O/lat_mmap $O/mhz $O/lat_proc $O/lat_pagefault \ + $O/lat_connect $O/lat_fs $O/lat_sig $O/lat_mem_rd $O/lat_ctx \ +- $O/lat_sem \ ++ $O/lat_sem $O/lmbench \ + $O/memsize $O/lat_unix $O/lmdd $O/timing_o $O/enough \ + $O/msleep $O/loop_o $O/lat_fifo $O/lmhttp $O/lat_http \ + $O/lat_fcntl $O/disk $O/lat_unix_connect $O/flushdisk \ +-- +2.17.1 +
Signature · 1 line
2.17.1
PATCH v2 2/2 lmbench: install the lmbench script on the target
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Markus" == Markus Mayer <[email protected]> writes:
We want to install the lmbench script along with the other executables, so we add it to the appropriate list.
Signed-off-by Markus Mayer <[email protected]>
Committed to 2019.02.x and 2019.05.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
v2 cover lmbench patches
In reply to Markus MayerQuoted 3 lines · On Thu, 13 Jun 2019 12:50:45 -0700 Markus Mayer <[email protected]> wrote:
Markus Mayer (2):
lmbench: markscripts/buildas bash script
lmbench: install the lmbench script on the target
Both applied, thanks! Unfortunately, there isn't really any upstream where to send those patches :-/
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com