diff options
| author | Yi Zhao <yi.zhao@windriver.com> | 2019-04-30 14:56:27 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-05-02 14:13:57 -0700 |
| commit | fd793c0adb080a9f79a7315a63aff2c0840ac614 (patch) | |
| tree | f6fdf3e90b6d4f2dc78e8154a7e45c6ddca5b2dc | |
| parent | f1cc8bf017a316ab317e158d17f92ad5fa58df03 (diff) | |
| download | meta-openembedded-fd793c0adb080a9f79a7315a63aff2c0840ac614.tar.gz | |
openhpi: update openhpi-fix-testfail-errors.patch
The openhpi-fix-testfail-errors.patch tries to fix 2 saftest failures.
But the second fix is not correct. It should not return false when there
is no surrogate pairs since for the code points in UTF-16 Basic
Multilingual Plane (BMP), there is no need surrogate pairs. We should
update saftest case to fix this failure.
Also add more description for the first fix.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 36 insertions, 34 deletions
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch new file mode 100644 index 0000000000..b2771c0c92 --- /dev/null +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From e0b2be7a1fce0fed63bac8c350b711b69edfe30e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "yanjun.zhu" <yanjun.zhu@windriver.com> | ||
| 3 | Date: Tue, 30 Apr 2019 10:04:58 +0800 | ||
| 4 | Subject: [PATCH] openhpid/safhpi.c: fix function saHpiSensorThresholdsSet | ||
| 5 | |||
| 6 | In COPY_TH the SensorThresholds->TH will be copied to tmp.TH only if | ||
| 7 | TH.IsSupported == SAHPI_TRUE. So we should pass &tmp but not | ||
| 8 | SensorThresholds as the argument to OH_CALL_ABI. Otherwise the TH will | ||
| 9 | be set even if TH.IsSupported == SAHPI_FALSE. | ||
| 10 | |||
| 11 | Upstream-Status: Submitted | ||
| 12 | [https://github.com/open-hpi/openhpi/pull/2744/commits/77a78bb1ada56e55c5ba6d7a5987c214705bf035] | ||
| 13 | |||
| 14 | Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com> | ||
| 15 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
| 16 | --- | ||
| 17 | openhpid/safhpi.c | 2 +- | ||
| 18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/openhpid/safhpi.c b/openhpid/safhpi.c | ||
| 21 | index 28a2632..61b7f03 100644 | ||
| 22 | --- a/openhpid/safhpi.c | ||
| 23 | +++ b/openhpid/safhpi.c | ||
| 24 | @@ -1933,7 +1933,7 @@ SaErrorT SAHPI_API saHpiSensorThresholdsSet ( | ||
| 25 | oh_release_domain(d); /* Unlock domain */ | ||
| 26 | |||
| 27 | OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv, | ||
| 28 | - ResourceId, SensorNum, SensorThresholds); | ||
| 29 | + ResourceId, SensorNum, &tmp); | ||
| 30 | oh_release_handler(h); | ||
| 31 | |||
| 32 | return rv; | ||
| 33 | -- | ||
| 34 | 2.7.4 | ||
| 35 | |||
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch deleted file mode 100644 index 60e2e79191..0000000000 --- a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | Fix for saftest failures. | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | |||
| 5 | Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com> | ||
| 6 | |||
| 7 | Index: openhpi-3.6.1/openhpid/safhpi.c | ||
| 8 | =================================================================== | ||
| 9 | --- openhpi-3.6.1.orig/openhpid/safhpi.c | ||
| 10 | +++ openhpi-3.6.1/openhpid/safhpi.c | ||
| 11 | @@ -1933,7 +1933,7 @@ SaErrorT SAHPI_API saHpiSensorThresholds | ||
| 12 | oh_release_domain(d); /* Unlock domain */ | ||
| 13 | |||
| 14 | OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv, | ||
| 15 | - ResourceId, SensorNum, SensorThresholds); | ||
| 16 | + ResourceId, SensorNum, &tmp); | ||
| 17 | oh_release_handler(h); | ||
| 18 | |||
| 19 | return rv; | ||
| 20 | Index: openhpi-3.6.1/utils/sahpi_struct_utils.c | ||
| 21 | =================================================================== | ||
| 22 | --- openhpi-3.6.1.orig/utils/sahpi_struct_utils.c | ||
| 23 | +++ openhpi-3.6.1/utils/sahpi_struct_utils.c | ||
| 24 | @@ -3861,6 +3861,9 @@ SaHpiBoolT oh_valid_textbuffer(SaHpiText | ||
| 25 | /* found a unpaired surrogate */ | ||
| 26 | return SAHPI_FALSE; | ||
| 27 | } | ||
| 28 | + } else { | ||
| 29 | + /*the first 2 bytes wrong*/ | ||
| 30 | + return SAHPI_FALSE; | ||
| 31 | } | ||
| 32 | } | ||
| 33 | break; | ||
diff --git a/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb b/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb index 14cc3d879d..e3a0c2eb60 100644 --- a/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb +++ b/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb | |||
| @@ -33,7 +33,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ | |||
| 33 | file://openhpi-glib-cross-compile.patch \ | 33 | file://openhpi-glib-cross-compile.patch \ |
| 34 | file://openhpi-linkfix.patch \ | 34 | file://openhpi-linkfix.patch \ |
| 35 | file://openhpi-fix-host-gcc.patch \ | 35 | file://openhpi-fix-host-gcc.patch \ |
| 36 | file://openhpi-fix-testfail-errors.patch \ | 36 | file://openhpi-fix-function-saHpiSensorThresholds.patch \ |
| 37 | file://openhpi-add-libnetsnmp-when-link.patch \ | 37 | file://openhpi-add-libnetsnmp-when-link.patch \ |
| 38 | file://openhpi-invalide-session.patch \ | 38 | file://openhpi-invalide-session.patch \ |
| 39 | file://openhpi-use-serial-tests-config-needed-by-ptest.patch \ | 39 | file://openhpi-use-serial-tests-config-needed-by-ptest.patch \ |
