public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 2/2] docs: add a paragraph about access() to Common Problems section
@ 2014-05-13  9:37 Alexey Kodanev
  2014-05-13 10:55 ` chrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Kodanev @ 2014-05-13  9:37 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
 doc/test-writing-guidelines.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt
index 91edbf0..aaf6b4a 100644
--- a/doc/test-writing-guidelines.txt
+++ b/doc/test-writing-guidelines.txt
@@ -883,6 +883,13 @@ settings which may clear some of the bits. If your test depends on specific
 file permissions you need to 'chmod()' the file afterwards or use SAFE_TOUCH()
 that does the 'chmod()' for you.
 
+3.2 access()
+~~~~~~~~~~~
+
+If access(some_file, W_OK) is executed by root it will return success even
+if the file has read-only permission. As a workaround you can use 'open()' to
+test sysfs file for write permission. It might not work for other filesystems,
+but you have stat, lstat and fstat functions.
 
 4. Test Contribution Checklist
 ------------------------------
-- 
1.7.1


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-13 10:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-13  9:37 [LTP] [PATCH 2/2] docs: add a paragraph about access() to Common Problems section Alexey Kodanev
2014-05-13 10:55 ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox