Skip to contentSkip to conversation

readlink03 test case fix

PATCH In review Nageswara R Sastry 3 participants 3 messages Sep 12, 2011 – Oct 5, 2011

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 readlink03 test case fix

In readlink03 testcase,
When 'Symlink Pathname is empty' the return value was 'ENOENT' but with newer kernels the return value is 'EINVAL'. The following patch will fix this.

readlink03:
Before patch:
...
readlink03 9 TFAIL : readlink() failed, Symlink Pathname is empty, errno=22, expected errno=2
...

After patch:
...

readlink03    9  TPASS  :  readlink(), Symlink Pathname is empty, returned errno 22
readlink03   10  TPASS  :  readlink(), Symlink Pathname is empty, returned errno 22

...

Signature · 2 lines
Regards
R.Nageswara Sastry
testcases/kernel/syscalls/readlink/readlink03.c +6 -1
@@ -173,6 +173,11 @@ int main(int ac, char **av)
 				buf_size = sizeof(buffer);
 			}
 
+			if (strncmp(test_desc, "Symlink Pathname is empty", 25) == 0) {
+				if ((tst_kvercmp(2, 6, 39)) >= 0)
+					Test_cases[i].exp_errno = EINVAL;
+			}
+
 			/*
 			 * Call readlink(2) to test different test conditions.
 			 * verify that it fails with -1 return value and sets
@@ -358,4 +363,4 @@ void cleanup()
 
 	tst_rmdir();
 
-}
\ No newline at end of file
+}

------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops? How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Tested-by on v2 1/1
#1 lore raw
Quoted 20 lines · Nageswara R Sastry

In readlink03 testcase,
When 'Symlink Pathname is empty' the return value was 'ENOENT' but with newer kernels the return value is 'EINVAL'. The following patch will fix this.

readlink03:
Before patch:
...
readlink03 9 TFAIL : readlink() failed, Symlink Pathname is empty,
errno=22, expected errno=2
...

After patch:
...
readlink03 9 TPASS : readlink(), Symlink Pathname is empty,
returned errno 22
readlink03 10 TPASS : readlink(), Symlink Pathname is empty,
returned errno 22
...

Quoted 1 line

Please add it to mainline.

Thanks,
Michal

Signature · 14 lines
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#2 lore raw

Hi!

Quoted 3 lines

Please add it to mainline.

Commited.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list