From a75ef32c7436be2c294ea591f62743c425d45502 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 8 Apr 2013 11:52:53 +0300 Subject: [PATCH] locking: update validation/ tests to the new warning format The output format changed slightly so the test suite needs to be updated as well. Signed-off-by: Dan Carpenter --- validation/sm_locking.c | 4 ++-- validation/sm_locking2.c | 2 +- validation/sm_locking3.c | 2 +- validation/sm_locking4.c | 5 ++--- validation/sm_locking6.c | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/validation/sm_locking.c b/validation/sm_locking.c index d335ad3b..93c3afb2 100644 --- a/validation/sm_locking.c +++ b/validation/sm_locking.c @@ -20,7 +20,7 @@ int func (void) _spin_unlock(mylock2); return; } - + if (a) _spin_lock(mylock3); return; @@ -31,6 +31,6 @@ int func (void) * * check-output-start sm_locking.c:26 func() warn: 'spin_lock:mylock3' is sometimes locked here and sometimes unlocked. -sm_locking.c:26 func() warn: inconsistent returns spin_lock:mylock2: locked (13,26) unlocked (21) +sm_locking.c:26 func() warn: inconsistent returns spin_lock:mylock2: locked (13, 26) unlocked (21) * check-output-end */ diff --git a/validation/sm_locking2.c b/validation/sm_locking2.c index e3984c10..2d3c85cc 100644 --- a/validation/sm_locking2.c +++ b/validation/sm_locking2.c @@ -31,6 +31,6 @@ int func (void) * * check-output-start sm_locking2.c:21 func() error: double unlock 'spin_lock:mylock' -sm_locking2.c:26 func() warn: inconsistent returns spin_lock:mylock3: locked (26) unlocked (14,25) +sm_locking2.c:26 func() warn: inconsistent returns spin_lock:mylock3: locked (26) unlocked (14, 25) * check-output-end */ diff --git a/validation/sm_locking3.c b/validation/sm_locking3.c index 9f4a8f2e..3ef36ce8 100644 --- a/validation/sm_locking3.c +++ b/validation/sm_locking3.c @@ -25,6 +25,6 @@ int func (void) * * check-output-start sm_locking3.c:18 func() error: double unlock 'spin_lock:mylock' -sm_locking3.c:20 func() warn: inconsistent returns spin_lock:mylock: locked (16) unlocked (10,20) +sm_locking3.c:20 func() warn: inconsistent returns spin_lock:mylock: locked (16) unlocked (10, 20) * check-output-end */ diff --git a/validation/sm_locking4.c b/validation/sm_locking4.c index 088fdf56..041a79a5 100644 --- a/validation/sm_locking4.c +++ b/validation/sm_locking4.c @@ -4,7 +4,7 @@ void _spin_unlock(int name); void frob(void){} int a; int b; -int func (void) +void func (void) { int mylock = 1; int mylock2 = 2; @@ -22,13 +22,12 @@ int func (void) return; if (!1) _spin_lock(mylock); - return 0; } /* * check-name: Smatch locking #4 * check-command: smatch --project=kernel sm_locking4.c * * check-output-start -sm_locking4.c:25 func() warn: inconsistent returns spin_lock:mylock: locked (22,25) unlocked (16) +sm_locking4.c:23 func() warn: inconsistent returns spin_lock:mylock: locked (22, 23) unlocked (16) * check-output-end */ diff --git a/validation/sm_locking6.c b/validation/sm_locking6.c index 1ac4816c..6061084b 100644 --- a/validation/sm_locking6.c +++ b/validation/sm_locking6.c @@ -31,7 +31,7 @@ void func (void) * check-command: smatch -p=kernel sm_locking6.c * * check-output-start -sm_locking6.c:27 func() warn: inconsistent returns irqsave:flags: locked (26) unlocked (21,24,27) -sm_locking6.c:27 func() warn: inconsistent returns spin_lock:lock: locked (26) unlocked (21,24,27) +sm_locking6.c:27 func() warn: inconsistent returns irqsave:flags: locked (26) unlocked (21, 24, 27) +sm_locking6.c:27 func() warn: inconsistent returns spin_lock:lock: locked (26) unlocked (21, 24, 27) * check-output-end */ -- 2.11.4.GIT