projects
/
platform
/
core
/
appfw
/
libslp-db-util.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ecb701
)
fix a test program bug
34/240034/1
author
Youngjae Shin
<yj99.shin@samsung.com>
Mon, 3 Aug 2020 00:10:38 +0000
(09:10 +0900)
committer
Youngjae Shin
<yj99.shin@samsung.com>
Mon, 3 Aug 2020 00:10:38 +0000
(09:10 +0900)
Change-Id: I8dc576511b72772ee5155ef62efb2a37abbac845
tests/db-util-gtest.cpp
patch
|
blob
|
history
diff --git
a/tests/db-util-gtest.cpp
b/tests/db-util-gtest.cpp
index
51abd5d
..
dd20e8b
100644
(file)
--- a/
tests/db-util-gtest.cpp
+++ b/
tests/db-util-gtest.cpp
@@
-151,13
+151,15
@@
TEST_F(DbUtil, db_util_open_n4)
chmod("test.db", 0000);
uid_t uid = geteuid();
- if (seteuid(1000) < 0)
- FAIL() << "errno = " << errno << std::endl;
+ if (geteuid() == 0)
+ if (seteuid(1000) < 0)
+ FAIL() << "errno = " << errno << std::endl;
rc = db_util_open(pszFilePath, &db, nOption);
- if (seteuid(uid) < 0)
+ if (
uid == 0 &&
seteuid(uid) < 0)
FAIL() << "errno = " << errno << std::endl;
+
ASSERT_EQ(SQLITE_PERM, rc);
}