[LTP] [PATCH 1/1] adjtimex02: Remove tests for AJD_OFFSET
Petr Vorel
pvorel@suse.cz
Mon Feb 6 09:38:07 CET 2023
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")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
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(-)
diff --git a/testcases/kernel/syscalls/adjtimex/adjtimex02.c b/testcases/kernel/syscalls/adjtimex/adjtimex02.c
index dab640ff36..e66ba2a5c7 100644
--- a/testcases/kernel/syscalls/adjtimex/adjtimex02.c
+++ b/testcases/kernel/syscalls/adjtimex/adjtimex02.c
@@ -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) {
--
2.39.1
More information about the ltp
mailing list