diff --git a/meta-selftest/recipes-test/testrpm/files/testfile.txt b/meta-selftest/recipes-test/testrpm/files/testfile.txt
new file mode 100644
index 00000000000..d1e50ff79a2
--- /dev/null
+++ b/meta-selftest/recipes-test/testrpm/files/testfile.txt
@@ -0,0 +1,6 @@
+  /mnt/builds/yocto/sources/meta-selftest/recipes-test/testrpm:
+  total used in directory 16 available 76.4 GiB
+  drwxr-xr-x  2 pavel pavel 4096 Aug 19 08:59 .
+  drwxr-xr-x 34 pavel pavel 4096 Aug 18 17:59 ..
+  -rw-r--r--  1 pavel pavel  408 Aug 19 08:59 testrpm_0.0.1.bb
+  -rw-r--r--  1 pavel pavel  355 Aug 18 21:54 testrpm_0.0.1.bb~
diff --git a/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
new file mode 100644
index 00000000000..e42c7db3b39
--- /dev/null
+++ b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Test recipe for testing rpm generated by oe-core"
+LICENSE = "CLOSED"
+
+SRC_URI = "file://testfile.txt"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_compile(){
+	echo "testdata" > ${B}/"file with [quotes].txt"
+	echo "testdata" > ${B}/"file with (quites).txt"
+}
+
+do_install(){
+	install ${B}/* ${D}/
+}
+
+FILES:${PN} = "*"
diff --git a/meta/lib/oeqa/selftest/cases/rpmtests.py b/meta/lib/oeqa/selftest/cases/rpmtests.py
new file mode 100644
index 00000000000..dafbbc21360
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/rpmtests.py
@@ -0,0 +1,16 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake
+
+class BitbakeTests(OESelftestTestCase):
+
+    def test_rpm_filenames(self):
+        test_recipe = "testrpm"
+        bitbake(test_recipe)
+        
