Skip to contentSkip to conversation

lmbench: Fix webpage-lm and manual page typos

PATCH In review He Zhe 2 participants 4 messages Jan 22, 2021 – Jan 25, 2021

lore
Share & tools
lore

He Zhe

author
#0 lore raw

PATCH 1/2 lmbench: Fix webpage-lm and manual page typos

/usr/binlmbench references src/webpages which was never copied to target. Fix this and a bunch of typos in manual pages

---
 .../0001-doc-Fix-typos-in-manual-pages.patch  | 100 ++++++++++++++++++
 ...Point-webpage-lm-to-target-directory.patch |  77 ++++++++++++++
 .../lmbench/lmbench_3.0-a9.bb                 |   3 +
 3 files changed, 180 insertions(+)
 create mode 100644 meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-doc-Fix-typos-in-manual-pages.patch
 create mode 100644 meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lmbench-Point-webpage-lm-to-target-directory.patch
meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-doc-Fix-typos-in-manual-pages.patch new file +100 -0
new file mode 100644
index 000000000..b27e6c9fe
@@ -0,0 +1,100 @@
+From a8d86a2d994a008dab3c3ecad65528c0e5fc2cba Mon Sep 17 00:00:00 2001
+From: He Zhe <[email protected]>
+Date: Fri, 22 Jan 2021 11:22:48 +0800
+Subject: [PATCH] doc: Fix typos in manual pages
+
+Signed-off-by: He Zhe <[email protected]>
+---
+ doc/bw_mem.8     | 2 +-
+ doc/lat_fcntl.8  | 2 +-
+ doc/lat_fifo.8   | 2 +-
+ doc/lat_http.8   | 6 +++---
+ doc/lat_select.8 | 2 +-
+ doc/lat_sig.8    | 2 +-
+ 6 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/doc/bw_mem.8 b/doc/bw_mem.8
+index 33df417..9e84d73 100644
+--- a/doc/bw_mem.8
++++ b/doc/bw_mem.8
+@@ -3,7 +3,7 @@
+ .SH NAME
+ bw_mem \- time memory bandwidth
+ .SH SYNOPSIS
+-.B bw_mem_cp
++.B bw_mem
+ [
+ .I "-P <parallelism>"
+ ]
+diff --git a/doc/lat_fcntl.8 b/doc/lat_fcntl.8
+index cf3c93e..2e501d6 100644
+--- a/doc/lat_fcntl.8
++++ b/doc/lat_fcntl.8
+@@ -3,7 +3,7 @@
+ .SH NAME
+ lat_fcntl \- fcntl file locking benchmark
+ .SH SYNOPSIS
+-.B lat_ctx 
++.B lat_fcntl
+ [
+ .I "-P <parallelism>"
+ ]
+diff --git a/doc/lat_fifo.8 b/doc/lat_fifo.8
+index 65e5a08..90bc900 100644
+--- a/doc/lat_fifo.8
++++ b/doc/lat_fifo.8
+@@ -3,7 +3,7 @@
+ .SH NAME
+ lat_fifo \- FIFO benchmark
+ .SH SYNOPSIS
+-.B lat_ctx 
++.B lat_fifo
+ [
+ .I "-P <parallelism>"
+ ]
+diff --git a/doc/lat_http.8 b/doc/lat_http.8
+index a4bb459..99c5d4a 100644
+--- a/doc/lat_http.8
++++ b/doc/lat_http.8
+@@ -1,9 +1,9 @@
+ .\" $Id$
+-.TH LAT_FCNTL 8 "$Date$" "(c)1994-2000 Carl Staelin and Larry McVoy" "LMBENCH"
++.TH LAT_HTTP 8 "$Date$" "(c)1994-2000 Carl Staelin and Larry McVoy" "LMBENCH"
+ .SH NAME
+-lat_fcntl \- fcntl file locking benchmark
++lat_http \- http GET request latency
+ .SH SYNOPSIS
+-.B lat_ctx 
++.B lat_http
+ [
+ .I "-d"
+ ]
+diff --git a/doc/lat_select.8 b/doc/lat_select.8
+index 03f83bf..e13499f 100644
+--- a/doc/lat_select.8
++++ b/doc/lat_select.8
+@@ -3,7 +3,7 @@
+ .SH NAME
+ lat_select \- select benchmark
+ .SH SYNOPSIS
+-.B lat_ctx 
++.B lat_select
+ [
+ .I "-P <parallelism>"
+ ]
+diff --git a/doc/lat_sig.8 b/doc/lat_sig.8
+index 91baf78..19a8838 100644
+--- a/doc/lat_sig.8
++++ b/doc/lat_sig.8
+@@ -3,7 +3,7 @@
+ .SH NAME
+ lat_sig \- select benchmark
+ .SH SYNOPSIS
+-.B lat_ctx 
++.B lat_sig
+ [
+ .I "-P <parallelism>"
+ ]
+-- 
+2.17.1
+
meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lmbench-Point-webpage-lm-to-target-directory.patch new file +77 -0

77 lines not on this page · raw message

meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +3 -0
index 171ac31ac..68c7e7b4f 100644
@@ -26,6 +26,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \
            file://0001-Check-for-musl-define-guard-before-redefining-sockle.patch \
            file://0002-build-Adjust-CFLAGS-LDFLAGS-to-append-values-passed-.patch \
            file://0001-src-Makefile-use-libdir-instead-of-hardcoded-lib.patch \
+           file://0001-lmbench-Point-webpage-lm-to-target-directory.patch \
+           file://0001-doc-Fix-typos-in-manual-pages.patch \
            "
 SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf"
 SRC_URI[sha256sum] = "cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551"
@@ -75,6 +77,7 @@ do_install () {
            ${D}${bindir}/lmbench-run
     install -m 0755 ${S}/scripts/lmbench ${D}${bindir}
     install -m 0755 ${S}/scripts/* ${D}${datadir}/lmbench/scripts
+    install -m 0644 ${S}/src/webpage-lm.tar ${D}${datadir}/lmbench
 }
 
 pkg_postinst_${PN} () {
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/2 lmbench: lat_fifo: Fix cleanup sequence

Files should be unlinked after all users exit. Otherwise we might experience
(w) read/write on pipe: No such file or directory

---
 .../0001-lat_fifo-Fix-cleanup-sequence.patch  | 42 +++++++++++++++++++
 .../lmbench/lmbench_3.0-a9.bb                 |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch
meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch new file +42 -0
new file mode 100644
index 000000000..42b14cece
@@ -0,0 +1,42 @@
+From 78912c0ac5e090095a2f2bd6226e02cce949e72e Mon Sep 17 00:00:00 2001
+From: He Zhe <[email protected]>
+Date: Fri, 22 Jan 2021 10:03:38 +0000
+Subject: [PATCH] lat_fifo: Fix cleanup sequence
+
+Files should be unlinked after all users exit.
+
+Signed-off-by: He Zhe <[email protected]>
+---
+ src/lat_fifo.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/lat_fifo.c b/src/lat_fifo.c
+index c625161..85bb9d1 100644
+--- a/src/lat_fifo.c
++++ b/src/lat_fifo.c
+@@ -120,16 +120,16 @@ cleanup(iter_t iterations, void * cookie)
+ 
+ 	if (iterations) return;
+ 
+-	unlink(state->filename1);
+-	unlink(state->filename2);
+-	close(state->wr);
+-	close(state->rd);
+-
+ 	if (state->pid > 0) {
+-		kill(state->pid, 15);
++		kill(state->pid, SIGKILL);
+ 		waitpid(state->pid, NULL, 0);
+ 		state->pid = 0;
+ 	}
++
++	unlink(state->filename1);
++	unlink(state->filename2);
++	close(state->wr);
++	close(state->rd);
+ }
+ 
+ void 
+-- 
+2.29.2
+
meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +1 -0
index 68c7e7b4f..21e81ecf2 100644
@@ -28,6 +28,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \
            file://0001-src-Makefile-use-libdir-instead-of-hardcoded-lib.patch \
            file://0001-lmbench-Point-webpage-lm-to-target-directory.patch \
            file://0001-doc-Fix-typos-in-manual-pages.patch \
+           file://0001-lat_fifo-Fix-cleanup-sequence.patch \
            "
 SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf"
 SRC_URI[sha256sum] = "cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551"
Signature · 1 line
2.17.1
#2 lore raw

Re: [oe] [PATCH 2/2] lmbench: lat_fifo: Fix cleanup sequence

Can you submit this upstream as well please

Quoted 87 lines · He Zhe

Files should be unlinked after all users exit. Otherwise we might experience
(w) read/write on pipe: No such file or directory

---
 .../0001-lat_fifo-Fix-cleanup-sequence.patch  | 42 +++++++++++++++++++
 .../lmbench/lmbench_3.0-a9.bb                 |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644

meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch

diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch b/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch new file mode 100644
index 000000000..42b14cece
--- /dev/null
+++
b/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch

meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch new file +42 -0
@@ -0,0 +1,42 @@
+From 78912c0ac5e090095a2f2bd6226e02cce949e72e Mon Sep 17 00:00:00 2001
+From: He Zhe <[email protected]>
+Date: Fri, 22 Jan 2021 10:03:38 +0000
+Subject: [PATCH] lat_fifo: Fix cleanup sequence
+
+Files should be unlinked after all users exit.
+
+Signed-off-by: He Zhe <[email protected]>
+---
+ src/lat_fifo.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/lat_fifo.c b/src/lat_fifo.c
+index c625161..85bb9d1 100644
+--- a/src/lat_fifo.c
++++ b/src/lat_fifo.c
+@@ -120,16 +120,16 @@ cleanup(iter_t iterations, void * cookie)
+
+       if (iterations) return;
+
+-      unlink(state->filename1);
+-      unlink(state->filename2);
+-      close(state->wr);
+-      close(state->rd);
+-
+       if (state->pid > 0) {
+-              kill(state->pid, 15);
++              kill(state->pid, SIGKILL);
+               waitpid(state->pid, NULL, 0);
+               state->pid = 0;
+       }
++
++      unlink(state->filename1);
++      unlink(state->filename2);
++      close(state->wr);
++      close(state->rd);
+ }
+
+ void
+--
+2.29.2
+
meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +1 -0
index 68c7e7b4f..21e81ecf2 100644
@@ -28,6 +28,7 @@ SRC_URI =
 "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \
 
 file://0001-src-Makefile-use-libdir-instead-of-hardcoded-lib.patch \
            file://0001-lmbench-Point-webpage-lm-to-target-directory.patch
 \
            file://0001-doc-Fix-typos-in-manual-pages.patch \
+           file://0001-lat_fifo-Fix-cleanup-sequence.patch \
            "

SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf" SRC_URI[sha256sum] =
"cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551" --
2.17.1

author
#3 lore raw

Re: [oe] [PATCH 2/2] lmbench: lat_fifo: Fix cleanup sequence

I'd like to but seems the upstream has been dead for years. The latest in the mailing list was in 2016.
https://sourceforge.net/p/lmbench/mailman/lmbench-users/

Zhe

Quoted 82 lines · Khem Raj

Can you submit this upstream as well please

On Fri, Jan 22, 2021 at 2:17 AM He Zhe <[email protected] <mailto:[email protected]>> wrote:

    Files should be unlinked after all users exit. Otherwise we might experience
    (w) read/write on pipe: No such file or directory

    Signed-off-by: He Zhe <[email protected] <mailto:[email protected]>>
    ---
     .../0001-lat_fifo-Fix-cleanup-sequence.patch  | 42 +++++++++++++++++++
     .../lmbench/lmbench_3.0-a9.bb <http://lmbench_3.0-a9.bb>                 |  1 +
     2 files changed, 43 insertions(+)
     create mode 100644 meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch

    diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch b/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch
    new file mode 100644
    index 000000000..42b14cece
    --- /dev/null
    +++ b/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch
    @@ -0,0 +1,42 @@
    +From 78912c0ac5e090095a2f2bd6226e02cce949e72e Mon Sep 17 00:00:00 2001
    +From: He Zhe <[email protected] <mailto:[email protected]>>
    +Date: Fri, 22 Jan 2021 10:03:38 +0000
    +Subject: [PATCH] lat_fifo: Fix cleanup sequence
    +
    +Files should be unlinked after all users exit.
    +
    +Signed-off-by: He Zhe <[email protected] <mailto:[email protected]>>
    +---
    + src/lat_fifo.c | 12 ++++++------
    + 1 file changed, 6 insertions(+), 6 deletions(-)
    +
    +diff --git a/src/lat_fifo.c b/src/lat_fifo.c
    +index c625161..85bb9d1 100644
    +--- a/src/lat_fifo.c
    ++++ b/src/lat_fifo.c
    +@@ -120,16 +120,16 @@ cleanup(iter_t iterations, void * cookie)
    +
    +       if (iterations) return;
    +
    +-      unlink(state->filename1);
    +-      unlink(state->filename2);
    +-      close(state->wr);
    +-      close(state->rd);
    +-
    +       if (state->pid > 0) {
    +-              kill(state->pid, 15);
    ++              kill(state->pid, SIGKILL);
    +               waitpid(state->pid, NULL, 0);
    +               state->pid = 0;
    +       }
    ++
    ++      unlink(state->filename1);
    ++      unlink(state->filename2);
    ++      close(state->wr);
    ++      close(state->rd);
    + }
    +
    + void
    +--
    +2.29.2
    +
    diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb <http://lmbench_3.0-a9.bb> b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb <http://lmbench_3.0-a9.bb>
    index 68c7e7b4f..21e81ecf2 100644
    --- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb <http://lmbench_3.0-a9.bb>
    +++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb <http://lmbench_3.0-a9.bb>
    @@ -28,6 +28,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \
                file://0001-src-Makefile-use-libdir-instead-of-hardcoded-lib.patch \
                file://0001-lmbench-Point-webpage-lm-to-target-directory.patch \
                file://0001-doc-Fix-typos-in-manual-pages.patch \
    +           file://0001-lat_fifo-Fix-cleanup-sequence.patch \
                "
     SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf"
     SRC_URI[sha256sum] = "cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551"
    -- 
    2.17.1