Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1711963 > unrolled thread

[PATCH v2 0/1] rtc: rtctest: Support opal-rtc and rtc-generic

Started byLukáš Doktor <ldoktor@redhat.com>
First post2017-08-15 10:50 +0200
Last post2017-08-17 01:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/1] rtc: rtctest: Support opal-rtc and rtc-generic Lukáš Doktor <ldoktor@redhat.com> - 2017-08-15 10:50 +0200
    [PATCH v2 1/1] rtc: rtctest: Improve support detection Lukáš Doktor <ldoktor@redhat.com> - 2017-08-15 10:50 +0200
      Re: [PATCH v2 1/1] rtc: rtctest: Improve support detection Shuah Khan <shuah@kernel.org> - 2017-08-17 01:10 +0200

#1711963 — [PATCH v2 0/1] rtc: rtctest: Support opal-rtc and rtc-generic

FromLukáš Doktor <ldoktor@redhat.com>
Date2017-08-15 10:50 +0200
Subject[PATCH v2 0/1] rtc: rtctest: Support opal-rtc and rtc-generic
Message-ID<ueFHY-7rw-9@gated-at.bofh.it>
On ppc64le machines the opal-rtc, resp rtc-generic in guest is used. They only
support minimal set of functionality and fail this test in not-yet treated
way. This extends the checks and skips to the next test when feature is not
supported.

Changes in v2:
- Removed the double EINVAL check
- Added missing space before "EIO" check.

Lukáš Doktor (1):
  rtc: rtctest: Improve support detection

 tools/testing/selftests/timers/rtctest.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

-- 
2.9.4

[toc] | [next] | [standalone]


#1711965 — [PATCH v2 1/1] rtc: rtctest: Improve support detection

FromLukáš Doktor <ldoktor@redhat.com>
Date2017-08-15 10:50 +0200
Subject[PATCH v2 1/1] rtc: rtctest: Improve support detection
Message-ID<ueFHY-7rw-13@gated-at.bofh.it>
In reply to#1711963
The rtc-generic and opal-rtc are failing to run this test as they do not
support all the features. Let's treat the error returns and skip to the
following test.

Theoretically the test_DATE should be also adjusted, but as it's enabled
on demand I think it makes sense to fail in such case.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
---
 tools/testing/selftests/timers/rtctest.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/timers/rtctest.c b/tools/testing/selftests/timers/rtctest.c
index f61170f..411eff6 100644
--- a/tools/testing/selftests/timers/rtctest.c
+++ b/tools/testing/selftests/timers/rtctest.c
@@ -221,6 +221,11 @@ int main(int argc, char **argv)
 	/* Read the current alarm settings */
 	retval = ioctl(fd, RTC_ALM_READ, &rtc_tm);
 	if (retval == -1) {
+		if (errno == EINVAL) {
+			fprintf(stderr,
+					"\n...EINVAL reading current alarm setting.\n");
+			goto test_PIE;
+		}
 		perror("RTC_ALM_READ ioctl");
 		exit(errno);
 	}
@@ -231,7 +236,7 @@ int main(int argc, char **argv)
 	/* Enable alarm interrupts */
 	retval = ioctl(fd, RTC_AIE_ON, 0);
 	if (retval == -1) {
-		if (errno == EINVAL) {
+		if (errno == EINVAL || errno == EIO) {
 			fprintf(stderr,
 				"\n...Alarm IRQs not supported.\n");
 			goto test_PIE;
-- 
2.9.4

[toc] | [prev] | [next] | [standalone]


#1713402 — Re: [PATCH v2 1/1] rtc: rtctest: Improve support detection

FromShuah Khan <shuah@kernel.org>
Date2017-08-17 01:10 +0200
SubjectRe: [PATCH v2 1/1] rtc: rtctest: Improve support detection
Message-ID<uffBL-4VU-1@gated-at.bofh.it>
In reply to#1711965
On 08/15/2017 02:46 AM, Lukáš Doktor wrote:
> The rtc-generic and opal-rtc are failing to run this test as they do not
> support all the features. Let's treat the error returns and skip to the
> following test.
> 
> Theoretically the test_DATE should be also adjusted, but as it's enabled
> on demand I think it makes sense to fail in such case.
> 
> Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
> ---
>  tools/testing/selftests/timers/rtctest.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/timers/rtctest.c b/tools/testing/selftests/timers/rtctest.c
> index f61170f..411eff6 100644
> --- a/tools/testing/selftests/timers/rtctest.c
> +++ b/tools/testing/selftests/timers/rtctest.c
> @@ -221,6 +221,11 @@ int main(int argc, char **argv)
>  	/* Read the current alarm settings */
>  	retval = ioctl(fd, RTC_ALM_READ, &rtc_tm);
>  	if (retval == -1) {
> +		if (errno == EINVAL) {
> +			fprintf(stderr,
> +					"\n...EINVAL reading current alarm setting.\n");
> +			goto test_PIE;
> +		}
>  		perror("RTC_ALM_READ ioctl");
>  		exit(errno);
>  	}
> @@ -231,7 +236,7 @@ int main(int argc, char **argv)
>  	/* Enable alarm interrupts */
>  	retval = ioctl(fd, RTC_AIE_ON, 0);
>  	if (retval == -1) {
> -		if (errno == EINVAL) {
> +		if (errno == EINVAL || errno == EIO) {
>  			fprintf(stderr,
>  				"\n...Alarm IRQs not supported.\n");
>  			goto test_PIE;
> 

Applied to linux-kselftest next for 4.14-rc1

thanks,
-- Shuah

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web