Skip to contentSkip to conversation

adjtimex02: Remove tests for AJD_OFFSET

PATCH In review Petr Vorel 2 participants 4 messages Feb 6, 2023

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 adjtimex02: Remove tests for AJD_OFFSET

These tests were for 2.6.26. There is no point to just print:
TCONF: Newer kernels normalize offset value outside range

Also update docs.

NOTE: there was typo AJD_OFFSET in docs (from a46faf2999).

Fixes 418585c75f ("Remove old kernel version check in C case when using tst_kvercmp")

---
Or, should we test that kernel normalize offset value outside range? This should be probably added into new file adjtimex04.c, or at least to other existing file, because this is test for expected errnos.

Kind regards,
Petr

 testcases/kernel/syscalls/adjtimex/adjtimex02.c | 13 -------------
 1 file changed, 13 deletions(-)
testcases/kernel/syscalls/adjtimex/adjtimex02.c +0 -13
index dab640ff36..e66ba2a5c7 100644
@@ -14,11 +14,6 @@
  * - EFAULT with SET_MODE and invalid timex pointer
  * - EINVAL with ADJ_TICK greater than max tick
  * - EINVAL with ADJ_TICK smaller than min tick
- *
- * On kernels older than 2.6.26:
- *
- * - EINVAL with AJD_OFFSET smaller than min offset
- * - EINVAL with AJD_OFFSET greater than max offset
  */
 
 #include <errno.h>
@@ -57,8 +52,6 @@ static struct test_case {
 	{.modes = SET_MODE, .exp_err = EFAULT},
 	{.modes = ADJ_TICK, .lowlimit = 900000, .delta = 1, .exp_err = EINVAL},
 	{.modes = ADJ_TICK, .highlimit = 1100000, .delta = 1, .exp_err = EINVAL},
-	{.modes = ADJ_OFFSET, .highlimit = 512000L, .delta = 1, .exp_err = EINVAL},
-	{.modes = ADJ_OFFSET, .lowlimit = -512000L, .delta = -1, .exp_err = EINVAL},
 };
 
 static struct test_variants
@@ -93,12 +86,6 @@ static void verify_adjtimex(unsigned int i)
 			if (tc[i].highlimit)
 				buf->tick = tc[i].highlimit + tc[i].delta;
 		}
-		if (tc[i].modes == ADJ_OFFSET) {
-			if (tc[i].lowlimit || tc[i].highlimit) {
-				tst_res(TCONF, "Newer kernels normalize offset value outside range");
-				return;
-			}
-		}
 	}
 
 	if (tc[i].exp_err == EFAULT) {
Signature · 5 lines
2.39.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#3 lore raw
Quoted 2 lines

Hi!
And btw, the patch title has the same AJD typo as well.

Thanks, fixed!

Thanks for a review, merged!

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp