selftests: prctl: Add new prctl test for PR_SET_NAME
authorOsama Muhammad <osmtendev@gmail.com>
Wed, 7 Jun 2023 15:36:00 +0000 (20:36 +0500)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 24 Jul 2023 15:00:42 +0000 (09:00 -0600)
commite0606daeaab4fba3cc418a202da81aa7a57c0342
tree8db2464cf96d01355234bfe78a348dc45d787349
parent6eaae198076080886b9e7d57f4ae06fa782f90ef
selftests: prctl: Add new prctl test for PR_SET_NAME

This patch will add the new test, which covers the prctl call
PR_SET_NAME command. The test tries to give a name using the PR_SET_NAME
call and then confirm it that it changed correctly by using  PR_GET_NAME.
It also tries to rename it with empty name.In the test PR_GET_NAME is
tested by passing null pointer to it and check its behaviour.

Signed-off-by: Osama Muhammad <osmtendev@gmail.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Tested-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/prctl/Makefile
tools/testing/selftests/prctl/set-process-name.c [new file with mode: 0644]