-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ update copyright Link: https://lore.kernel.org/ltp/[email protected]/ Reviewed-by: Petr Vorel <[email protected]> Signed-off-by: Ma Xinjian <[email protected]> [ pvorel: adjust kcmp02.c ] Signed-off-by: Petr Vorel <[email protected]>
- Loading branch information
Showing
3 changed files
with
31 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
/* | ||
* Copyright (c) 2015 Cedric Hnyda <[email protected]> | ||
* Copyright (c) Linux Test Project, 2015-2024 | ||
*/ | ||
|
||
/* Description: | ||
* Verify that: | ||
* 1) kcmp returns 0 with two process and two fd refering to the | ||
* same open file | ||
* 2) kcmp doesn't return 0 with two process and two fd not | ||
* refering to the same open file | ||
/*\ | ||
* [Description] | ||
* | ||
* Verify that | ||
* | ||
* 1. kcmp() returns 0 with two process and two file descriptors refering to the | ||
* same open file | ||
* 2. kcmp() doesn't return 0 with two process and two file descriptors not | ||
* refering to the same open file | ||
*/ | ||
|
||
#define _GNU_SOURCE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
/* | ||
* Copyright (c) 2015 Cedric Hnyda <[email protected]> | ||
* Copyright (c) Linux Test Project, 2015-2024 | ||
*/ | ||
|
||
/* Description: | ||
* Verify that: | ||
* 1) kcmp fails with bad pid | ||
* 2) kcmp fails with invalid flag | ||
* 3) kcmp fails with invalid flag | ||
* 4) kcmp fails with invalid flag | ||
* 5) kcmp fails with invalid flag | ||
* 6) kcmp fails with invalid fd | ||
/*\ | ||
* [Description] | ||
* | ||
* Verify that, kcmp() returns -1 and sets errno to | ||
* | ||
* 1. ESRCH if pid does not exist | ||
* 2. EINVAL if type is invalid (KCMP_TYPES + 1) | ||
* 3. EINVAL if type is invalid (-1) | ||
* 4. EINVAL if type is invalid (INT_MIN) | ||
* 5. EINVAL if type is invalid (INT_MAX) | ||
* 6. EBADF if file descriptor is invalid | ||
*/ | ||
|
||
#define _GNU_SOURCE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
/* | ||
* Copyright (c) 2016 Xiao Yang <[email protected]> | ||
* Copyright (c) Linux Test Project, 2016-2024 | ||
*/ | ||
|
||
/* | ||
* Testname: kcmp03.c | ||
/*\ | ||
* [Description] | ||
* | ||
* Description: | ||
* 1) kcmp() returns 0 if the processes share the same file system information. | ||
* 2) kcmp() returns 0 if the processes share I/O context. | ||
* 3) kcmp() returns 0 if the processes share the same list of System V | ||
* semaphore undo operations. | ||
* 4) kcmp() returns 0 if the processes share the same address space. | ||
* Verify that, kcmp() returns 0 if the processes | ||
* | ||
* 1. share the same file system information | ||
* 2. share I/O context | ||
* 3. share the same list of System V semaphore undo operations | ||
* 4. share the same address space | ||
*/ | ||
|
||
#define _GNU_SOURCE | ||
|