Actions
Bug #13765
closedzfs_clone_010_pos fails with newer python
Start date:
Due date:
% Done:
0%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:
Description
I noticed that zfs_clone_010_pos fails with:
File "<string>", line 1 print "x" * 200 ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("x" * 200)?
The cause is the following:
log_must zfs clone $fs@snap $fs/$TESTCLONE$(python -c 'print "x" * 200').$i
The OmniOS VM is running python 3.9.4.
As suggested by the error message, changing this to:
log_must zfs clone $fs@snap $fs/$TESTCLONE$(python -c 'print ("x" * 200)').$i
Eliminates the errors and the test passes. I also ran python2.7 -c 'print ("x" * 200)'
(which runs without errors and outputs the expected string) to verify that older python is also happy with the change.
Related issues
Updated by Yuri Pankov about 2 years ago
We just changed it to the following to get rid of python dependency entirely (at least for that test case):
log_must $ZFS clone $fs@snap $fs/$TESTCLONE$(printf "%0.sx" {1..200}).$i
Updated by Jason King about 2 years ago
Who/what repo is 'we'? That is not in illumos-gate, and there wasn't an obvious open ticket for this already.
Updated by Andy Fiddaman 6 months ago
- Has duplicate Bug #15245: zfs_clone_010_pos: fix python statement added
Actions